examples/heroku in cl-0.1.28 vs examples/heroku in cl-1.0.0

- old
+ new

@@ -10,40 +10,39 @@ arg :name, required: true opt '-o', '--org ORG' - def run; [registry_key, args, opts] end + def run + p cmd: registry_key, args: args, opts: opts + end end class List < Cl::Cmd register 'apps:info' opt '-a', '--app APP' - def run; [registry_key, args, opts] end + def run + p cmd: registry_key, args: args, opts: opts + end end end end -def output(cmd, args, opts) - puts "Called #{cmd} with args=#{args} opts=#{opts}\n\n" -end +Cl.new('heroku').run(%w(apps:create name -o org)) +# or: +# +# Cl.new('heroku').run(%w(apps create name -o org)) -output *Cl.new($0).run(%w(apps:create name -o org)) - # Output: # -# Called apps:create with args=["name"] opts={:org=>"org"} +# {:cmd=>:"apps:create", :args=>["name"], :opts=>{:org=>"org"}} -output *Cl.new($0).run(%w(apps create name -o org)) - -# Output: +Cl.new('heroku').run(%w(apps:info -a app)) +# or: # -# Called apps:create with args=["name"] opts={:org=>"org"} +# Cl.new('heroku').run(%w(apps info -a app)) -output *Cl.new($0).run(%w(apps:info -a app)) - # Output: # -# Called apps:create with args=["app"] opts={} - +# {:cmd=>:"apps:info", :args=>[], :opts=>{:app=>"app"}}