Sha256: b0de2f34dd0a241de5beef5de50aeed46a039758c4ff361cb0a2996427a4c5cf

Contents?: true

Size: 1.99 KB

Versions: 8

Compression:

Stored size: 1.99 KB

Contents

require 'trollop'

require 'simple_deploy/cli/shared'

require 'simple_deploy/cli/attributes'
require 'simple_deploy/cli/create'
require 'simple_deploy/cli/deploy'
require 'simple_deploy/cli/destroy'
require 'simple_deploy/cli/events'
require 'simple_deploy/cli/instances'
require 'simple_deploy/cli/list'
require 'simple_deploy/cli/outputs'
require 'simple_deploy/cli/parameters'
require 'simple_deploy/cli/resources'
require 'simple_deploy/cli/ssh'
require 'simple_deploy/cli/status'
require 'simple_deploy/cli/template'
require 'simple_deploy/cli/update'

module SimpleDeploy
  module CLI
    def self.start
      cmd = ARGV.shift

      case cmd
      when 'attributes'
        CLI::Attributes.new.show
      when 'create'
        CLI::Create.new.create
      when 'destroy', 'delete'
        CLI::Destroy.new.destroy
      when 'deploy'
        CLI::Deploy.new.deploy
      when 'environments'
        CLI::List.new.environments
      when 'events'
        CLI::Events.new.show
      when 'instances'
        CLI::Instances.new.list
      when 'list'
        CLI::List.new.stacks
      when 'outputs'
        CLI::Outputs.new.show
      when 'parameters'
        CLI::Parameters.new.show
      when 'resources'
        CLI::Resources.new.show
      when 'status'
        CLI::Status.new.show
      when 'template'
        CLI::Template.new.show
      when 'ssh'
        CLI::SSH.new.show
      when 'update'
        CLI::Update.new.update
      when '-h'
        puts "simple_deploy [attributes|create|destroy|environments|events|instances|list|template|outputs|parameters|resources|ssh|status|update] [options]"
        puts "Append -h for help on specific subcommand."
      when '-v'
        puts SimpleDeploy::VERSION
      else
        puts "Unknown command: '#{cmd}'."
        puts "simple_deploy [attributes|create|destroy|environments|events|instances|list|template|outputs|parameters|resources|ssh|status|update] [options]"
        puts "Append -h for help on specific subcommand."
        exit 1
      end
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
simple_deploy-0.4.8 lib/simple_deploy/cli.rb
simple_deploy-0.4.7 lib/simple_deploy/cli.rb
simple_deploy-0.4.6 lib/simple_deploy/cli.rb
simple_deploy-0.4.5 lib/simple_deploy/cli.rb
simple_deploy-0.4.5.rc.0 lib/simple_deploy/cli.rb
simple_deploy-0.4.4 lib/simple_deploy/cli.rb
simple_deploy-0.4.3 lib/simple_deploy/cli.rb
simple_deploy-0.4.2 lib/simple_deploy/cli.rb