awspec 0.22.0 → 0.22.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aebd0e1b411d3474c554a32991af7f1860b1d699
|
4
|
+
data.tar.gz: 9479622cd81a916645d61f992583f05e21e05000
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5acdb6a51a8439a90ba579fb3244a05c2cb65d16595aa5e08233196e469bfe40f697067fc650f1054a9d4980ef4615ccce512469a7c9d5738ab3b227e5d615ff
|
7
|
+
data.tar.gz: b0f24b98bcc8f2f4604c67f5e01682c09d2d4d604afa97168dbe53d3b52b9add6b5e69a46303c174c624aea1833cc837dc7febea840899a4d2ca79266e42b292
|
@@ -17,9 +17,10 @@ module Awspec::Generator
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def generate_linespec(record_set)
|
20
|
+
name = record_set.name.gsub(/\\052/, '*') # wildcard support
|
20
21
|
if !record_set.resource_records.empty?
|
21
22
|
template = <<-'EOF'
|
22
|
-
it { should have_record_set('<%=
|
23
|
+
it { should have_record_set('<%= name %>').<%= type %>('<%= v %>').ttl(<%= record_set.ttl %>) }
|
23
24
|
EOF
|
24
25
|
v = record_set.resource_records.map { |r| r.value }.join("\n")
|
25
26
|
type = record_set.type.downcase
|
@@ -29,7 +30,7 @@ EOF
|
|
29
30
|
dns_name = record_set.alias_target.dns_name
|
30
31
|
hosted_zone_id = record_set.alias_target.hosted_zone_id
|
31
32
|
template = <<-'EOF'
|
32
|
-
it { should have_record_set('<%=
|
33
|
+
it { should have_record_set('<%= name %>').alias('<%= dns_name %>', '<%= hosted_zone_id %>') }
|
33
34
|
EOF
|
34
35
|
return ERB.new(template, nil, '-').result(binding)
|
35
36
|
end
|
@@ -6,7 +6,7 @@ Aws.config[:route53] = {
|
|
6
6
|
id: '/hostedzone/Z1A2BCDEF34GH5',
|
7
7
|
name: 'example.com.',
|
8
8
|
caller_reference: '',
|
9
|
-
resource_record_set_count:
|
9
|
+
resource_record_set_count: 6
|
10
10
|
}
|
11
11
|
],
|
12
12
|
marker: '',
|
@@ -26,6 +26,16 @@ Aws.config[:route53] = {
|
|
26
26
|
}
|
27
27
|
]
|
28
28
|
},
|
29
|
+
{
|
30
|
+
name: '\052.example.com.',
|
31
|
+
type: 'CNAME',
|
32
|
+
ttl: 3600,
|
33
|
+
resource_records: [
|
34
|
+
{
|
35
|
+
value: 'example.com'
|
36
|
+
}
|
37
|
+
]
|
38
|
+
},
|
29
39
|
{
|
30
40
|
name: 'example.com.',
|
31
41
|
type: 'MX',
|
@@ -14,6 +14,7 @@ module Awspec::Type
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def has_record_set?(name, type, value, options = {})
|
17
|
+
name.gsub!(/\*/, '\\\052') # wildcard support
|
17
18
|
ret = @resource_record_sets.find do |record_set|
|
18
19
|
next if record_set.type != type.upcase
|
19
20
|
options[:ttl] = record_set.ttl unless options[:ttl]
|
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.22.
|
4
|
+
version: 0.22.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k1LoW
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|