hashdiff 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +12 -0
- data/Gemfile +1 -1
- data/README.md +37 -14
- data/changelog.md +12 -0
- data/hashdiff.gemspec +3 -3
- data/lib/hashdiff/compare_hashes.rb +16 -1
- data/lib/hashdiff/diff.rb +8 -0
- data/lib/hashdiff/util.rb +2 -1
- data/lib/hashdiff/version.rb +1 -1
- data/spec/hashdiff/diff_spec.rb +20 -0
- data/spec/hashdiff/readme_spec.rb +15 -0
- data/spec/hashdiff/util_spec.rb +21 -0
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 56a70b8fb995b7d778a1840400c42303c34648a9205055b11157a5b69208afa1
|
4
|
+
data.tar.gz: 410e1bea7bc27e43f4580c42ff17054e1ce57dc3c3f486fe570269e366c7ecb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30e90e14ee676c7b035a20d01f5f8cf5dfcdae7319f652bd828c6fcc8d66a4e6b0cb8fd046937ce09a38aac8e7c3eba92dfc60b8ea2e09674eb9c8ea35256e9a
|
7
|
+
data.tar.gz: 146cc4564d22ee6c6ef47b09032e4e171cd2682ecd941e798bd729bea7d3e8a10974356e39500886bd6ec4d0d3d6c109d2e6556bbe47abc7b79a9c9d45db66e4
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require: rubocop-rspec
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.0 # always the lowest version we support
|
2
4
|
Metrics/PerceivedComplexity:
|
3
5
|
Enabled: false
|
4
6
|
Metrics/CyclomaticComplexity:
|
@@ -15,14 +17,24 @@ Metrics/BlockLength:
|
|
15
17
|
Enabled: false
|
16
18
|
Metrics/ModuleLength:
|
17
19
|
Enabled: false
|
20
|
+
Style/CaseLikeIf:
|
21
|
+
Enabled: false
|
18
22
|
Style/Documentation:
|
19
23
|
Enabled: false
|
20
24
|
Style/FrozenStringLiteralComment:
|
21
25
|
Enabled: true
|
22
26
|
EnforcedStyle: always
|
27
|
+
Style/OptionalBooleanParameter:
|
28
|
+
Enabled: false
|
23
29
|
Style/NumericPredicate:
|
24
30
|
Enabled: false
|
25
31
|
Style/RedundantFreeze:
|
26
32
|
Enabled: false
|
33
|
+
Style/RedundantReturn:
|
34
|
+
Enabled: false
|
27
35
|
RSpec/ExampleLength:
|
28
36
|
Enabled: false
|
37
|
+
RSpec/DescribeClass:
|
38
|
+
Enabled: false
|
39
|
+
RSpec/FilePath:
|
40
|
+
Enabled: false
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -32,7 +32,7 @@ Hashdiff answers the question above using an opinionated approach:
|
|
32
32
|
|
33
33
|
To use the gem, add the following to your Gemfile:
|
34
34
|
|
35
|
-
```
|
35
|
+
```Ruby
|
36
36
|
gem 'hashdiff'
|
37
37
|
```
|
38
38
|
|
@@ -94,9 +94,8 @@ Hashdiff.unpatch!(b, diff).should == a
|
|
94
94
|
|
95
95
|
### Options
|
96
96
|
|
97
|
-
|
98
|
-
`:
|
99
|
-
and `:use_lcs`
|
97
|
+
The following options are available: `:delimiter`, `:similarity`, `:strict`, `:ignore_keys`,
|
98
|
+
`:indifferent`, `:numeric_tolerance`, `:strip`, `:case_insensitive`, `:array_path` and `:use_lcs`
|
100
99
|
|
101
100
|
#### `:delimiter`
|
102
101
|
|
@@ -106,7 +105,7 @@ You can specify `:delimiter` to be something other than the default dot. For exa
|
|
106
105
|
a = {a:{x:2, y:3, z:4}, b:{x:3, z:45}}
|
107
106
|
b = {a:{y:3}, b:{y:3, z:30}}
|
108
107
|
|
109
|
-
diff = Hashdiff.diff(a, b, :
|
108
|
+
diff = Hashdiff.diff(a, b, delimiter: '\t')
|
110
109
|
diff.should == [['-', 'a\tx', 2], ['-', 'a\tz', 4], ['-', 'b\tx', 3], ['~', 'b\tz', 45, 30], ['+', 'b\ty', 3]]
|
111
110
|
```
|
112
111
|
|
@@ -118,6 +117,30 @@ In cases where you have similar hash objects in arrays, you can pass a custom va
|
|
118
117
|
|
119
118
|
The `:strict` option, which defaults to `true`, specifies whether numeric types are compared on type as well as value. By default, an Integer will never be equal to a Float (e.g. 4 != 4.0). Setting `:strict` to false makes the comparison looser (e.g. 4 == 4.0).
|
120
119
|
|
120
|
+
#### `:ignore_keys`
|
121
|
+
|
122
|
+
The `:ignore_keys` option allows you to specify one or more keys to ignore, which defaults to `[]` (none). Ignored keys are ignored at all levels. For example:
|
123
|
+
|
124
|
+
```ruby
|
125
|
+
a = { a: 1, b: { d: 2, a: 3 }, c: 4 }
|
126
|
+
b = { a: 2, b: { d: 2, a: 7 }, c: 5 }
|
127
|
+
diff = Hashdiff.diff(a, b, ignore_keys: :a)
|
128
|
+
diff.should == [['~', 'c', 4, 5]]
|
129
|
+
```
|
130
|
+
If you wish instead to ignore keys at a particlar level you should
|
131
|
+
use a [custom comparison method](https://github.com/liufengyun/hashdiff#specifying-a-custom-comparison-method) instead. For example:
|
132
|
+
|
133
|
+
```ruby
|
134
|
+
a = { a: 1, b: { d: 2, a: 3 }, c: 4 }
|
135
|
+
b = { a: 2, b: { d: 2, a: 7 }, c: 5 }
|
136
|
+
diff = Hashdiff.diff(a, b) { |path, _e, _a| true if path == 'b.a' } # note '.' is the default delimiter
|
137
|
+
diff.should == [['~', 'a', 1, 2], ['~', 'c', 4, 5]]
|
138
|
+
```
|
139
|
+
|
140
|
+
#### `:indifferent`
|
141
|
+
|
142
|
+
The `:indifferent` option, which defaults to `false`, specifies whether to treat hash keys indifferently. Setting `:indifferent` to true has the effect of ignoring differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
|
143
|
+
|
121
144
|
#### `:numeric_tolerance`
|
122
145
|
|
123
146
|
The :numeric_tolerance option allows for a small numeric tolerance.
|
@@ -126,7 +149,7 @@ The :numeric_tolerance option allows for a small numeric tolerance.
|
|
126
149
|
a = {x:5, y:3.75, z:7}
|
127
150
|
b = {x:6, y:3.76, z:7}
|
128
151
|
|
129
|
-
diff = Hashdiff.diff(a, b, :
|
152
|
+
diff = Hashdiff.diff(a, b, numeric_tolerance: 0.1)
|
130
153
|
diff.should == [["~", "x", 5, 6]]
|
131
154
|
```
|
132
155
|
|
@@ -138,7 +161,7 @@ The :strip option strips all strings before comparing.
|
|
138
161
|
a = {x:5, s:'foo '}
|
139
162
|
b = {x:6, s:'foo'}
|
140
163
|
|
141
|
-
diff = Hashdiff.diff(a, b, :
|
164
|
+
diff = Hashdiff.diff(a, b, numeric_tolerance: 0.1, strip: true)
|
142
165
|
diff.should == [["~", "x", 5, 6]]
|
143
166
|
```
|
144
167
|
|
@@ -150,7 +173,7 @@ The :case_insensitive option makes string comparisons ignore case.
|
|
150
173
|
a = {x:5, s:'FooBar'}
|
151
174
|
b = {x:6, s:'foobar'}
|
152
175
|
|
153
|
-
diff = Hashdiff.diff(a, b, :
|
176
|
+
diff = Hashdiff.diff(a, b, numeric_tolerance: 0.1, case_insensitive: true)
|
154
177
|
diff.should == [["~", "x", 5, 6]]
|
155
178
|
```
|
156
179
|
|
@@ -164,7 +187,7 @@ is useful for `patch!` when used on hashes without string keys.
|
|
164
187
|
a = {x:5}
|
165
188
|
b = {'x'=>6}
|
166
189
|
|
167
|
-
diff = Hashdiff.diff(a, b, :
|
190
|
+
diff = Hashdiff.diff(a, b, array_path: true)
|
168
191
|
diff.should == [['-', [:x], 5], ['+', ['x'], 6]]
|
169
192
|
```
|
170
193
|
|
@@ -173,7 +196,7 @@ For cases where there are arrays in paths their index will be added to the path.
|
|
173
196
|
a = {x:[0,1]}
|
174
197
|
b = {x:[0,2]}
|
175
198
|
|
176
|
-
diff = Hashdiff.diff(a, b, :
|
199
|
+
diff = Hashdiff.diff(a, b, array_path: true)
|
177
200
|
diff.should == [["-", [:x, 1], 1], ["+", [:x, 1], 2]]
|
178
201
|
```
|
179
202
|
|
@@ -183,7 +206,7 @@ This shouldn't cause problems if you are comparing an array with a hash:
|
|
183
206
|
a = {x:{0=>1}}
|
184
207
|
b = {x:[1]}
|
185
208
|
|
186
|
-
diff = Hashdiff.diff(a, b, :
|
209
|
+
diff = Hashdiff.diff(a, b, array_path: true)
|
187
210
|
diff.should == [["~", [:x], {0=>1}, [1]]]
|
188
211
|
```
|
189
212
|
|
@@ -205,7 +228,7 @@ Note, currently the :similarity option has no effect when :use_lcs is false.
|
|
205
228
|
a = {x: [0, 1, 2]}
|
206
229
|
b = {x: [0, 2, 2, 3]}
|
207
230
|
|
208
|
-
diff = Hashdiff.diff(a, b, :
|
231
|
+
diff = Hashdiff.diff(a, b, use_lcs: false)
|
209
232
|
diff.should == [["~", "x[1]", 1, 2], ["+", "x[3]", 3]]
|
210
233
|
```
|
211
234
|
|
@@ -255,11 +278,11 @@ An order difference alone between two arrays can create too many diffs to be use
|
|
255
278
|
a = {a:'car', b:['boat', 'plane'] }
|
256
279
|
b = {a:'car', b:['plane', 'boat'] }
|
257
280
|
|
258
|
-
Hashdiff.diff(a, b)
|
281
|
+
Hashdiff.diff(a, b).should == [["+", "b[0]", "plane"], ["-", "b[2]", "plane"]]
|
259
282
|
|
260
283
|
b[:b].sort!
|
261
284
|
|
262
|
-
Hashdiff.diff(a, b)
|
285
|
+
Hashdiff.diff(a, b).should == []
|
263
286
|
```
|
264
287
|
|
265
288
|
## Maintainers
|
data/changelog.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## v1.1.0 2020-02-25
|
4
|
+
|
5
|
+
* Add ignore_keys option (#86 @Matzfan)
|
6
|
+
* Remove pinned version of rake < 11
|
7
|
+
* Bump rspec dep ~> 3.5
|
8
|
+
* Bump rubocop dep >= 1.52.1
|
9
|
+
* Bump rubocop-rspec dep > 1.16.0
|
10
|
+
|
11
|
+
## v1.0.1 2020-02-25
|
12
|
+
|
13
|
+
* Add indifferent option
|
14
|
+
|
3
15
|
## v1.0.0 2019-06-06
|
4
16
|
|
5
17
|
* Fix typo in readme (#72 @koic)
|
data/hashdiff.gemspec
CHANGED
@@ -22,9 +22,9 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.homepage = 'https://github.com/liufengyun/hashdiff'
|
23
23
|
|
24
24
|
s.add_development_dependency('bluecloth')
|
25
|
-
s.add_development_dependency('rspec', '~>
|
26
|
-
s.add_development_dependency('rubocop')
|
27
|
-
s.add_development_dependency('rubocop-rspec')
|
25
|
+
s.add_development_dependency('rspec', '~> 3.5')
|
26
|
+
s.add_development_dependency('rubocop', '>= 1.52.1') # earliest version that works with Ruby 3.3
|
27
|
+
s.add_development_dependency('rubocop-rspec', '> 1.16.0') # https://github.com/rubocop/rubocop-rspec/issues/461
|
28
28
|
s.add_development_dependency('yard')
|
29
29
|
|
30
30
|
if s.respond_to?(:metadata)
|
@@ -10,6 +10,15 @@ module Hashdiff
|
|
10
10
|
|
11
11
|
obj1_keys = obj1.keys
|
12
12
|
obj2_keys = obj2.keys
|
13
|
+
obj1_lookup = {}
|
14
|
+
obj2_lookup = {}
|
15
|
+
|
16
|
+
if opts[:indifferent]
|
17
|
+
obj1_lookup = obj1_keys.each_with_object({}) { |k, h| h[k.to_s] = k }
|
18
|
+
obj2_lookup = obj2_keys.each_with_object({}) { |k, h| h[k.to_s] = k }
|
19
|
+
obj1_keys = obj1_keys.map { |k| k.is_a?(Symbol) ? k.to_s : k }
|
20
|
+
obj2_keys = obj2_keys.map { |k| k.is_a?(Symbol) ? k.to_s : k }
|
21
|
+
end
|
13
22
|
|
14
23
|
added_keys = (obj2_keys - obj1_keys).sort_by(&:to_s)
|
15
24
|
common_keys = (obj1_keys & obj2_keys).sort_by(&:to_s)
|
@@ -17,8 +26,11 @@ module Hashdiff
|
|
17
26
|
|
18
27
|
result = []
|
19
28
|
|
29
|
+
opts[:ignore_keys].each { |k| common_keys.delete k }
|
30
|
+
|
20
31
|
# add deleted properties
|
21
32
|
deleted_keys.each do |k|
|
33
|
+
k = opts[:indifferent] ? obj1_lookup[k] : k
|
22
34
|
change_key = Hashdiff.prefix_append_key(opts[:prefix], k, opts)
|
23
35
|
custom_result = Hashdiff.custom_compare(opts[:comparison], change_key, obj1[k], nil)
|
24
36
|
|
@@ -33,13 +45,16 @@ module Hashdiff
|
|
33
45
|
common_keys.each do |k|
|
34
46
|
prefix = Hashdiff.prefix_append_key(opts[:prefix], k, opts)
|
35
47
|
|
36
|
-
|
48
|
+
k1 = opts[:indifferent] ? obj1_lookup[k] : k
|
49
|
+
k2 = opts[:indifferent] ? obj2_lookup[k] : k
|
50
|
+
result.concat(Hashdiff.diff(obj1[k1], obj2[k2], opts.merge(prefix: prefix)))
|
37
51
|
end
|
38
52
|
|
39
53
|
# added properties
|
40
54
|
added_keys.each do |k|
|
41
55
|
change_key = Hashdiff.prefix_append_key(opts[:prefix], k, opts)
|
42
56
|
|
57
|
+
k = opts[:indifferent] ? obj2_lookup[k] : k
|
43
58
|
custom_result = Hashdiff.custom_compare(opts[:comparison], change_key, nil, obj2[k])
|
44
59
|
|
45
60
|
if custom_result
|
data/lib/hashdiff/diff.rb
CHANGED
@@ -9,6 +9,8 @@ module Hashdiff
|
|
9
9
|
# @param [Array, Hash] obj2
|
10
10
|
# @param [Hash] options the options to use when comparing
|
11
11
|
# * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
|
12
|
+
# * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s)
|
13
|
+
# * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
|
12
14
|
# * :delimiter (String) ['.'] the delimiter used when returning nested key references
|
13
15
|
# * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
|
14
16
|
# * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
|
@@ -52,6 +54,8 @@ module Hashdiff
|
|
52
54
|
# @param [Array, Hash] obj2
|
53
55
|
# @param [Hash] options the options to use when comparing
|
54
56
|
# * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Integer, Float, BigDecimal to each other
|
57
|
+
# * :ignore_keys (Symbol, String or Array) [[]] a list of keys to ignore. No comparison is made for the specified key(s)
|
58
|
+
# * :indifferent (Boolean) [false] whether to treat hash keys indifferently. Set to true to ignore differences between symbol keys (ie. {a: 1} ~= {'a' => 1})
|
55
59
|
# * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}.
|
56
60
|
# * :delimiter (String) ['.'] the delimiter used when returning nested key references
|
57
61
|
# * :numeric_tolerance (Numeric) [0] should be a positive numeric value. Value by which numeric differences must be greater than. By default, numeric values are compared exactly; with the :tolerance option, the difference between numeric values must be greater than the given value.
|
@@ -79,6 +83,8 @@ module Hashdiff
|
|
79
83
|
similarity: 0.8,
|
80
84
|
delimiter: '.',
|
81
85
|
strict: true,
|
86
|
+
ignore_keys: [],
|
87
|
+
indifferent: false,
|
82
88
|
strip: false,
|
83
89
|
numeric_tolerance: 0,
|
84
90
|
array_path: false,
|
@@ -87,6 +93,8 @@ module Hashdiff
|
|
87
93
|
|
88
94
|
opts[:prefix] = [] if opts[:array_path] && opts[:prefix] == ''
|
89
95
|
|
96
|
+
opts[:ignore_keys] = [*opts[:ignore_keys]] # splat covers single sym/string case
|
97
|
+
|
90
98
|
opts[:comparison] = block if block_given?
|
91
99
|
|
92
100
|
# prefer to compare with provided block
|
data/lib/hashdiff/util.rb
CHANGED
@@ -16,7 +16,7 @@ module Hashdiff
|
|
16
16
|
|
17
17
|
diffs = count_diff diff(obja, objb, opts)
|
18
18
|
|
19
|
-
(1 - diffs
|
19
|
+
(1 - diffs / (count_a + count_b).to_f) >= opts[:similarity]
|
20
20
|
end
|
21
21
|
|
22
22
|
# @private
|
@@ -107,6 +107,7 @@ module Hashdiff
|
|
107
107
|
# check if objects are comparable
|
108
108
|
def self.comparable?(obj1, obj2, strict = true)
|
109
109
|
return true if (obj1.is_a?(Array) || obj1.is_a?(Hash)) && obj2.is_a?(obj1.class)
|
110
|
+
return true if (obj2.is_a?(Array) || obj2.is_a?(Hash)) && obj1.is_a?(obj2.class)
|
110
111
|
return true if !strict && obj1.is_a?(Numeric) && obj2.is_a?(Numeric)
|
111
112
|
|
112
113
|
obj1.is_a?(obj2.class) && obj2.is_a?(obj1.class)
|
data/lib/hashdiff/version.rb
CHANGED
data/spec/hashdiff/diff_spec.rb
CHANGED
@@ -49,6 +49,26 @@ describe Hashdiff do
|
|
49
49
|
diff.should == []
|
50
50
|
end
|
51
51
|
|
52
|
+
context 'with the ignore_keys option' do
|
53
|
+
a = { a: 1, b: { d: 2, a: 3 }, c: 4 }
|
54
|
+
b = { a: 2, b: { d: 2, a: 7 }, c: 5 }
|
55
|
+
|
56
|
+
it 'ignores a single key' do
|
57
|
+
diff = described_class.diff(a, b, ignore_keys: :a)
|
58
|
+
diff.should == [['~', 'c', 4, 5]]
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'ignores an array of keys' do
|
62
|
+
diff = described_class.diff(a, b, ignore_keys: %i[a c])
|
63
|
+
diff.should == []
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'ignores string vs symbol differences, when indifferent is true' do
|
68
|
+
diff = described_class.diff({ 'a' => 2, :b => 2 }, { :a => 2, 'b' => 2, :c => 3 }, indifferent: true)
|
69
|
+
diff.should == [['+', 'c', 3]]
|
70
|
+
end
|
71
|
+
|
52
72
|
it 'is able to diff changes in hash value' do
|
53
73
|
diff = described_class.diff({ 'a' => 2, 'b' => 3, 'c' => ' hello' }, 'a' => 2, 'b' => 4, 'c' => 'hello')
|
54
74
|
diff.should == [['~', 'b', 3, 4], ['~', 'c', ' hello', 'hello']]
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe 'README.md' do
|
6
|
+
it 'has correct examples' do
|
7
|
+
File.read('README.md').scan(/```ruby(.*?)```/m).flatten(1).each do |block|
|
8
|
+
begin
|
9
|
+
eval block # rubocop:disable Security/Eval
|
10
|
+
rescue Exception => e # rubocop:disable Lint/RescueException
|
11
|
+
raise "README.md code block:\n#{block}\n\nhas error:\n#{e}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/spec/hashdiff/util_spec.rb
CHANGED
@@ -68,6 +68,7 @@ describe Hashdiff do
|
|
68
68
|
it 'compares different objects without tolerance' do
|
69
69
|
expect(described_class.compare_values('hats', 'ninjas')).to be false
|
70
70
|
end
|
71
|
+
|
71
72
|
it 'compares other objects with tolerance' do
|
72
73
|
expect(described_class.compare_values('hats', 'ninjas', numeric_tolerance: 0.01)).to be false
|
73
74
|
end
|
@@ -92,4 +93,24 @@ describe Hashdiff do
|
|
92
93
|
expect(described_class.compare_values('horse', 'Horse', case_insensitive: true)).to be true
|
93
94
|
end
|
94
95
|
end
|
96
|
+
|
97
|
+
describe '.comparable?' do
|
98
|
+
it 'identifies hashes as comparable' do
|
99
|
+
expect(described_class.comparable?({}, {})).to be true
|
100
|
+
end
|
101
|
+
|
102
|
+
it 'identifies a subclass of Hash to be comparable with a Hash' do
|
103
|
+
other = Class.new(Hash)
|
104
|
+
expect(described_class.comparable?(other.new, {})).to be true
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'identifies a Hash to be comparable with a subclass of Hash' do
|
108
|
+
other = Class.new(Hash)
|
109
|
+
expect(described_class.comparable?({}, other.new)).to be true
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'does not identify a Numeric as comparable with a Hash' do
|
113
|
+
expect(described_class.comparable?(1, {})).to be false
|
114
|
+
end
|
115
|
+
end
|
95
116
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashdiff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Liu Fengyun
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bluecloth
|
@@ -30,42 +30,42 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3.5'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.52.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.52.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.16.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.16.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- spec/hashdiff/lcs_spec.rb
|
115
115
|
- spec/hashdiff/linear_compare_array_spec.rb
|
116
116
|
- spec/hashdiff/patch_spec.rb
|
117
|
+
- spec/hashdiff/readme_spec.rb
|
117
118
|
- spec/hashdiff/util_spec.rb
|
118
119
|
- spec/spec_helper.rb
|
119
120
|
homepage: https://github.com/liufengyun/hashdiff
|
@@ -125,7 +126,7 @@ metadata:
|
|
125
126
|
documentation_uri: https://www.rubydoc.info/gems/hashdiff
|
126
127
|
homepage_uri: https://github.com/liufengyun/hashdiff
|
127
128
|
source_code_uri: https://github.com/liufengyun/hashdiff
|
128
|
-
post_install_message:
|
129
|
+
post_install_message:
|
129
130
|
rdoc_options: []
|
130
131
|
require_paths:
|
131
132
|
- lib
|
@@ -140,9 +141,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
141
|
- !ruby/object:Gem::Version
|
141
142
|
version: '0'
|
142
143
|
requirements: []
|
143
|
-
|
144
|
-
|
145
|
-
signing_key:
|
144
|
+
rubygems_version: 3.4.10
|
145
|
+
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: Hashdiff is a diff lib to compute the smallest difference between two hashes.
|
148
148
|
test_files: []
|