roadworker 0.2.4 → 0.2.5
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.
- data/README.md +7 -0
- data/lib/roadworker/client.rb +1 -1
- data/lib/roadworker/dsl.rb +1 -1
- data/lib/roadworker/route53-ext.rb +1 -1
- data/lib/roadworker/route53-wrapper.rb +7 -4
- data/lib/roadworker/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -76,3 +76,10 @@ info.winebarrel.jp. A:
|
|
76
76
|
actual=127.0.0.1(300),127.0.0.2(300)
|
77
77
|
5 examples, 1 failure
|
78
78
|
```
|
79
|
+
## CI
|
80
|
+
[drone.io](https://drone.io/bitbucket.org/winebarrel/roadworker)
|
81
|
+
|
82
|
+
[](https://drone.io/bitbucket.org/winebarrel/roadworker/latest)
|
83
|
+
|
84
|
+
## Link
|
85
|
+
* [RubyGems.org site](http://rubygems.org/gems/roadworker)
|
data/lib/roadworker/client.rb
CHANGED
@@ -111,7 +111,7 @@ module Roadworker
|
|
111
111
|
collection.each do |item|
|
112
112
|
key_list = keys.map do |k|
|
113
113
|
value = item.send(k)
|
114
|
-
(k == :name && value) ? value.downcase.
|
114
|
+
(k == :name && value) ? value.downcase.sub(/\.\Z/, '') : value
|
115
115
|
end
|
116
116
|
|
117
117
|
hash[key_list] = item
|
data/lib/roadworker/dsl.rb
CHANGED
@@ -68,7 +68,7 @@ module Roadworker
|
|
68
68
|
private
|
69
69
|
|
70
70
|
def resource_record_set(rrset_name, type, &block)
|
71
|
-
if rrset_name.
|
71
|
+
if rrset_name.sub(/\.\Z/, '') !~ /#{Regexp.escape(@name.sub(/\.\Z/, ''))}\Z/i
|
72
72
|
raise "Invalid ResourceRecordSet Name: #{rrset_name}"
|
73
73
|
end
|
74
74
|
|
@@ -50,6 +50,7 @@ module Roadworker
|
|
50
50
|
zone = OpenStruct.new({:name => name, :rrsets => []}.merge(opts))
|
51
51
|
else
|
52
52
|
zone = @hosted_zones.create(name, opts)
|
53
|
+
@options.hosted_zone_name = name
|
53
54
|
@options.updated = true
|
54
55
|
end
|
55
56
|
|
@@ -163,8 +164,8 @@ module Roadworker
|
|
163
164
|
elsif expected and actual
|
164
165
|
case attr
|
165
166
|
when :dns_name
|
166
|
-
expected = expected.downcase.
|
167
|
-
actual = actual.downcase.
|
167
|
+
expected = expected.downcase.sub(/\.\Z/, '')
|
168
|
+
actual = actual.downcase.sub(/\.\Z/, '')
|
168
169
|
end
|
169
170
|
|
170
171
|
(expected == actual)
|
@@ -207,8 +208,10 @@ module Roadworker
|
|
207
208
|
end
|
208
209
|
|
209
210
|
def delete
|
210
|
-
if
|
211
|
-
|
211
|
+
if self.type =~ /\A(SOA|NS)\Z/i
|
212
|
+
hz_name = (@hosted_zone.name || @options.hosted_zone_name).downcase.sub(/\.\Z/, '')
|
213
|
+
rrs_name = @resource_record_set.name.downcase.sub(/\.\Z/, '')
|
214
|
+
return if hz_name == rrs_name
|
212
215
|
end
|
213
216
|
|
214
217
|
log(:info, 'Delete ResourceRecordSet', :red) do
|
data/lib/roadworker/version.rb
CHANGED