roadworker 0.3.3 → 0.3.4

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.
@@ -97,6 +97,11 @@ module Roadworker
97
97
 
98
98
  actual_record = actual.delete(keys)
99
99
 
100
+ if not actual_record and %w(A CNAME).include?(type)
101
+ actual_type = (type == 'A' ? 'CNAME' : 'A')
102
+ actual_record = actual.delete([name, actual_type, set_identifier])
103
+ end
104
+
100
105
  if actual_record
101
106
  unless actual_record.eql?(expected_record)
102
107
  actual_record.update(expected_record)
@@ -19,6 +19,8 @@ module Roadworker
19
19
  :health_check,
20
20
  ]
21
21
 
22
+ RRSET_ATTRS_WITH_TYPE = RRSET_ATTRS + [:type]
23
+
22
24
  def initialize(options)
23
25
  @options = options
24
26
  end
@@ -158,7 +160,7 @@ module Roadworker
158
160
  end
159
161
 
160
162
  def eql?(expected_record)
161
- Route53Wrapper::RRSET_ATTRS.all? do |attr|
163
+ Route53Wrapper::RRSET_ATTRS_WITH_TYPE.all? do |attr|
162
164
  expected = expected_record.send(attr)
163
165
  expected = nil if expected.kind_of?(Array) && expected.empty?
164
166
  actual = self.send(attr)
@@ -189,7 +191,7 @@ module Roadworker
189
191
 
190
192
  log(:info, 'Update ResourceRecordSet', :green, &log_id_proc)
191
193
 
192
- Route53Wrapper::RRSET_ATTRS.each do |attr|
194
+ Route53Wrapper::RRSET_ATTRS_WITH_TYPE.each do |attr|
193
195
  expected = expected_record.send(attr)
194
196
  expected = nil if expected.kind_of?(Array) && expected.empty?
195
197
  actual = self.send(attr)
@@ -1,5 +1,5 @@
1
1
  module Roadworker
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
4
4
 
5
5
  Version = Roadworker::VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roadworker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: