dry-struct 1.7.1 → 1.8.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 +4 -4
- data/CHANGELOG.md +49 -0
- data/lib/dry/struct/extensions/super_diff.rb +10 -0
- data/lib/dry/struct/extensions.rb +4 -0
- data/lib/dry/struct/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca7dd75ba219a6860a4532f8ede515b598b70e32ef8f0e07d4f42d99ea429111
|
4
|
+
data.tar.gz: 37c2870ddde97c4da85845f2f5118c13443eb9dcec600588542bab6ef7a8960e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9848e0d45c5031418374744045f6866d5a991398376f17524d8326b41abd22b9109f0476d641a680cd5f5acab76d5493262d40cae335dc0ee7864f7958080992
|
7
|
+
data.tar.gz: 974e9069e93e5a16d57fe5f9744ba24339fa0a30d26487d5f2ade5a0a7ae07c79d995160f380e45838b83b8e4851e52c4705c7d7cea9634ab4404a8816ebf6da
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,54 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
+
## 1.8.0 2025-03-09
|
4
|
+
|
5
|
+
|
6
|
+
### Added
|
7
|
+
|
8
|
+
- Added super_diff extension for improved struct diffing in RSpec tests (@flash-gordon in #197)
|
9
|
+
|
10
|
+
Add this to your Gemfile:
|
11
|
+
```ruby
|
12
|
+
gem 'super_diff', group: :test
|
13
|
+
```
|
14
|
+
|
15
|
+
Then activate the extension in your spec_helper:
|
16
|
+
```ruby
|
17
|
+
Dry::Struct.load_extensions(:super_diff)
|
18
|
+
```
|
19
|
+
|
20
|
+
Now this
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
expected: #<Test::User name="Jane" age=22>
|
24
|
+
got: #<Test::User name="Jane" age=21>
|
25
|
+
|
26
|
+
(compared using eql?)
|
27
|
+
|
28
|
+
Diff:
|
29
|
+
@@ -1 +1 @@
|
30
|
+
-#<Test::User name="Jane" age=22>
|
31
|
+
+#<Test::User name="Jane" age=21>
|
32
|
+
```
|
33
|
+
|
34
|
+
will become this:
|
35
|
+
|
36
|
+
```ruby
|
37
|
+
expected: #<Test::User name: "Jane", age: 22>
|
38
|
+
got: #<Test::User name: "Jane", age: 21>
|
39
|
+
|
40
|
+
(compared using eql?)
|
41
|
+
|
42
|
+
#<Test::User {
|
43
|
+
name: "Jane",
|
44
|
+
- age: 22
|
45
|
+
+ age: 21
|
46
|
+
}>
|
47
|
+
```
|
48
|
+
|
49
|
+
|
50
|
+
[Compare v1.7.1...v1.8.0](https://github.com/dry-rb/dry-struct/compare/v1.7.1...v1.8.0)
|
51
|
+
|
3
52
|
## 1.7.1 2025-01-31
|
4
53
|
|
5
54
|
|
data/lib/dry/struct/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-struct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-core
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- lib/dry/struct/errors.rb
|
92
92
|
- lib/dry/struct/extensions.rb
|
93
93
|
- lib/dry/struct/extensions/pretty_print.rb
|
94
|
+
- lib/dry/struct/extensions/super_diff.rb
|
94
95
|
- lib/dry/struct/hashify.rb
|
95
96
|
- lib/dry/struct/printer.rb
|
96
97
|
- lib/dry/struct/struct_builder.rb
|