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 +4 -4
- data/.travis.yml +5 -14
- data/CHANGELOG.md +8 -0
- data/lib/diff_matcher/difference.rb +1 -1
- data/lib/diff_matcher/version.rb +1 -1
- data/spec/diff_matcher/difference_spec.rb +11 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 495d4f1b78ec86cfc1277cb6f49184ae39e08ae5677f7999f257d6ecc6cea84e
|
4
|
+
data.tar.gz: 119b345f08ab99fce59abf6c7dc5498c528698d4feae06cc04a8fa27526163e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/diff_matcher/version.rb
CHANGED
@@ -42,8 +42,8 @@ end
|
|
42
42
|
|
43
43
|
describe DiffMatcher::Matcher do
|
44
44
|
expected, expected2, same, different, difference =
|
45
|
-
{:nombre => String , :edad =>
|
46
|
-
{:name => String , :age =>
|
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
|
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=>
|
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
|
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[
|
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[
|
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=>
|
657
|
-
{:name=>String, :age=>
|
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=>-
|
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/,
|
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.
|
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:
|
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,
|