Class: ErpDevSvcs::Commands::PushGems
- Inherits:
-
Object
- Object
- ErpDevSvcs::Commands::PushGems
- Defined in:
- lib/erp_dev_svcs/commands/push_gems.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ PushGems
constructor
A new instance of PushGems.
Constructor Details
#initialize ⇒ PushGems
Returns a new instance of PushGems.
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 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/erp_dev_svcs/commands/push_gems.rb', line 12 def initialize = {} optparse = OptionParser.new do|opts| opts. = "Usage: compass-util push_gems [options]" [:verbose] = false opts.on('-v', '--verbose', 'Output more information') do [:verbose] = true end [:ruby_gems] = false opts.on('-r', '--ruby_gems', 'push to ruby gems') do [:ruby_gems] = true end [:geminabox] = true opts.on('-b', '--geminabox', 'push to geminabox') do [:geminabox] = true [:ruby_gems] = false end opts.on("-g", "--gems [GEMLIST]", Array, "List of engines to operate on;"\ "defaults to all") {|engines| [:engines] = engines} opts.on_tail("-h", "--help", "Show this message") do puts opts exit end end optparse.parse! ErpDevSvcs::Commands::Helper.exec_in_engines([:gems]) do |engine_name| gem_file = Dir.glob("*.gem")[0] if [:ruby_gems] result = %x[gem push #{gem_file}] puts result if [:verbose] end if [:geminabox] result = %x[gem inabox #{gem_file}] puts result if [:verbose] end end end |
Class Method Details
.execute ⇒ Object
8 9 10 |
# File 'lib/erp_dev_svcs/commands/push_gems.rb', line 8 def self.execute new() end |