awspec 0.65.0 → 0.65.1
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 +4 -4
- data/lib/awspec/generator/spec/route_table.rb +6 -2
- data/lib/awspec/stub/route_table.rb +11 -0
- data/lib/awspec/type/route_table.rb +1 -1
- data/lib/awspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7bdaf3ed35641e1264355ea19d1be4b198695d67
|
|
4
|
+
data.tar.gz: 6ea567eafc4f3678490e5f4f941a657732c89bd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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('<%=
|
|
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
|
|
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
|
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: 0.65.
|
|
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-
|
|
11
|
+
date: 2017-02-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|