Sha256: 044297abb12507d8cabcbaf2e05a8e48276b488f6516af88e371edfe7d594709

Contents?: true

Size: 987 Bytes

Versions: 13

Compression:

Stored size: 987 Bytes

Contents

require 'trollop'

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

List instances for stack.

simple_deploy instances -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

        jj stack.instances
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
simple_deploy-0.5.2 lib/simple_deploy/cli/instances.rb
simple_deploy-0.5.1 lib/simple_deploy/cli/instances.rb
simple_deploy-0.5.0 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.8 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.7 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.6 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.5 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.5.rc.0 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.4 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.3 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.2 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.1 lib/simple_deploy/cli/instances.rb
simple_deploy-0.4.0 lib/simple_deploy/cli/instances.rb