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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 17fc74d2e7d552a38f22ad8e8ee0d8075d61b61ba477f2268451745565e886b3
4
- data.tar.gz: b4571541718a60fb59b50751e106afe46a3af10513c6a53bff7dc9579f1f2fc4
2
+ SHA1:
3
+ metadata.gz: c29ac2a1c8d141e957c22d76e9a96afd9ae5aa85
4
+ data.tar.gz: 4689ba69992d75c2e02fffa56f4b78cf29a53c8f
5
5
  SHA512:
6
- metadata.gz: d1aaae691e1fb833e15d375ac19e0c0bc27f2f8d89761f89bcca3e08353997e515ecf9310decc3c51193d3ffc5e538a52beee101a2ba6eb6feac4fb9ad66bac0
7
- data.tar.gz: b3c4267d74d38a949f2ec11a98913007771a85620e8ad9b6771c969b270a79f1c732b26cb0f6db4c1d69080239094f34e46f3ad0694fda63c17853babbc0c813
6
+ metadata.gz: 869f8b542a3c28c0091895bc869b859e07b440ac88734c36ffa316dd0fa4ecbb61beff3a620867d22be951a9ffdc547c537dcf5c92f76fba9e834311b825f2ad
7
+ data.tar.gz: d35ad91ab1051b5a52bb2f8645b923d1ad9fe90311b593811713483d91d2948c3d66dc3ddbb60bb98d9208cc3e9d5f31a7821b3ab3dfbc9f6ecdf9dfd376e88e
data/README.md CHANGED
@@ -126,7 +126,7 @@ $ AWS_PROFILE=mycreds bundle exec rake spec
126
126
 
127
127
  ## Support AWS Resources
128
128
 
129
- [Resource Types infomation here](doc/resource_types.md)
129
+ [Resource Types information here](doc/resource_types.md)
130
130
 
131
131
  ## awspec AWS key/secrets precedence
132
132
 
@@ -85,10 +85,21 @@ module Awspec::Helper
85
85
  end
86
86
 
87
87
  def find_nat_gateway(gateway_id)
88
- res = ec2_client.describe_nat_gateways({
89
- filter: [{ name: 'nat-gateway-id', values: [gateway_id] }]
90
- })
91
- res.nat_gateways.single_resource(gateway_id)
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)
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '1.17.2'
2
+ VERSION = '1.17.3'
3
3
  end
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.2
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-20 00:00:00.000000000 Z
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.7.6
719
+ rubygems_version: 2.6.14
720
720
  signing_key:
721
721
  specification_version: 4
722
722
  summary: RSpec tests for your AWS resources.