awspec 0.33.0 → 0.34.0
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/Rakefile +5 -1
- data/lib/awspec.rb +1 -0
- data/lib/awspec/command/generate.rb +3 -4
- data/lib/awspec/error.rb +4 -0
- data/lib/awspec/ext.rb +1 -0
- data/lib/awspec/ext/array.rb +8 -0
- data/lib/awspec/generator.rb +1 -0
- data/lib/awspec/generator/spec/lambda.rb +29 -0
- data/lib/awspec/helper/finder.rb +2 -0
- data/lib/awspec/helper/finder/ami.rb +5 -3
- data/lib/awspec/helper/finder/autoscaling.rb +2 -2
- data/lib/awspec/helper/finder/cloudwatch.rb +4 -3
- data/lib/awspec/helper/finder/directconnect.rb +1 -1
- data/lib/awspec/helper/finder/ebs.rb +4 -3
- data/lib/awspec/helper/finder/ec2.rb +15 -51
- data/lib/awspec/helper/finder/elasticache.rb +2 -2
- data/lib/awspec/helper/finder/elb.rb +2 -2
- data/lib/awspec/helper/finder/iam.rb +1 -1
- data/lib/awspec/helper/finder/lambda.rb +8 -2
- data/lib/awspec/helper/finder/rds.rb +2 -2
- data/lib/awspec/helper/finder/route53.rb +3 -1
- data/lib/awspec/helper/finder/security_group.rb +10 -11
- data/lib/awspec/helper/finder/ses.rb +2 -2
- data/lib/awspec/helper/finder/subnet.rb +24 -0
- data/lib/awspec/helper/finder/vpc.rb +14 -28
- data/lib/awspec/helper/type.rb +8 -10
- data/lib/awspec/matcher/have_route.rb +1 -1
- data/lib/awspec/stub/duplicated_resource_type.rb +26 -0
- data/lib/awspec/stub/lambda.rb +5 -2
- data/lib/awspec/type/ami.rb +2 -2
- data/lib/awspec/type/autoscaling_group.rb +1 -1
- data/lib/awspec/type/base.rb +1 -1
- data/lib/awspec/type/cloudwatch_alarm.rb +4 -4
- data/lib/awspec/type/directconnect_virtual_interface.rb +2 -2
- data/lib/awspec/type/ebs.rb +5 -5
- data/lib/awspec/type/ec2.rb +12 -12
- data/lib/awspec/type/elasticache.rb +5 -5
- data/lib/awspec/type/elb.rb +8 -8
- data/lib/awspec/type/iam_group.rb +3 -3
- data/lib/awspec/type/iam_policy.rb +4 -4
- data/lib/awspec/type/iam_role.rb +2 -2
- data/lib/awspec/type/iam_user.rb +2 -2
- data/lib/awspec/type/lambda.rb +2 -2
- data/lib/awspec/type/launch_configuration.rb +3 -3
- data/lib/awspec/type/nat_gateway.rb +2 -2
- data/lib/awspec/type/network_acl.rb +5 -5
- data/lib/awspec/type/rds.rb +17 -17
- data/lib/awspec/type/route53_hosted_zone.rb +2 -2
- data/lib/awspec/type/route_table.rb +2 -2
- data/lib/awspec/type/security_group.rb +39 -39
- data/lib/awspec/type/ses_identity.rb +5 -5
- data/lib/awspec/type/subnet.rb +2 -2
- data/lib/awspec/type/vpc.rb +4 -4
- data/lib/awspec/version.rb +1 -1
- metadata +7 -2
@@ -10,7 +10,7 @@ module Awspec::Type
|
|
10
10
|
res = ses_client.list_identity_policies({
|
11
11
|
identity: @id
|
12
12
|
})
|
13
|
-
res
|
13
|
+
res.policy_names.find do |policy_name|
|
14
14
|
policy_name == name
|
15
15
|
end
|
16
16
|
end
|
@@ -25,7 +25,7 @@ module Awspec::Type
|
|
25
25
|
res = ses_client.get_identity_dkim_attributes({
|
26
26
|
identities: [@id]
|
27
27
|
})
|
28
|
-
res
|
28
|
+
res.dkim_attributes[@id][attribute.to_sym]
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
@@ -33,7 +33,7 @@ module Awspec::Type
|
|
33
33
|
res = ses_client.get_identity_dkim_attributes({
|
34
34
|
identities: [@id]
|
35
35
|
})
|
36
|
-
res
|
36
|
+
res.dkim_attributes[@id][:tokens].include?(token)
|
37
37
|
end
|
38
38
|
|
39
39
|
# notification_attributes
|
@@ -47,7 +47,7 @@ module Awspec::Type
|
|
47
47
|
res = ses_client.get_identity_notification_attributes({
|
48
48
|
identities: [@id]
|
49
49
|
})
|
50
|
-
res
|
50
|
+
res.notification_attributes[@id][attribute.to_sym]
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
@@ -61,7 +61,7 @@ module Awspec::Type
|
|
61
61
|
res = ses_client.get_identity_verification_attributes({
|
62
62
|
identities: [@id]
|
63
63
|
})
|
64
|
-
res
|
64
|
+
res.verification_attributes[@id][attribute.to_sym]
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
data/lib/awspec/type/subnet.rb
CHANGED
@@ -6,7 +6,7 @@ module Awspec::Type
|
|
6
6
|
def initialize(id)
|
7
7
|
super
|
8
8
|
@resource_via_client = find_subnet(id)
|
9
|
-
@id = @resource_via_client
|
9
|
+
@id = @resource_via_client.subnet_id if @resource_via_client
|
10
10
|
end
|
11
11
|
|
12
12
|
STATES = %w(
|
@@ -15,7 +15,7 @@ module Awspec::Type
|
|
15
15
|
|
16
16
|
STATES.each do |state|
|
17
17
|
define_method state + '?' do
|
18
|
-
@resource_via_client
|
18
|
+
@resource_via_client.state == state
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/awspec/type/vpc.rb
CHANGED
@@ -6,7 +6,7 @@ module Awspec::Type
|
|
6
6
|
def initialize(id)
|
7
7
|
super
|
8
8
|
@resource_via_client = find_vpc(id)
|
9
|
-
@id = @resource_via_client
|
9
|
+
@id = @resource_via_client.vpc_id if @resource_via_client
|
10
10
|
end
|
11
11
|
|
12
12
|
STATES = %w(
|
@@ -15,20 +15,20 @@ module Awspec::Type
|
|
15
15
|
|
16
16
|
STATES.each do |state|
|
17
17
|
define_method state + '?' do
|
18
|
-
@resource_via_client
|
18
|
+
@resource_via_client.state == state
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
def has_route_table?(id)
|
23
23
|
route_table = find_route_table(id)
|
24
24
|
return false unless route_table
|
25
|
-
route_table
|
25
|
+
route_table.vpc_id == @id
|
26
26
|
end
|
27
27
|
|
28
28
|
def has_network_acl?(id)
|
29
29
|
n = find_network_acl(id)
|
30
30
|
return false unless n
|
31
|
-
n
|
31
|
+
n.vpc_id == @id
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
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.
|
4
|
+
version: 0.34.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -232,7 +232,9 @@ files:
|
|
232
232
|
- lib/awspec.rb
|
233
233
|
- lib/awspec/cli.rb
|
234
234
|
- lib/awspec/command/generate.rb
|
235
|
+
- lib/awspec/error.rb
|
235
236
|
- lib/awspec/ext.rb
|
237
|
+
- lib/awspec/ext/array.rb
|
236
238
|
- lib/awspec/ext/struct.rb
|
237
239
|
- lib/awspec/generator.rb
|
238
240
|
- lib/awspec/generator/doc/type.rb
|
@@ -269,6 +271,7 @@ files:
|
|
269
271
|
- lib/awspec/generator/spec/ec2.rb
|
270
272
|
- lib/awspec/generator/spec/elb.rb
|
271
273
|
- lib/awspec/generator/spec/iam_policy.rb
|
274
|
+
- lib/awspec/generator/spec/lambda.rb
|
272
275
|
- lib/awspec/generator/spec/nat_gateway.rb
|
273
276
|
- lib/awspec/generator/spec/network_acl.rb
|
274
277
|
- lib/awspec/generator/spec/rds.rb
|
@@ -297,6 +300,7 @@ files:
|
|
297
300
|
- lib/awspec/helper/finder/s3.rb
|
298
301
|
- lib/awspec/helper/finder/security_group.rb
|
299
302
|
- lib/awspec/helper/finder/ses.rb
|
303
|
+
- lib/awspec/helper/finder/subnet.rb
|
300
304
|
- lib/awspec/helper/finder/vpc.rb
|
301
305
|
- lib/awspec/helper/type.rb
|
302
306
|
- lib/awspec/matcher.rb
|
@@ -322,6 +326,7 @@ files:
|
|
322
326
|
- lib/awspec/stub/autoscaling_group.rb
|
323
327
|
- lib/awspec/stub/cloudwatch_alarm.rb
|
324
328
|
- lib/awspec/stub/directconnect_virtual_interface.rb
|
329
|
+
- lib/awspec/stub/duplicated_resource_type.rb
|
325
330
|
- lib/awspec/stub/ebs.rb
|
326
331
|
- lib/awspec/stub/ec2.rb
|
327
332
|
- lib/awspec/stub/elasticache.rb
|