awspec 0.76.1 → 0.77.0

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: 1df9fc6c2f427e1fe6e03ff265781c1ecb81432c
4
- data.tar.gz: 581eb01b717cf1131ab2bb5810d28642cc21f7ce
3
+ metadata.gz: 34ee0b3c8525625cc99b4f0657c696fb57422d1c
4
+ data.tar.gz: ce0b6bc599df19fbaf5fb75d464572b68eea5981
5
5
  SHA512:
6
- metadata.gz: 33fcf4c95a3abfd53a2ed93daad170ffdfa780310316e31d3bfff72316207c12823ad61ef770f5aa9d891bce2ba2df99f9d956f2707194637629fa3db56aecf6
7
- data.tar.gz: 46aca2ceef9b037c06450538906d30dacba2e33cb5013e6588ca815eaf60abaeb4792b3e885366354d03c36656662f938a675dbb5e9a6430a6cc4d3452b3ae56
6
+ metadata.gz: ac0f966398d0cd2389316e9f5df1e7e16a217200daffecca0446d3767ff67634a78a7b4b38a68c153bc4df51dc658dc6186718c7ec785aad61e2a7a5ea94d371
7
+ data.tar.gz: 28b98906ea89acf2d1dba16665412a0ab434742ab67a64eff4a40bc14edfeac59f74a4b6e030b6d087314f282f09c2420dd496e1bdb55613adc24959d20b5d07
@@ -2199,6 +2199,8 @@ end
2199
2199
  ```
2200
2200
 
2201
2201
 
2202
+ ### be_associated_to
2203
+
2202
2204
  ### be_available, be_pending
2203
2205
 
2204
2206
  ```ruby
@@ -11,6 +11,21 @@ module Awspec::Type
11
11
  @id ||= resource_via_client.subnet_id if resource_via_client
12
12
  end
13
13
 
14
+ def associated_to?(route_table_id)
15
+ res = ec2_client.describe_route_tables({
16
+ filters:
17
+ [
18
+ {
19
+ name: 'association.subnet-id',
20
+ values: [id]
21
+ }
22
+ ]
23
+ })
24
+ return false if res[:route_tables].empty?
25
+ associated_route_table = res[:route_tables].first
26
+ associated_route_table.route_table_id == route_table_id || associated_route_table.tag_name == route_table_id
27
+ end
28
+
14
29
  STATES = %w(
15
30
  available pending
16
31
  )
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '0.76.1'
2
+ VERSION = '0.77.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.76.1
4
+ version: 0.77.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW