capistrano-autoscale 1.0.1 → 1.0.2

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: 2c32d041daf1eca47ef028debfe2b4e2d3ed9aa1
4
- data.tar.gz: 6b231af37e05d5e2823757274f5e1e0e19ecb3a8
3
+ metadata.gz: 127f02fcf6d739818409d94afe990c2102215341
4
+ data.tar.gz: ddf451b9e07ce97e37f0343125b38d75f497f3bd
5
5
  SHA512:
6
- metadata.gz: e49260e27d7d5532e078d5fe859d52ec3e9ce5c6ed8aa997e8a246254160bda52ef4ab71ad3e5849e39027d38590798cf127f34d61d759aa8590f14f45b679e3
7
- data.tar.gz: b6d901d12774b6350724ba63f870c9aeeb3a0a953137691f8dca949230ea047dcd01fcaa2079dd4cf3f85c4fa699f1dde2ac7729643bdfae74bc4f583d8d6d8e
6
+ metadata.gz: 9ba8823efdb7a5e1ca0a6a47f5df08e90646ee2d3f2d130b4f97864999c82076c02d40153ebf0c5a3bc17b161116d8a99ffa490175e3935f6226476066745cc4
7
+ data.tar.gz: 80fea5bcbd2dbdf9b0ba69c5348030d831db84412bc8c0d878676532442a6b9f9877529b2e0d7812e89bcf2218e79fbc44b5072a1f48358584b5a1dd9f0cbb2a
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Autoscale
3
- VERSION = '1.0.1'
3
+ VERSION = '1.0.2'
4
4
  end
5
5
  end
@@ -18,13 +18,17 @@ def autoscale(groupname, *args)
18
18
 
19
19
  set :aws_autoscale_group, groupname
20
20
 
21
- instances = autoscale_group&.instances&.select do |instance|
22
- instance.lifecycle_state == 'InService'
23
- end
21
+ if autoscale_group
22
+ instances = autoscale_group.instances.select do |instance|
23
+ instance.lifecycle_state == 'InService'
24
+ end
24
25
 
25
- instances&.each do |instance|
26
- hostname = ec2_instance(instance.instance_id).private_ip_address
27
- p "Autoscale Deploying to: #{hostname}"
28
- server(hostname, *args)
26
+ instances.each do |instance|
27
+ hostname = ec2_instance(instance.instance_id).private_ip_address
28
+ p "Autoscale Deploying to: #{hostname}"
29
+ server(hostname, *args)
30
+ end
31
+ else
32
+ p "Error: No #{groupname} autoscale group found."
29
33
  end
30
34
  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.1
4
+ version: 1.0.2
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-07 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler