luna_park 0.13.2 → 0.13.3

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: 80b01a66294a4b81ecfb19e7ecbc5e94b2d90f105d7c05946dacc49298e84204
4
- data.tar.gz: dd06fd03c3ab1a8a10e38aaeaf37ac74aa81b2a57d380b91c28c5888d34d50ec
3
+ metadata.gz: b3d2e8740ca57654ad7cfbd190f89e59c70b34d82aa6f5748d1d41333198eb76
4
+ data.tar.gz: a9734bf6a2de9d3ece0c176484676d154045028488aa9db3bab2dee7b69f7762
5
5
  SHA512:
6
- metadata.gz: 29655ccee48e0161dfd73820345d2544ed7e9639a8e327edf0034bd9a13639c9a615c66551a313692339752a071717f133f9c545b971ee97df967d86ab0884fe
7
- data.tar.gz: 0eb1a328dd65005510f51c7c6e27e26706b19e0b50f252cbc3b0546ff324879e7f8653886b858210bbb0812992d1e308ba24c47b71a1b14fbecca86dfd62ce7f
6
+ metadata.gz: 361f2c83f82a9602679a4a837a66b67c0fbedc8d3abc170b127d3ab72c9e05a5c09c0e0af7567603ee689cb7d73b9c34f0a0c4dc25eb496b0668843c0254943a
7
+ data.tar.gz: 33b902c851f2d4bd691f566950dab4a64a3cc54cd31632b98f873d8acc1d5ac45fff2d9d62598e7e90e564b7b678efd5c35265e1f78cb194b11123fb448e7491
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.13.3] - 2025-03-31
8
+ Added
9
+ - `Extensions::Comparable#detailed_differences` method moved from `Extensions::ComparableDebug`
10
+
7
11
  ## [0.13.2] - 2023-12-25
8
12
  Added
9
13
  - Ruby 3 compatibility (still compatible with ruby 2.5)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- luna_park (0.13.2)
4
+ luna_park (0.13.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -76,6 +76,34 @@ module LunaPark
76
76
 
77
77
  alias == eql?
78
78
 
79
+ ##
80
+ # Returns only different values, that causes missmatch
81
+ #
82
+ # @example
83
+ # t1 = Funds.new(from: { charge: { currency: 'USD', amount: 42 } }, usd: { currency: 'USD', amount: 41 }, comment: 'Foo')
84
+ # t2 = Funds.new(from: { charge: { currency: 'USD', amount: 43 } }, usd: { currency: 'USD', amount: 42 }, comment: 'Foo')
85
+ #
86
+ # t1 == t2 # => false
87
+ #
88
+ # t1.detailed_diff(t2) # =>
89
+ # { from: { charge: { amount: [42, 43] } }, usd: { amount: [41, 42] } }
90
+ def detailed_differences(other)
91
+ self.class.comparable_attributes_list.each_with_object({}) do |field, output|
92
+ left = send(field)
93
+ right = other&.send(field)
94
+
95
+ next if left == right
96
+
97
+ output[field] = if left.respond_to?(:detailed_differences)
98
+ left.detailed_differences(right)
99
+ else
100
+ [left, right]
101
+ end
102
+ end
103
+ end
104
+
105
+ alias detailed_diff detailed_differences
106
+
79
107
  ##
80
108
  # Enable debug mode (just include debug methods)
81
109
  def enable_debug
@@ -63,34 +63,6 @@ module LunaPark
63
63
  end
64
64
 
65
65
  alias detailed_cmp detailed_comparsion
66
-
67
- ##
68
- # Returns only different values, that causes missmatch
69
- #
70
- # @example
71
- # t1 = Funds.new(from: { charge: { currency: 'USD', amount: 42 } }, usd: { currency: 'USD', amount: 41 }, comment: 'Foo')
72
- # t2 = Funds.new(from: { charge: { currency: 'USD', amount: 43 } }, usd: { currency: 'USD', amount: 42 }, comment: 'Foo')
73
- #
74
- # t1 == t2 # => false
75
- #
76
- # t1.detailed_diff(t2) # =>
77
- # { from: { charge: { amount: [42, 43] } }, usd: { amount: [41, 42] } }
78
- def detailed_differences(other)
79
- self.class.comparable_attributes_list.each_with_object({}) do |field, output|
80
- left = send(field)
81
- right = other&.send(field)
82
-
83
- next if left == right
84
-
85
- output[field] = if left.respond_to?(:detailed_differences)
86
- left.detailed_differences(right)
87
- else
88
- [left, right]
89
- end
90
- end
91
- end
92
-
93
- alias detailed_diff detailed_differences
94
66
  end
95
67
  end
96
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LunaPark
4
- VERSION = '0.13.2'
4
+ VERSION = '0.13.3'
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luna_park
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kudrin
8
8
  - Philip Sorokin
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-12-26 00:00:00.000000000 Z
12
+ date: 2025-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bugsnag
@@ -319,7 +319,7 @@ dependencies:
319
319
  - - "~>"
320
320
  - !ruby/object:Gem::Version
321
321
  version: '0.9'
322
- description:
322
+ description:
323
323
  email:
324
324
  - kudrin.alexander@gmail.com
325
325
  executables: []
@@ -458,7 +458,7 @@ licenses:
458
458
  - MIT
459
459
  metadata:
460
460
  yard.run: yri
461
- post_install_message:
461
+ post_install_message:
462
462
  rdoc_options: []
463
463
  require_paths:
464
464
  - lib
@@ -473,9 +473,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
473
473
  - !ruby/object:Gem::Version
474
474
  version: '0'
475
475
  requirements: []
476
- rubyforge_project:
476
+ rubyforge_project:
477
477
  rubygems_version: 2.7.6.3
478
- signing_key:
478
+ signing_key:
479
479
  specification_version: 4
480
480
  summary: Domain driven oriented microservice framework.
481
481
  test_files: []