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

Version Path
cl-0.1.28 examples/heroku
cl-0.1.27 examples/heroku
cl-0.1.26 examples/heroku
cl-0.1.25 examples/heroku
cl-0.1.24 examples/heroku
cl-0.1.23 examples/heroku
cl-0.1.22 examples/heroku
cl-0.1.21 examples/heroku
cl-0.1.20 examples/heroku
cl-0.1.19 examples/heroku
cl-0.1.18 examples/heroku
cl-0.1.17 examples/heroku
cl-0.1.16 examples/heroku
cl-0.1.15 examples/heroku
cl-0.1.14 examples/heroku
cl-0.1.13 examples/heroku
cl-0.1.12 examples/heroku
cl-0.1.11 examples/heroku
cl-0.1.10 examples/heroku
cl-0.1.9 examples/heroku