awspec 0.65.0 → 0.65.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: d7911fec1674e43a9b4d63b649c79a8e9ab947f1
4
- data.tar.gz: 2106723c99932cc802a6d0c24395b5a1303ce181
3
+ metadata.gz: 7bdaf3ed35641e1264355ea19d1be4b198695d67
4
+ data.tar.gz: 6ea567eafc4f3678490e5f4f941a657732c89bd5
5
5
  SHA512:
6
- metadata.gz: ed58c94454f933395d0c25883e4c4612365e29548db81371e4f912373c97b7e906c4f9d1c6327c2532ddb41766d01de935f725140bd8a7e85def01440fb4688f
7
- data.tar.gz: 3d6e0a8ac2c860aa0c6340c373780286a1512434f8371f575cd66b737e2dc40cac9f90aa5635422e5044d6609fed5bba23820d9d84f964fcbd71097f99897c96
6
+ metadata.gz: 3c9398c10efca166d15957d5713521789ab10c9e1bc9f1c45b1fbe92447206d0e189b3399cb9576f73ead0c31e355604462c2160e8792482cbd668ef5e263fbf
7
+ data.tar.gz: f58ac20a8273c4444f4e0915b42ac771d9eceab7b5dc451ac9106b07e387ec6f9d49c9373ed4381a080b6d4b8055def947200786e4ed9001ab0699d22ee96b87
@@ -23,7 +23,11 @@ module Awspec::Generator
23
23
  def generate_route_linespecs(route_table)
24
24
  linespecs = []
25
25
  route_table.routes.each do |route|
26
- linespecs.push(ERB.new(route_table_spec_gateway_linetemplate, nil, '-').result(binding)) if route.gateway_id
26
+ if route.gateway_id
27
+ destination = route.destination_cidr_block
28
+ destination ||= route.destination_prefix_list_id
29
+ linespecs.push(ERB.new(route_table_spec_gateway_linetemplate, nil, '-').result(binding))
30
+ end
27
31
  if route.instance_id
28
32
  instance = find_ec2(route.instance_id)
29
33
  linespecs.push(ERB.new(route_table_spec_instance_linetemplate, nil, '-').result(binding)) if instance
@@ -51,7 +55,7 @@ module Awspec::Generator
51
55
 
52
56
  def route_table_spec_gateway_linetemplate
53
57
  template = <<-'EOF'
54
- it { should have_route('<%= route.destination_cidr_block %>').target(gateway: '<%= route.gateway_id %>') }
58
+ it { should have_route('<%= destination %>').target(gateway: '<%= route.gateway_id %>') }
55
59
  EOF
56
60
  template
57
61
  end
@@ -115,6 +115,17 @@ Aws.config[:ec2] = {
115
115
  network_interface_id: nil,
116
116
  vpc_peering_connection_id: nil,
117
117
  state: 'active'
118
+ },
119
+ {
120
+ destination_cidr_block: nil,
121
+ destination_prefix_list_id: 'pl-1a2b3c4d',
122
+ gateway_id: 'vpce-11bb22cc',
123
+ instance_id: nil,
124
+ instance_owner_id: nil,
125
+ nat_gateway_id: nil,
126
+ network_interface_id: nil,
127
+ vpc_peering_connection_id: nil,
128
+ state: 'active'
118
129
  }
119
130
  ],
120
131
  associations: [
@@ -18,7 +18,7 @@ module Awspec::Type
18
18
  nat_gateway_id = nil)
19
19
  resource_via_client.routes.find do |route|
20
20
  if destination
21
- next false unless route.destination_cidr_block == destination
21
+ next false unless [route.destination_cidr_block, route.destination_prefix_list_id].include?(destination)
22
22
  end
23
23
  next target_gateway?(route, gateway_id) if gateway_id
24
24
  next target_instance?(route, instance_id) if instance_id
@@ -1,3 +1,3 @@
1
1
  module Awspec
2
- VERSION = '0.65.0'
2
+ VERSION = '0.65.1'
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: 0.65.0
4
+ version: 0.65.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k1LoW
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec