Sha256: 39ebfd4e6d4fd9e26ab7ea790818a0507f69d512c418d506e75137cd1ec72a96

Contents?: true

Size: 694 Bytes

Versions: 8

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

module Capistrano
  module ASG
    module Rolling
      # Adds the autoscale DSL to the Capistrano configuration:
      #
      # autoscale 'my-asg', user: 'deployer', roles: %w(app assets)
      #
      module DSL
        def autoscale(name, properties = {})
          group = Capistrano::ASG::Rolling::AutoscaleGroup.new(name, properties)
          raise Capistrano::ASG::Rolling::NoAutoScalingGroup, "Auto Scaling Group #{name} could not be found." unless group.exists?

          Capistrano::ASG::Rolling::Configuration.autoscale_groups << group
        end
      end
    end
  end
end

extend Capistrano::ASG::Rolling::DSL # rubocop:disable Style/MixinUsage

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
capistrano-asg-rolling-0.5.1 lib/capistrano/asg/rolling/dsl.rb
capistrano-asg-rolling-0.5.0 lib/capistrano/asg/rolling/dsl.rb
capistrano-asg-rolling-0.4.1 lib/capistrano/asg/rolling/dsl.rb
capistrano-asg-rolling-0.4.0 lib/capistrano/asg/rolling/dsl.rb
capistrano-asg-rolling-0.3.0 lib/capistrano/asg/rolling/dsl.rb
capistrano-asg-rolling-0.2.1 lib/capistrano/asg/rolling/dsl.rb
capistrano-asg-rolling-0.2.0 lib/capistrano/asg/rolling/dsl.rb
capistrano-asg-rolling-0.1.0 lib/capistrano/asg/rolling/dsl.rb