awspec 1.17.2 → 1.17.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/lib/awspec/helper/finder/ec2.rb +15 -4
- data/lib/awspec/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c29ac2a1c8d141e957c22d76e9a96afd9ae5aa85
|
4
|
+
data.tar.gz: 4689ba69992d75c2e02fffa56f4b78cf29a53c8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 869f8b542a3c28c0091895bc869b859e07b440ac88734c36ffa316dd0fa4ecbb61beff3a620867d22be951a9ffdc547c537dcf5c92f76fba9e834311b825f2ad
|
7
|
+
data.tar.gz: d35ad91ab1051b5a52bb2f8645b923d1ad9fe90311b593811713483d91d2948c3d66dc3ddbb60bb98d9208cc3e9d5f31a7821b3ab3dfbc9f6ecdf9dfd376e88e
|
data/README.md
CHANGED
@@ -85,10 +85,21 @@ module Awspec::Helper
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def find_nat_gateway(gateway_id)
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
88
|
+
# nat_gateway_id or tag:Name
|
89
|
+
begin
|
90
|
+
res = ec2_client.describe_nat_gateways({
|
91
|
+
nat_gateway_ids: [gateway_id]
|
92
|
+
})
|
93
|
+
rescue
|
94
|
+
res = ec2_client.describe_nat_gateways({
|
95
|
+
filter: [{ name: 'tag:Name', values: [gateway_id] }]
|
96
|
+
})
|
97
|
+
end
|
98
|
+
if res.nat_gateways.count == 1
|
99
|
+
res.nat_gateways.single_resource(gateway_id)
|
100
|
+
elsif res.nat_gateways.count > 1
|
101
|
+
raise Awspec::DuplicatedResourceTypeError, "Duplicate nat_gateways matching id or tag #{gateway_id}"
|
102
|
+
end
|
92
103
|
end
|
93
104
|
|
94
105
|
def find_network_interface(interface_id)
|
data/lib/awspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|
@@ -716,7 +716,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
716
716
|
version: '0'
|
717
717
|
requirements: []
|
718
718
|
rubyforge_project:
|
719
|
-
rubygems_version: 2.
|
719
|
+
rubygems_version: 2.6.14
|
720
720
|
signing_key:
|
721
721
|
specification_version: 4
|
722
722
|
summary: RSpec tests for your AWS resources.
|