Class: ErpDevSvcs::Commands::UninstallGems

Inherits:
Object
  • Object
show all
Defined in:
lib/erp_dev_svcs/commands/uninstall_gems.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUninstallGems

Returns a new instance of UninstallGems.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/erp_dev_svcs/commands/uninstall_gems.rb', line 12

def initialize
  options = {:install => false, :gems => nil}

  opt_parser = OptionParser.new do |opt|
    opt.banner = "Usage: compass_ae-dev uninstall_gems"
    
    opt.on("-g", "--gems [GEMLIST]", Array,
      "List of gems to uninstall; defaults to all") {|gem| options[:gems] = gem}
    
    opt.on_tail("-h", "--help", "Show this message") do
      puts opt
      exit
    end
  end

  opt_parser.parse!

  ErpDevSvcs::Commands::Helper.exec_in_engines(options[:gems]) do |engine_name|
    puts "Uninstalling gem #{engine_name}"
    result = %x[gem uninstall #{engine_name}]
    puts result
    puts "\n"
  end
end

Class Method Details

.executeObject



8
9
10
# File 'lib/erp_dev_svcs/commands/uninstall_gems.rb', line 8

def self.execute
  new()
end