Sha256: baf6d6aa001c8195a9df5a245b8c34fed3f1c86f5498b138c6afee9e3427d50b
Contents?: true
Size: 867 Bytes
Versions: 29
Compression:
Stored size: 867 Bytes
Contents
#!/usr/bin/env ruby $: << File.expand_path('lib') require 'cl' module Heroku module Apps class Create < Cl::Cmd register 'apps:create' arg :name, required: true opt '-o', '--org ORG' def run; [registry_key, args, opts] end end class List < Cl::Cmd register 'apps:info' opt '-a', '--app APP' def run; [registry_key, args, opts] end end end end def output(cmd, args, opts) puts "Called #{cmd} with args=#{args} opts=#{opts}\n\n" end output *Cl.new($0).run(%w(apps:create name -o org)) # Output: # # Called apps:create with args=["name"] opts={:org=>"org"} output *Cl.new($0).run(%w(apps create name -o org)) # Output: # # Called apps:create with args=["name"] opts={:org=>"org"} output *Cl.new($0).run(%w(apps:info -a app)) # Output: # # Called apps:create with args=["app"] opts={}
Version data entries
29 entries across 29 versions & 1 rubygems