capistrano-autoscale 1.0.17 → 1.0.18

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
  SHA256:
3
- metadata.gz: c81a2786759043f1c5d1e624848b407a4bcc0746493b97aa4829ba385394a31e
4
- data.tar.gz: cf25067a2171c2fdc1bac51afafb7f99c02f243c89613e8e21629fafd98e6ad8
3
+ metadata.gz: ee1570ee20d71c835a4f74ba9f11e7a76e1beac92a0c57b6060e1606067a1f2e
4
+ data.tar.gz: a586ed2d2f561465ae941d352331f6a2e3d18c5a3a335fd327ed13f6a66eaeb4
5
5
  SHA512:
6
- metadata.gz: 86e7decfc8096a14e1e25fe515d970d6ef2e67ecfd92333760ef97c02ab008e485d474c8d22c58ad6468b4f6fc1f25cc23c315dd8235347513b08976e0c7787e
7
- data.tar.gz: 77fd23367a0e2a9e48ca7f843abcf8e56e1b74dc220c1a7ff8edcd8b75f2c05abc0d1670e02b06b7c34a6b437bde32c022ee5e6e798aa90c1b1a52ea344dc149
6
+ metadata.gz: 4626838f5c23d5eb45e7ce15244dbda06d4484c2f283a6311407db2cc4e2a9871a50c06d90ba0e26b115e6f332d0f73fcbcf034a076cc3a8ab8396348c7b88d3
7
+ data.tar.gz: baa27f1f9887b7ef288f25e1673000fe3e598354a30acdffa57b8ec20e8b7d6eec460c1dd0c742b6d1de36df333685a8e02bf9476597c42f538373cee87080e6
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Autoscale
3
- VERSION = '1.0.17'
3
+ VERSION = '1.0.18'
4
4
  end
5
5
  end
@@ -20,20 +20,19 @@ def autoscale(groupnames, identifier_type, *args)
20
20
  set :aws_autoscale_groups, groupnames
21
21
 
22
22
  if autoscale_groups
23
+ instances = []
24
+
23
25
  autoscale_groups.each do |autoscale_group|
24
26
  group_instances = autoscale_group.instances.select do |instance|
25
27
  instance.lifecycle_state == 'InService'
26
28
  end
29
+ instances += group_instances
30
+ end
27
31
 
28
- group_instances.each_with_index do |instance, index|
29
- host = host_by_identifier(instance, identifier_type)
30
- p "Autoscale group \"#{autoscale_group.auto_scaling_group_name}\" deploying to: #{host}"
31
- if index == 0
32
- server(host, args.first.merge(primary: true))
33
- else
34
- server(host, *args)
35
- end
36
- end
32
+ instances.each do |instance|
33
+ host = host_by_identifier(instance, identifier_type)
34
+ p "Autoscale deploying to: #{host}"
35
+ server(host, *args)
37
36
  end
38
37
  else
39
38
  p "Error: No #{groupnames} autoscale group found."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-autoscale
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Glancy