Sha256: ae6da3ac4ac17235685d869759655ca34d4df2e6aeebe03abe94d6b8cd0f9bc8

Contents?: true

Size: 575 Bytes

Versions: 2

Compression:

Stored size: 575 Bytes

Contents

module Percheron
  module Commands
    class Create < Abstract

      default_parameters!
      option('--start', :flag, '(Re)start unit once created', default: true)
      option('--build', :flag, '(Re)build image', default: true)
      option('--deep', :flag, 'Include needed units', default: false)
      option('--force', :flag, 'Force unit (re)creation', default: false)

      def execute
        super
        opts = { unit_names: unit_names, build: build?, start: start?, deep: deep?, force: force? }
        runit { stack.create!(opts) }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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