railsworks 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dae062115203e2a40db72f13168a6a67ca47ace
4
- data.tar.gz: 175b79f94aeab40cf8b2341f24d0604cd76ae785
3
+ metadata.gz: 185378fb59824d2ea052d9f8e94e40c98e377982
4
+ data.tar.gz: 92333f6171548e2b763762c1cc332a7b6500db0d
5
5
  SHA512:
6
- metadata.gz: e61b74f2b486872706922b43e841ff1f4e93f6adff8af5efbe804b00d2b641905c429a54ad959bcd713e3958922098eb8c23036512656d6a4be79afea4900456
7
- data.tar.gz: f3ff545af7883e10cc18db619865b3c3b6ae6b2494148cca9f7039f8d6ecff1e993ccdc8f3171c8282827fa81f2a0995236cfada4e266874a74786d88ea45e0b
6
+ metadata.gz: cec69b390fa1133ea925790c21c150707f2a194242aa34ea82797a63bea5b39f56ab3e1293df83b32a09043843bec6d90c9db2838c5fdc310e5b22afecf1dae5
7
+ data.tar.gz: 38b2720e809c7577daba521213dee7b81d4a011f406438af8c37ef587384c87fd7aba4352efdc45c19cd2f91a0780ec3acac2378d825a8a14c94e80a6b9ec7ea
@@ -23,16 +23,17 @@ namespace :console do
23
23
  end
24
24
 
25
25
  def get_ip(regions)
26
- ip = false
27
26
  regions.each do |region, value|
28
27
  client = Aws::OpsWorks::Client.new(region: region)
29
28
  client.describe_instances({layer_id: value['layer_id']}).each do |page|
30
- ip = page.instances[0].public_ip
29
+ page.instances.each do |instance|
30
+ return instance.public_ip if instance.status == "online"
31
+ end
31
32
  break
32
33
  end
33
34
  break
34
35
  end
35
- ip
36
+ raise "Could not find online instance"
36
37
  end
37
38
 
38
39
  def setup_environment(regions)
@@ -1,3 +1,3 @@
1
1
  module Railsworks
2
- VERSION = "0.1"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsworks
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurt Nelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-01 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk