roadworker 0.5.11 → 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roadworker/route53-wrapper.rb +17 -2
- data/lib/roadworker/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 954087eeb0c2336152bcc1b2e5508ab1ac508e33df52c02feffb8cdb2973cd7d
|
4
|
+
data.tar.gz: 8d767b2ff8558de226cddfb43c662ce52952a75b7b5fabae89dd14638b555fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67903de0d8b95bd63d4dd0fe4d47a6a882574f10614e95824d30640f208619081a6ff2f21932c70720b9aeb9340527bf786e336d778f6c6fc057e055c62b71dc
|
7
|
+
data.tar.gz: ecce73635cdd3465a21070c16205f7e6df4f87ffd37e08c1c3bf3d9e126cbb85397ad58941f416eb912cf2a4475ef0ec011b88fc6e86e697ac5fea9da3ee3e2c
|
@@ -212,10 +212,10 @@ module Roadworker
|
|
212
212
|
def eql?(expected_record)
|
213
213
|
Route53Wrapper::RRSET_ATTRS_WITH_TYPE.all? do |attribute|
|
214
214
|
expected = expected_record.public_send(attribute)
|
215
|
-
expected = expected
|
215
|
+
expected = sort_rrset_values(attribute, expected) if expected.kind_of?(Array)
|
216
216
|
expected = nil if expected.kind_of?(Array) && expected.empty?
|
217
217
|
actual = self.public_send(attribute)
|
218
|
-
actual = actual
|
218
|
+
actual = sort_rrset_values(attribute, actual) if actual.kind_of?(Array)
|
219
219
|
actual = nil if actual.kind_of?(Array) && actual.empty?
|
220
220
|
|
221
221
|
if attribute == :geo_location and actual
|
@@ -384,6 +384,21 @@ module Roadworker
|
|
384
384
|
|
385
385
|
private
|
386
386
|
|
387
|
+
def sort_rrset_values(attribute, values)
|
388
|
+
sort_lambda =
|
389
|
+
case attribute
|
390
|
+
when :resource_records
|
391
|
+
# After aws-sdk-core v3.44.1, Aws::Route53::Types::ResourceRecord#to_s returns filtered string
|
392
|
+
# like "{:value=>\"[FILTERED]\"}" (cf. https://github.com/aws/aws-sdk-ruby/pull/1941).
|
393
|
+
# To keep backward compatibility, sort by the value of resource record explicitly.
|
394
|
+
lambda { |i| i[:value] }
|
395
|
+
else
|
396
|
+
lambda { |i| i.to_s }
|
397
|
+
end
|
398
|
+
|
399
|
+
values.sort_by(&sort_lambda)
|
400
|
+
end
|
401
|
+
|
387
402
|
def method_missing(method_name, *args)
|
388
403
|
@resource_record_set.send(method_name, *args)
|
389
404
|
end
|
data/lib/roadworker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roadworker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winebarrel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-route53
|
@@ -251,8 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
|
255
|
-
rubygems_version: 2.7.6.2
|
254
|
+
rubygems_version: 3.0.3
|
256
255
|
signing_key:
|
257
256
|
specification_version: 4
|
258
257
|
summary: Roadworker is a tool to manage Route53.
|