Sha256: f1f758442ec159dc22e46d5c1120bf28217a526faef980d2518a9aa4a738985b

Contents?: true

Size: 1.01 KB

Versions: 2

Compression:

Stored size: 1.01 KB

Contents

module Percheron
  module Commands
    class Console < Abstract

      parameter('STACK_NAME', 'stack name', required: true)

      def execute
        super
        require 'pry-byebug'
        pry Percheron
      end

      private

        def logs(unit_name, follow: false)
          stack.logs!(unit_name, follow: follow)
          nil
        end

        def shell(unit_name)
          stack.shell!(unit_name)
          nil
        end

        def purge(unit_names)
          stack.purge!(unit_names: [ *unit_names ])
          nil
        end

        def create(unit_names, start: false)
          stack.create!(unit_names: [ *unit_names ], start: start)
          nil
        end

        def start(unit_names)
          stack.start!(unit_names: [ *unit_names ])
          nil
        end

        def stop(unit_names)
          stack.stop!(unit_names: [ *unit_names ])
          nil
        end

        def restart(unit_names)
          stack.restart!(unit_names: [ *unit_names ])
          nil
        end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
percheron-0.8.1 lib/percheron/commands/console.rb
percheron-0.8.0 lib/percheron/commands/console.rb