diff_matcher 2.8.1 → 2.9.0

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: a39a9962e5431cf3cbacda911c0154150733fd65510c5840ab9c67a87bb05991
4
- data.tar.gz: 6b6cc7b445d393cbe1d2644de6b15ba78268e68f70b97934f8e1b4b868e29ec9
3
+ metadata.gz: 495d4f1b78ec86cfc1277cb6f49184ae39e08ae5677f7999f257d6ecc6cea84e
4
+ data.tar.gz: 119b345f08ab99fce59abf6c7dc5498c528698d4feae06cc04a8fa27526163e8
5
5
  SHA512:
6
- metadata.gz: 50f9c16a0a4f4012b8df6a79e2f2f1ac9133a565c7e8746949a4259ddd8a42bea14478f9423f26ed76abc6c6a1772ab78264576dd37d1497ca7cc9afc75c8a79
7
- data.tar.gz: 89f284d344accf4a9aeb1d5b75cb20ab9466683601dd31d99d4b588325eaa7793d1a43c614ed33780078e285e7c3395108ad02386cc8a8ea8b6a101dde7b0c26
6
+ metadata.gz: 02dd0661dbdcc8dd89244d2c8854ae1b46d79ca488b0131f47f15567e2ffa4aec99a5891f504adfb301e06c670a1a929c17e2073a24250153b7fd27f869e4a53
7
+ data.tar.gz: 513d91d2eebd759b24b131170bef0395b8ac89ae6801bae2e00ea02a68aee5bfe8c89c37f2780aae2617a44d0ba31bda43f4333742c27dc3a30251aa7584896f
data/.travis.yml CHANGED
@@ -1,18 +1,13 @@
1
1
  rvm:
2
- # - 1.8.6 # travis no longer supports this https://twitter.com/#!/travisci/status/114926454122364928
3
- - 1.8.7
4
- # - 1.9.1 # travis no longer supports this https://twitter.com/#!/travisci/status/114926454122364928
5
- - 1.9.2
6
- - 1.9.3
7
- - rbx
8
- - rbx-19mode
9
- - rbx-2
10
- - jruby
11
- - ree
12
2
  - 2.0.0
13
3
  - 2.1
14
4
  - 2.2
15
5
  - 2.3.0
6
+ - 2.4.0
7
+ - 2.5.0
8
+ - 2.6.0
9
+ - 2.7.0
10
+ - 3.0.0
16
11
  - ruby-head
17
12
 
18
13
  before_install:
@@ -20,7 +15,3 @@ before_install:
20
15
 
21
16
  matrix:
22
17
  fast_finish: true
23
- allow_failures:
24
- - rvm: rbx
25
- - rvm: rbx-19mode
26
- - rvm: rbx-2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ### v2.9.0
4
+
5
+ * Resolve Fixnum deprecation warnings with Ruby 2.4+
6
+
7
+ ### v2.8.1
8
+
9
+ * Create shared CLI module
10
+
3
11
  ### v2.8.0
4
12
 
5
13
  * Add new diff-* executables for matching JSON & CSV files on the command line
@@ -53,7 +53,7 @@ module DiffMatcher
53
53
  opts = expected_opts(e)
54
54
  size = opts[:size]
55
55
  case size
56
- when Fixnum
56
+ when 0.class
57
57
  min = size
58
58
  max = size
59
59
  when Range
@@ -1,3 +1,3 @@
1
1
  module DiffMatcher
2
- VERSION = "2.8.1"
2
+ VERSION = "2.9.0"
3
3
  end
@@ -42,8 +42,8 @@ end
42
42
 
43
43
  describe DiffMatcher::Matcher do
44
44
  expected, expected2, same, different, difference =
45
- {:nombre => String , :edad => Integer },
46
- {:name => String , :age => Integer },
45
+ {:nombre => String , :edad => 0.class },
46
+ {:name => String , :age => 0.class },
47
47
  {:name => "Peter" , :age => 21 },
48
48
  {:name => 21 , :age => 21 },
49
49
  "{\n :name=>\e[31m- \e[1mString\e[0m\e[33m+ \e[1m21\e[0m,\n :age=>\e[34m: \e[1m21\e[0m\n}\n"
