bin/pumper in pumper-1.2.0 vs bin/pumper in pumper-1.3.0
- old
+ new
@@ -1,9 +1,8 @@
#!/usr/bin/env ruby
require 'optparse'
require 'pumper'
-
options = Hash.new
opts = OptionParser.new do |opts|
opts.banner = %q[Pumper]
@@ -13,26 +12,36 @@
opts.on('-a', '--absolute_path', 'If project path is absolute') do
options[:is_absolute_path] = true
end
- opts.on('-c', '--config', 'If use .pumper.yml config') do
+ opts.on('-g', '--gemset GEMSET', "Gemset's name (if you use rvm)") do |gemset|
+ options[:gemset] = gemset
+ end
+
+ opts.on('-e', '--vendor', "If project's gems stored in the vendor/cache") do
+ options[:is_vendor] = true
+ end
+
+ opts.on('-c', '--config', 'If you use .pumper.yml config') do
options[:config] = true
end
- opts.on('-g', '--gemset GEMSET', 'Gemset name (if you use rvm)') do |gemset|
- options[:gemset] = gemset
+ opts.on('-l', '--list projectN[,projectN+1]', Array, 'List of projects (use with --config)') do |list|
+ options[:list] = list
end
- opts.on('-e', '--vendor', 'If project gems stored in the vendor/cache') do
- options[:is_vendor] = true
+ opts.on_tail('-h', '--help', 'Show this message') do
+ puts opts
+ exit
end
+
+ opts.on_tail('--version', 'Show version') do
+ puts Pumper::VERSION
+ exit
+ end
end
opts.parse!
config_options = Pumper::Configuration.configure!(options)
-if options[:config]
- config_options.each { |options| Pumper::Pump.new(options).perform }
-else
- Pumper::Pump.new(config_options).perform
-end
+config_options.each { |options| Pumper::Pump.new(options).perform }