bin/grid in grid-0.4.2 vs bin/grid in grid-0.4.3
- old
+ new
@@ -3,29 +3,24 @@
require 'grid'
require 'optparse'
options = {}
OptionParser.new do |opts|
- opts.banner = "Usage: grid [options] command"
+ opts.banner = "Usage: grid [options] command [grid_id]"
opts.separator ""
opts.separator "Commands:"
opts.separator " list - List all grids"
opts.separator " show - Show specified grids"
opts.separator " create - Create a new grid"
- opts.separator " add - Add intranode to specified grid ID"
- opts.separator " delete - Delete intranode from specified grid ID"
opts.separator " start - Start specified grid ID"
opts.separator " stop - Stop specified grid ID"
opts.separator " restart - Restart specified grid ID"
opts.separator " status - Update status of specified grid ID"
opts.separator " token - Generate new access token"
+ opts.separator " credits - List available credits"
opts.separator ""
opts.separator "Options:"
- opts.on("-g", "--grid ID", String,
- "Specify the Grid ID to use") do |g|
- options[:grid_id] = g || nil
- end
opts.on("-t", "--token TOKEN", String,
"Specify the token to authenticate with") do |t|
options[:token] = t || nil
end
opts.on("-e", "--email EMAIL", String,
@@ -41,28 +36,20 @@
opts.on("-u", "--uri URI", String,
"Optional URI of the Gridinit API:
http://gridin.it/api/v0 (default)") do |u|
options[:uri] = u || nil
end
- opts.on("-a", "--api API", String,
- "Specify the API to use:
- watir, firewatir, webdriver (default)
- webdriver_performance") do |a|
- options[:api] = b || 'webdriver'
- end
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
end.parse!
helper = Grid::Helper.new(
- :grid_id => options[:grid_id],
:token => options[:token],
:email => options[:email],
:password => options[:password],
:uri => options[:uri],
- :api => options[:api],
:args => ARGV
)
-helper.send(ARGV[0])
+helper.send ARGV[0], ARGV[1]