Class: ErpDevSvcs::Commands::SetupDevEnv
- Inherits:
-
Object
- Object
- ErpDevSvcs::Commands::SetupDevEnv
- Defined in:
- lib/erp_dev_svcs/commands/setup_dev_env.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ SetupDevEnv
constructor
A new instance of SetupDevEnv.
Constructor Details
#initialize ⇒ SetupDevEnv
Returns a new instance of SetupDevEnv.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/erp_dev_svcs/commands/setup_dev_env.rb', line 12 def initialize = {:engines => nil, :create_gemfiles => false, :bundle => false} opt_parser = OptionParser.new do |opt| opt. = "Usage: compass_ae-dev test [OPTIONS]" opt.on("-g", "--gems [GEMLIST]", Array, "List of engines to operate on;"\ "defaults to all") {|engines| [:engines] = engines} opt.on("-c", "--create-gemfiles", nil, "Create Gemfiles in engines from Gemfile") do |x| [:create_gemfiles] = true end opt.on("-b", "--bundle-engines", nil, "Run 'bundle install' in engines") {|x| [:bundle] = true} opt.on_tail("-h", "--help", "Show this message") do puts opt exit end end opt_parser.parse! if [:create_gemfiles] == false && [:bundle] == false puts opt_parser exit end ErpDevSvcs::Commands::Helper.exec_in_engines([:engines]) do |engine_name| puts "\nOperating on engine #{engine_name}... \n" puts %x[cp Gemfile Gemfile] if [:create_gemfiles] == true puts %x[bundle update] if [:bundle] == true #result = %x[cp Gemfile Gemfile] #puts result end end |
Class Method Details
.execute ⇒ Object
8 9 10 |
# File 'lib/erp_dev_svcs/commands/setup_dev_env.rb', line 8 def self.execute new() end |