capistrano-autoscale 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 127f02fcf6d739818409d94afe990c2102215341
4
- data.tar.gz: ddf451b9e07ce97e37f0343125b38d75f497f3bd
3
+ metadata.gz: 0b9fc9eb6335d2c4db813b5fcdc51c16aeb7a9e5
4
+ data.tar.gz: dc6ea0651f0a8211a5d205f1ae126fb6e832a223
5
5
  SHA512:
6
- metadata.gz: 9ba8823efdb7a5e1ca0a6a47f5df08e90646ee2d3f2d130b4f97864999c82076c02d40153ebf0c5a3bc17b161116d8a99ffa490175e3935f6226476066745cc4
7
- data.tar.gz: 80fea5bcbd2dbdf9b0ba69c5348030d831db84412bc8c0d878676532442a6b9f9877529b2e0d7812e89bcf2218e79fbc44b5072a1f48358584b5a1dd9f0cbb2a
6
+ metadata.gz: 95bb2345ad63225eb224b3d22dc12102884b2cf0e839eebeff917e543784e6328036a652c107f20cca734eca6eb5b715e71732a18e8398bf4f813f4ebac31e47
7
+ data.tar.gz: 91e96699646115910fbddcc577e303c206a943aa027817aa2dfa1ff71869e82517ebb2a95411728b5563abb8cc96d74768afffec858927c33a3dc00f52aebf4f
data/README.md CHANGED
@@ -26,5 +26,5 @@ set :aws_region, ENV['AWS_REGION']
26
26
  And set the autoscale group:
27
27
 
28
28
  ```
29
- autoscale '<auto-scale-group-name>', user: '<deployment user>', roles: [<array of cap roles>]
29
+ autoscale [<array of auto-scale-group-names>], user: '<deployment user>', roles: [<array of cap roles>]
30
30
  ```
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "capistrano-autoscale"
8
8
  spec.version = Capistrano::Autoscale::VERSION
9
9
  spec.authors = ["Damien Glancy"]
10
- spec.email = ["support@clinch.io"]
10
+ spec.email = ["support@clinchtalent.com"]
11
11
 
12
12
  spec.summary = %q{Capistrano plugin for deploying to AWS AutoScale groups.}
13
13
  spec.description = %q{Deploys to all instances in a AWS AutoScale group.}
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.13"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
  spec.add_development_dependency "minitest", "~> 5.0"
24
+ spec.add_development_dependency "webmock"
24
25
 
25
26
  spec.add_dependency 'aws-sdk', '~> 2'
26
27
  spec.add_runtime_dependency 'capistrano', '~> 3.0', '> 3.0.0'
@@ -8,16 +8,16 @@ module Capistrano
8
8
  include Capistrano::Autoscale::Aws::Credentials
9
9
  include Capistrano::DSL
10
10
 
11
- def autoscaling
11
+ def autoscale
12
12
  @autoscaling ||= ::Aws::AutoScaling::Client.new(credentials)
13
13
  end
14
14
 
15
- def autoscale_group
16
- @autoscale_group ||= autoscaling.describe_auto_scaling_groups({auto_scaling_group_names: [autoscale_group_name]}).auto_scaling_groups.first
15
+ def autoscale_groups
16
+ @autoscale_groups ||= autoscale.describe_auto_scaling_groups({auto_scaling_group_names: [autoscale_group_names].flatten}).auto_scaling_groups
17
17
  end
18
18
 
19
- def autoscale_group_name
20
- fetch(:aws_autoscale_group)
19
+ def autoscale_group_names
20
+ fetch(:aws_autoscale_groups)
21
21
  end
22
22
 
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Autoscale
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require 'aws-sdk'
2
+
2
3
  require 'capistrano/all'
3
4
  require 'capistrano/dsl'
4
5
 
@@ -16,19 +17,24 @@ def autoscale(groupname, *args)
16
17
  include Capistrano::Autoscale::Aws::AutoscalingGroup
17
18
  include Capistrano::Autoscale::Aws::EC2
18
19
 
19
- set :aws_autoscale_group, groupname
20
+ set :aws_autoscale_groups, groupnames
20
21
 
21
- if autoscale_group
22
- instances = autoscale_group.instances.select do |instance|
23
- instance.lifecycle_state == 'InService'
22
+ if autoscale_groups
23
+ instances = []
24
+
25
+ autoscale_groups.each do |autoscale_group|
26
+ group_instances = autoscale_group.instances.select do |instance|
27
+ instance.lifecycle_state == 'InService'
28
+ end
29
+ instances += group_instances
24
30
  end
25
31
 
26
32
  instances.each do |instance|
27
33
  hostname = ec2_instance(instance.instance_id).private_ip_address
28
- p "Autoscale Deploying to: #{hostname}"
34
+ p "Autoscale deploying to: #{hostname}"
29
35
  server(hostname, *args)
30
36
  end
31
37
  else
32
- p "Error: No #{groupname} autoscale group found."
38
+ p "Error: No #{groupnames} autoscale group found."
33
39
  end
34
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-autoscale
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Glancy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-08 00:00:00.000000000 Z
11
+ date: 2017-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: aws-sdk
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -88,7 +102,7 @@ dependencies:
88
102
  version: 3.0.0
89
103
  description: Deploys to all instances in a AWS AutoScale group.
90
104
  email:
91
- - support@clinch.io
105
+ - support@clinchtalent.com
92
106
  executables: []
93
107
  extensions: []
94
108
  extra_rdoc_files: []
@@ -124,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
138
  version: '0'
125
139
  requirements: []
126
140
  rubyforge_project:
127
- rubygems_version: 2.6.8
141
+ rubygems_version: 2.6.14
128
142
  signing_key:
129
143
  specification_version: 4
130
144
  summary: Capistrano plugin for deploying to AWS AutoScale groups.