Sha256: 5465cd153a0123acdf216137313d8f116af05a8b7e79e43b3d527e1127a06aa7

Contents?: true

Size: 978 Bytes

Versions: 22

Compression:

Stored size: 978 Bytes

Contents

require 'trollop'

module SimpleDeploy
  module CLI
    class Status
      def show
        opts = Trollop::options do
          version SimpleDeploy::VERSION
          banner <<-EOS

Show status of a stack.

simple_deploy status -n STACK_NAME -e ENVIRONMENT

EOS
          opt :help, "Display Help"
          opt :environment, "Set the target environment", :type => :string
          opt :name, "Stack name to manage", :type => :string
        end

        CLI::Shared.valid_options? :provided => opts,
                                   :required => [:environment, :name]

        config = Config.new.environment opts[:environment]

        logger = SimpleDeployLogger.new :log_level => opts[:log_level]

        stack = Stack.new :environment => opts[:environment],
                          :name        => opts[:name],
                          :config      => config,
                          :logger      => logger

        puts stack.status
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
simple_deploy-0.6.4 lib/simple_deploy/cli/status.rb
simple_deploy-0.6.3 lib/simple_deploy/cli/status.rb
simple_deploy-0.6.2 lib/simple_deploy/cli/status.rb
simple_deploy-0.6.1 lib/simple_deploy/cli/status.rb
simple_deploy-0.6.0 lib/simple_deploy/cli/status.rb
simple_deploy-0.5.6 lib/simple_deploy/cli/status.rb
simple_deploy-0.5.5 lib/simple_deploy/cli/status.rb
simple_deploy-0.5.4 lib/simple_deploy/cli/status.rb
simple_deploy-0.5.3 lib/simple_deploy/cli/status.rb
simple_deploy-0.5.2 lib/simple_deploy/cli/status.rb
simple_deploy-0.5.1 lib/simple_deploy/cli/status.rb
simple_deploy-0.5.0 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.8 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.7 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.6 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.5 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.5.rc.0 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.4 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.3 lib/simple_deploy/cli/status.rb
simple_deploy-0.4.2 lib/simple_deploy/cli/status.rb