rspec-enriched_json 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2959f4b47b6018d5293f62a8876036162f6428317796507fed22436312b7609c
4
- data.tar.gz: f27604ef443190fead00765e178a381e29871cdbfd5aea49486e7fd1336abbb6
3
+ metadata.gz: 897a7b35c81a2a9b629d4af420b37e5f404e360ad92d6bfb06a983c580687f2c
4
+ data.tar.gz: 3907177ad79acea11dff76511d2fbb6d5577a6e234147a6a66b47519fdd3e527
5
5
  SHA512:
6
- metadata.gz: 146df6d9cfd90245d34bf1ae4d913834e7ab45de3da22208fd5f5e46c49a6e39335acfa0d9db1e4f0b2270f34dfaa9d87abdc6babc3e24ab423f7fbf4ad0e546
7
- data.tar.gz: 31d802d2c5842ddee236f6e2b530dac5130fa7e8b3ed18c9d3b5269779e4bba0df00f425660e44e929cf87be76535a0ea8f334fd75132e9f593d6e11e9b2c549
6
+ metadata.gz: 5573a16911801b63c1210357122e97436e1cb5a5ad2d5e3addc089b8afd60bc3a1bb995c34a7a252f4ed926123e011f7c331c8ec681ad2907f6d079d946c4e95
7
+ data.tar.gz: 6114b639b4b64796f06629cbf4ac5b323d62647175a10738af938236e1c261883097dc1d914fb179b5b2431d05063f5b2a28a6c0a72473b3546bed43c5c7255f
data/README.md CHANGED
@@ -10,7 +10,7 @@ To see the difference between RSpec's built-in JSON formatter and this enriched
10
10
  ruby demo.rb
11
11
  ```
12
12
 
13
- This interactive demo script runs the same failing tests with both formatters and shows you the difference side-by-side. No external dependencies, no file cleanup needed!
13
+ This interactive demo script runs the same failing tests with both formatters and shows you the difference side-by-side.
14
14
 
15
15
  **What you'll see:**
16
16
  - **Built-in formatter**: Failure information embedded in string messages
@@ -88,9 +88,7 @@ With this gem, you get structured data alongside the original message:
88
88
  "actual": "Hello, World!",
89
89
  "matcher_name": "RSpec::Matchers::BuiltIn::Eq",
90
90
  "original_message": null,
91
- "diff_info": {
92
- "diffable": true
93
- }
91
+ "diffable": true
94
92
  }
95
93
  }
96
94
  ```
@@ -104,7 +102,7 @@ With this gem, you get structured data alongside the original message:
104
102
  - **Graceful degradation**: Regular exceptions (non-expectation failures) work normally
105
103
  - **Enhanced metadata capture**: Test location, tags, hierarchy, and custom metadata
106
104
  - **Robust error recovery**: Handles objects that fail to serialize without crashing
107
- - **Diff information**: Includes `diff_info.diffable` to help tools determine if values can be meaningfully diffed
105
+ - **Diff information**: Includes `diffable` to help tools determine if values can be meaningfully diffed
108
106
 
109
107
  ## Examples
110
108
 
@@ -111,9 +111,7 @@ module RSpec
111
111
  actual: Serializer.serialize_value(actual_raw),
112
112
  original_message: original_message, # Only populated when custom message overrides it
113
113
  matcher_name: matcher.class.name,
114
- diff_info: {
115
- diffable: values_diffable?(expected_raw, actual_raw, matcher)
116
- }
114
+ diffable: values_diffable?(expected_raw, actual_raw, matcher)
117
115
  }
118
116
 
119
117
  # Raise new exception with data attached
@@ -90,7 +90,7 @@ module RSpec
90
90
  actual: safe_serialize(details[:actual]),
91
91
  matcher_name: details[:matcher_name],
92
92
  original_message: details[:original_message],
93
- diff_info: details[:diff_info]
93
+ diffable: details[:diffable]
94
94
  }.compact
95
95
  end
96
96
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RSpec
4
4
  module EnrichedJson
5
- VERSION = "0.4.0"
5
+ VERSION = "0.5.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-enriched_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raghu Betina