hash_diff 1.1.0 → 1.1.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
  SHA256:
3
- metadata.gz: 8ef02ebe0aac07af77b8e597a40b218c4b2f20c53f3f895fc131d07961a38011
4
- data.tar.gz: 7b03cd799b1f0a5eded66d91d5ed0f9b882ef38e26fec1c004568d71e5e68d0b
3
+ metadata.gz: 3bbc5462057be5bab5b5e0eb46aa0b8d3fc3b41990b2ea0374f24210d0ecfe1b
4
+ data.tar.gz: 60e2db4d4acb464a958e72599ca76fff28c7e3b447816a7f78afa330b626cd31
5
5
  SHA512:
6
- metadata.gz: 0e29131dc0ebf4b1e61997526c45ec123ac1ad3fa1f6182bd147e45586d4caa251ae113ebd7273efb5a107207ae6733688be1d3eb43712d1d79547754ceec13c
7
- data.tar.gz: d37b0e72862bdb28550c8b481bdf03e377b7e2e20473b4111f444bc3c19f3402d1cd4eba0b92b1c22083ad1b211760f84c204c40247a08b37be6f50a928b6e64
6
+ metadata.gz: bed9aa1ff38395a905043e6a013767f96f75ccf4dedd97f04ae6b2762e11543f6c98b42ff02fd8d9fb9781e7939caa864feadb366b479912dda565f0da42784c
7
+ data.tar.gz: 1943c3599f521e68e68925e48e04b718990523b89d9c7eaa4105c7112c074abf81913559335d4b4ecda3ccc406ec1107e5295b3cad331b1ee514f265edee6db8
@@ -35,7 +35,7 @@ module HashDiff
35
35
 
36
36
  def combined_keys
37
37
  if hash?(left) && hash?(right) then
38
- (left.keys + right.keys).uniq.sort
38
+ (left.keys + right.keys).uniq
39
39
  elsif array?(left) && array?(right) then
40
40
  (0..[left.size, right.size].max).to_a
41
41
  else
@@ -1,3 +1,3 @@
1
1
  module HashDiff
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -72,6 +72,19 @@ describe HashDiff::Comparison do
72
72
  it { expect(subject).to be_empty }
73
73
  end
74
74
  end
75
+
76
+ context "when hashes have both symbol and string keys" do
77
+ let(:app_v1_properties) { { foo: "bar" } }
78
+ let(:app_v2_properties) { { "foo" => "bar" } }
79
+ let(:diff) do
80
+ {
81
+ foo: ["bar", HashDiff::NO_VALUE],
82
+ "foo" => [HashDiff::NO_VALUE, "bar"]
83
+ }
84
+ end
85
+
86
+ it { expect(subject).to eq(diff) }
87
+ end
75
88
  end
76
89
 
77
90
  describe "#left_diff" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coding Zeal
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-08-23 00:00:00.000000000 Z
13
+ date: 2022-08-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler