Sha256: 5c7c779da0983515dd420339de23388369b058b243f3c46cf1be0bc7962a8a75

Contents?: true

Size: 835 Bytes

Versions: 18

Compression:

Stored size: 835 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
        p cmd: registry_key, args: args, opts: opts
      end
    end

    class List < Cl::Cmd
      register 'apps:info'

      opt '-a', '--app APP'

      def run
        p cmd: registry_key, args: args, opts: opts
      end
    end
  end
end

Cl.new('heroku').run(%w(apps:create name -o org))
# or:
#
#   Cl.new('heroku').run(%w(apps create name -o org))

# Output:
#
#   {:cmd=>:"apps:create", :args=>["name"], :opts=>{:org=>"org"}}

Cl.new('heroku').run(%w(apps:info -a app))
# or:
#
#   Cl.new('heroku').run(%w(apps info -a app))

# Output:
#
#   {:cmd=>:"apps:info", :args=>[], :opts=>{:app=>"app"}}

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
travis-cl-1.2.4 examples/heroku
cl-1.2.4 examples/heroku
cl-1.2.3 examples/heroku
cl-1.2.2 examples/heroku
cl-1.2.1 examples/heroku
cl-1.2.0 examples/heroku
cl-1.1.5 examples/heroku
cl-1.1.4 examples/heroku
cl-1.1.3 examples/heroku
cl-1.1.2 examples/heroku
cl-1.1.1 examples/heroku
cl-1.1.0 examples/heroku
cl-1.0.5 examples/heroku
cl-1.0.4 examples/heroku
cl-1.0.3 examples/heroku
cl-1.0.2 examples/heroku
cl-1.0.1 examples/heroku
cl-1.0.0 examples/heroku