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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5826fc752a18415d0c92fb3426ef3357d4d460787d65df3a7f9b69d69ddfea2a
4
- data.tar.gz: ecb791ea4220d52b3bf61e17ec66de21d91500dacde413c4704fa3d0d294fd2f
3
+ metadata.gz: 954087eeb0c2336152bcc1b2e5508ab1ac508e33df52c02feffb8cdb2973cd7d
4
+ data.tar.gz: 8d767b2ff8558de226cddfb43c662ce52952a75b7b5fabae89dd14638b555fb3
5
5
  SHA512:
6
- metadata.gz: ad687493ff7fdd01196bc5028aaf32347ec83375c22cb65bcb3318e4a7576b772618ab7410d69d94f7410e85e1582d3f45da839122ddeae46a1af4f83851b5d0
7
- data.tar.gz: 20a22e0f56076d934c84b88a29c54a19f54f9cfa1519339021f9affa294a25f81737b9c57882f32986cc8ce1903fb9c97cd9fdd06a769b7c7b87a044e1e9cd93
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.sort_by {|i| i.to_s } if expected.kind_of?(Array)
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.sort_by {|i| i.to_s } if actual.kind_of?(Array)
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
@@ -1,3 +1,3 @@
1
1
  module Roadworker
2
- VERSION = "0.5.11"
2
+ VERSION = "0.5.12"
3
3
  end
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.11
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-25 00:00:00.000000000 Z
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
- rubyforge_project:
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.