hashdiff 0.3.1 → 0.3.2

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
  SHA1:
3
- metadata.gz: 47874e343c8689f4bef1893d4d855a9e606d96d8
4
- data.tar.gz: a94c89c5a54b9bbef455ba24abcccefdc19bbae6
3
+ metadata.gz: dcd0946386679f0615a194c4114df01e7b1c84f8
4
+ data.tar.gz: 2020d0351371a98794d976daec63cea9784628f2
5
5
  SHA512:
6
- metadata.gz: 6d24313cccba03484ba19fb169676451850786a3d4683631dba275b4da78731fa5251adfb39b8e3c03b7e1388685fad2d7341028888f8198318a5e7d5b4bcb5e
7
- data.tar.gz: 62b2ab8565244c3f09f872f00447b837c413f1be2e8275e1f4153e5b3d3fcb1528768f36e0e205d2a24d9742348e70d331a37e40355e79d551f3aa51a411d8b3
6
+ metadata.gz: 3ca84a8e6fd0309147c0ecf7e70cf844e43ac5568201bfd73c9f579761721fdd3fa927b824ac68262237e661aa6bdfe44ca31f8e7c8d7e9e622e5b502de20ec7
7
+ data.tar.gz: 43f88705f7deca4b95b9cd438e46a8594e05872b33602d24c1166920665ff8b373ff75261a96d133620f6e36956b5d1df21d8b5310891620fbe24974e0e4c600
@@ -3,5 +3,8 @@ language: ruby
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - 2.1.1
6
+ - 2.1.10
7
+ - 2.2.6
8
+ - 2.3.3
9
+ - 2.4.0
7
10
  script: "bundle exec rake spec"
data/Gemfile CHANGED
@@ -2,5 +2,5 @@ source "http://rubygems.org"
2
2
  gemspec
3
3
 
4
4
  group :test do
5
- gem 'rake'
5
+ gem 'rake', '< 11'
6
6
  end
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## v0.3.2 2016-12-27
4
+
5
+ * replace `Fixnum` by `Integer` #28
6
+
3
7
  ## v0.3.1 2016-11-24
4
8
 
5
9
  * fix an error when a hash has mixed types #26
@@ -7,7 +7,7 @@ module HashDiff
7
7
  # @param [Array, Hash] obj1
8
8
  # @param [Array, Hash] obj2
9
9
  # @param [Hash] options the options to use when comparing
10
- # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Fixnum, Float, BigDecimal to each other
10
+ # * :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
11
11
  # * :delimiter (String) ['.'] the delimiter used when returning nested key references
12
12
  # * :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.
13
13
  # * :strip (Boolean) [false] whether or not to call #strip on strings before comparing
@@ -48,7 +48,7 @@ module HashDiff
48
48
  # @param [Array, Hash] obj1
49
49
  # @param [Array, Hash] obj2
50
50
  # @param [Hash] options the options to use when comparing
51
- # * :strict (Boolean) [true] whether numeric values will be compared on type as well as value. Set to false to allow comparing Fixnum, Float, BigDecimal to each other
51
+ # * :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
52
52
  # * :similarity (Numeric) [0.8] should be between (0, 1]. Meaningful if there are similar hashes in arrays. See {best_diff}.
53
53
  # * :delimiter (String) ['.'] the delimiter used when returning nested key references
54
54
  # * :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.
@@ -23,13 +23,13 @@ module HashDiff
23
23
  parent_node = node(obj, parts[0, parts.size-1])
24
24
 
25
25
  if change[0] == '+'
26
- if last_part.is_a?(Fixnum)
26
+ if last_part.is_a?(Integer)
27
27
  parent_node.insert(last_part, change[2])
28
28
  else
29
29
  parent_node[last_part] = change[2]
30
30
  end
31
31
  elsif change[0] == '-'
32
- if last_part.is_a?(Fixnum)
32
+ if last_part.is_a?(Integer)
33
33
  parent_node.delete_at(last_part)
34
34
  else
35
35
  parent_node.delete(last_part)
@@ -62,13 +62,13 @@ module HashDiff
62
62
  parent_node = node(obj, parts[0, parts.size-1])
63
63
 
64
64
  if change[0] == '+'
65
- if last_part.is_a?(Fixnum)
65
+ if last_part.is_a?(Integer)
66
66
  parent_node.delete_at(last_part)
67
67
  else
68
68
  parent_node.delete(last_part)
69
69
  end
70
70
  elsif change[0] == '-'
71
- if last_part.is_a?(Fixnum)
71
+ if last_part.is_a?(Integer)
72
72
  parent_node.insert(last_part, change[2])
73
73
  else
74
74
  parent_node[last_part] = change[2]
@@ -1,3 +1,3 @@
1
1
  module HashDiff
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  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: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liu Fengyun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-24 00:00:00.000000000 Z
11
+ date: 2016-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec