tsudura 0.1.4 → 0.1.5

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: 92299900e770946636a3c3d5b9d13c051a3d6aed
4
- data.tar.gz: 18106f7d338b3a082a02afd28aadfe3a38789052
3
+ metadata.gz: 43796bc36b9e1a032dd012d5c9690f28d674c223
4
+ data.tar.gz: f2e32cccffba733d2ccd58740b327db2ce4565c5
5
5
  SHA512:
6
- metadata.gz: 4d55e808361ef403d30e0124560c9004abf69326768be8a52ae5e0226d57931e18317a91cd9445a2571a786e6e3b91358c3899dbd728cde0bdb6f202e4cd8eb3
7
- data.tar.gz: b3ebafd45ec63824f74fda6780bc1b27e2ea9d53a1da9a2c8c164790a2b209bd96dde028484d42a7fe18ae50b3515c5b237492b977e0cfc56370f863ed42b7cb
6
+ metadata.gz: 6db4e83555d4c901e8fc21158eb9c732c6d6ec6eb7f21158e0d3cc450e5061607ae67aea6d203968cb0b2f9715955b4b38ce88cae86e6cef4609e0457ebbdf13
7
+ data.tar.gz: 28b3f604d193bc6dd3d4669e5f9077450e297efc407d790d13932d1ffb8566b20415c4a109bfaa117ba085dfeee92c9d64e09ae003f01516fe123d3a55eb9574
@@ -28,7 +28,7 @@ module Tsudura::Aws
28
28
  result = ec2.create_image(name: "#{@config[:service]}-#{short_env}-#{@timestamp}", instance_id: @instance_id)
29
29
  result[:image_id]
30
30
  end
31
-
31
+
32
32
  #
33
33
  # stateがavailableになるまで待ち
34
34
  #
@@ -56,16 +56,21 @@ module Tsudura::Aws
56
56
  end
57
57
 
58
58
  def all_images
59
+ tmp = []
60
+
59
61
  ec2.describe_images(
60
62
  owners: ["#{@config[:owner]}"],
61
63
  filters: [ { name: "name", values: ["#{@config[:service]}-#{short_env}*"] }]
62
- )[:images].map(&:image_id)
64
+ ).each_page { |i| tmp.concat i.images }
65
+
66
+ tmp.map(&:image_id)
63
67
  end
64
68
 
65
69
  def available_images
66
- launch_config.describe_launch_configurations[:launch_configurations]
67
- .select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }
68
- .map(&:image_id).uniq
70
+ tmp = []
71
+
72
+ launch_config.describe_launch_configurations.each_page { |i| tmp.concat i.launch_configurations }
73
+ tmp.select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }.map(&:image_id).uniq
69
74
  end
70
75
  end
71
76
  end
@@ -38,15 +38,17 @@ module Tsudura::Aws
38
38
  end
39
39
 
40
40
  def available_launch_configurations
41
- autoscaling.describe_auto_scaling_groups[:auto_scaling_groups]
42
- .select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }
43
- .map(&:launch_configuration_name).uniq
41
+ tmp = []
42
+
43
+ autoscaling.describe_auto_scaling_groups.each_page { |i| tmp.concat i.launch_configurations }
44
+ tmp.select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }.map(&:launch_configuration_name).uniq
44
45
  end
45
46
 
46
47
  def all_launch_configurations
47
- autoscaling.describe_launch_configurations[:launch_configurations]
48
- .select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }
49
- .map(&:launch_configuration_name)
48
+ tmp = []
49
+
50
+ autoscaling.describe_launch_configurations.each_page { |i| tmp.concat i.launch_configurations }
51
+ tmp.select { |i| i[:launch_configuration_name] =~ /#{@config[:service]}-#{short_env}/ }.map(&:launch_configuration_name)
50
52
  end
51
53
  end
52
54
  end
@@ -1,3 +1,3 @@
1
1
  module Tsudura
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tsudura
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - onigra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-26 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler