specdiff 0.2.0 → 0.3.0.pre.rc1

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: 8d698240eae3e0f8f38c22b66df23efb1076b14879a7093c3d3e33aebddd37c9
4
- data.tar.gz: 29e6198145c5a9ede875a26066a33e599561fe82277c6eb8bdb475c291304c9b
3
+ metadata.gz: 68cf98631e494fb5f016c0b3632cce58f616dad54ba11c782b37e3de4f2b36c9
4
+ data.tar.gz: b97fee8a8e586b383a71bf0dcdcb32be7cf1c135356a90ec2ae7488fc2082071
5
5
  SHA512:
6
- metadata.gz: cb5b52f47732689bc8322b840436d4c27fb048dbe20e9e0d8501b3120137500b7a9230a9818c31e049aa22715c251166d807b4e01111695406470c6b314c13c5
7
- data.tar.gz: 103362c058c1e260dc9a9c3f1bd06b06d39ab25c1818e001c7160eb61ceb741d549b4f9c6fb974bb27614456ab2d34dfae6732bc6d842d42346bd62abe1fc331
6
+ metadata.gz: b374cadd1aa564cf8252c4b3d6c4ca2be952b147891cdbec9f0799383349bf5bcf61a1ef94979bc2b1f7dbe4d850e586d4c11f1271c74a14dc9be09cffc4e184
7
+ data.tar.gz: 8379b0c263ae20900ec31b63ea9600e3c15cef8fe9b597c1e1349a708c323d03ee8bfaa46d6f6eeb666e2af0ee751e7ef2cd47917e927eeceb48a7f076a1e126
data/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.0-rc1]
11
+
12
+ ### Added
13
+
14
+ - Add rspec integration. `require "specdiff/rspec"` The rspec integration will cause rspec's differ to be replaced entirely with specdiff. It will also cause rspec's inspect (object formatter) to be replaced with Specdiff's inspect.
15
+ - Add `Specdiff.diff_inspect` method, which is a wrapper for `#inspect` with some extra logic to make diffs look better.
16
+ - Add `Specdiff.hashprint` method, which prints hashes/arrays recursively in a way that is friendly to a text differ.
17
+
18
+ ### Changed
19
+
20
+ - Improve contrast for some elements of the text differ
21
+ - Improve hash diffing. Introduce heuristic that decides whether a text diff of the hashes or the hashdiff gem's output is better for the situation.
22
+ - No longer produces a text diff of booleans
23
+ - No longer produces a text diff if both strings are a single line. (This would be useless since the diff is line-based.)
24
+
10
25
  ## [0.2.0] - 2023-12-04
11
26
 
12
27
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- specdiff (0.2.0)
4
+ specdiff (0.3.0.pre.rc1)
5
5
  diff-lcs (~> 1.5)
6
6
  hashdiff (~> 1.0)
7
7
 
data/README.md CHANGED
@@ -11,7 +11,24 @@ dropping the content type requirement.
11
11
  Specdiff automagically detects the types of provided data and prints a suitable
12
12
  diff between them.
13
13
 
14
- Check out the examples directory to see what it might look like.
14
+ ## Cool, what does it look like?
15
+
16
+ When specdiff is enabled, webmock will produce a generic text diff using
17
+ [`Diff::LCS`](https://github.com/halostatue/diff-lcs) (basically the same
18
+ diff as rspec uses):
19
+
20
+ ![webmock_text_with_specdiff](./assets/webmock_text_with_specdiff.png)
21
+
22
+ It will also produce a json [hashdiff](https://github.com/liufengyun/hashdiff),
23
+ even if the request did not have the content type header:
24
+
25
+ ![d](./assets/webmock_json_with_specdiff.png)
26
+
27
+ (The output of the json diff is experimental, feedback would be great!)
28
+
29
+ You might also check out the `examples/` directory to play with it:
30
+
31
+ `$ cd examples/webmock && bundle install`
15
32
 
16
33
  ## Installation
17
34
 
@@ -116,10 +133,10 @@ High level description of the heuristic specdiff implements
116
133
 
117
134
  - [ ] unit tests are passing (`$ bundle exec rake test`)
118
135
  - [ ] linter is happy (`$ bundle exec rake lint`)
119
- - [ ] `$ cd examples/webmock && bundle install && bundle exec ruby json.rb` looks good
120
- - [ ] `$ bundle exec ruby text.rb` looks good
136
+ - [ ] `examples/` look good
121
137
  - [ ] update the version number in `version.rb`
122
- - [ ] make sure the `examples/` `Gemfile.lock` files are updated
138
+ - [ ] make sure the `examples/` `Gemfile.lock` files are updated (run bundle install)
139
+ - [ ] make sure `Gemfile.lock` is updated (run bundle install)
123
140
  - [ ] move unreleased changes to the next version in the [changelog](./CHANGELOG.md)
124
141
  - [ ] commit in the form "vX.X.X" and push
125
142
  - [ ] make sure the pipeline is green
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --require spec_helper
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rspec"
6
+ gem "debug"
7
+ gem "specdiff", path: "../../"
8
+
9
+ # gem "activesupport"
10
+ gem "bigdecimal"
@@ -0,0 +1,52 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ specdiff (0.3.0.pre.rc1)
5
+ diff-lcs (~> 1.5)
6
+ hashdiff (~> 1.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ bigdecimal (3.1.7)
12
+ debug (1.9.1)
13
+ irb (~> 1.10)
14
+ reline (>= 0.3.8)
15
+ diff-lcs (1.5.1)
16
+ hashdiff (1.1.0)
17
+ io-console (0.7.2)
18
+ irb (1.12.0)
19
+ rdoc
20
+ reline (>= 0.4.2)
21
+ psych (5.1.2)
22
+ stringio
23
+ rdoc (6.6.2)
24
+ psych (>= 4.0.0)
25
+ reline (0.4.3)
26
+ io-console (~> 0.5)
27
+ rspec (3.13.0)
28
+ rspec-core (~> 3.13.0)
29
+ rspec-expectations (~> 3.13.0)
30
+ rspec-mocks (~> 3.13.0)
31
+ rspec-core (3.13.0)
32
+ rspec-support (~> 3.13.0)
33
+ rspec-expectations (3.13.0)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.13.0)
36
+ rspec-mocks (3.13.0)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.13.0)
39
+ rspec-support (3.13.1)
40
+ stringio (3.1.0)
41
+
42
+ PLATFORMS
43
+ x86_64-linux
44
+
45
+ DEPENDENCIES
46
+ bigdecimal
47
+ debug
48
+ rspec
49
+ specdiff!
50
+
51
+ BUNDLED WITH
52
+ 2.3.5