@@ -126,7 +126,7 @@ describe "DiffMatcher::Matcher[expected].diff(actual, opts)" do
126
126
  subject { DiffMatcher::Matcher[expected].diff(actual, opts) }
127
127
 
128
128
  describe "when expected is an instance," do
129
- context "of Fixnum," do
129
+ context "of Integer," do
130
130
  expected, same, different =
131
131
  1,
132
132
  1,
@@ -140,7 +140,7 @@ describe "DiffMatcher::Matcher[expected].diff(actual, opts)" do
140
140
  describe "when expected is an instance," do
141
141
  context "of Hash, with optional keys" do
142
142
  expected, same, different =
143
- {:a=>1, :b=>Fixnum},
143
+ {:a=>1, :b=>0.class},
144
144
  {:a=>1},
145
145
  {:a=>2}
146
146
 
@@ -156,7 +156,7 @@ describe "DiffMatcher::difference(expected, actual, opts)" do
156
156
  subject { DiffMatcher::difference(expected, actual, opts) }
157
157
 
158
158
  describe "when expected is an instance," do
159
- context "of Fixnum," do
159
+ context "of Integer," do
160
160
  expected, same, different =
161
161
  1,
162
162
  1,
@@ -534,7 +534,7 @@ describe "DiffMatcher::difference(expected, actual, opts)" do
534
534
 
535
535
  context "or-ed with another DiffMatcher::Matcher," do
536
536
  expected, same, different =
537
- DiffMatcher::Matcher[Fixnum] | DiffMatcher::Matcher[String],
537
+ DiffMatcher::Matcher[0.class] | DiffMatcher::Matcher[String],
538
538
  "a",
539
539
  1.0
540
540
 
@@ -635,7 +635,7 @@ describe "DiffMatcher::difference(expected, actual, opts)" do
635
635
 
636
636
  context "a DiffMatcher::AllMatcher using an or-ed DiffMatcher::Matcher," do
637
637
  expected, same, different =
638
- DiffMatcher::AllMatcher[ DiffMatcher::Matcher[Fixnum, Float] ],
638
+ DiffMatcher::AllMatcher[ DiffMatcher::Matcher[0.class, Float] ],
639
639
  [1, 2.0, 3],
640
640
  [1, "2", 3]
641
641
 
@@ -653,8 +653,8 @@ describe "DiffMatcher::difference(expected, actual, opts)" do
653
653
  expected, same, different =
654
654
  DiffMatcher::AllMatcher[
655
655
  DiffMatcher::Matcher[
656
- {:nombre=>String, :edad=>Fixnum},
657
- {:name=>String, :age=>Fixnum}
656
+ {:nombre=>String, :edad=>0.class},
657
+ {:name=>String, :age=>0.class}
658
658
  ]
659
659
  ],
660
660
  [
@@ -674,7 +674,7 @@ describe "DiffMatcher::difference(expected, actual, opts)" do
674
674
  | {:name=>"Alice", :age=>10},
675
675
  {
676
676
  :name=>: "Bob",
677
- :age=>- Fixnum+ nil
677
+ :age=>- 0.class+ nil
678
678
  },
679
679
  | {:nombre=>"Con", :edad=>30}
680
680
  ]
@@ -698,7 +698,7 @@ describe "DiffMatcher::difference(expected, actual, opts)" do
698
698
  end
699
699
  end
700
700
  expected, same, different =
701
- [ 1, 2, /\d/, Fixnum, 4..6 , lambda { |x| x % 6 == 0 }, matchable.new(7)],
701
+ [ 1, 2, /\d/, 0.class, 4..6 , lambda { |x| x % 6 == 0 }, matchable.new(7)],
702
702
  [ 1, 2, "3" , 4 , 5 , 6 , 7 ],
703
703
  [ 0, 2, "3" , 4 , 5 , 6 , 7 ]
704
704
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diff_matcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - locochris
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-15 00:00:00.000000000 Z
11
+ date: 2021-05-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  DiffMatcher matches input data (eg. from a JSON API) against values,