paper_trail-related_changes 1.0.2 → 1.0.3

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: f4b621a21eaccc8da3534178d68730db05c4881e92b53aed69c5b1988bc96f45
4
- data.tar.gz: fc1171c3973769d66e595221b352368a9501b7ee8d87ae695ea16a3294acc633
3
+ metadata.gz: 66f4ca9ed1fac321e0ed3faa164085d5817e6e802a9c7ecbf2458fe77cca81e8
4
+ data.tar.gz: d652c53ebb98a12a61995348f18106289f633b5f96220d8b8afcb1d084cb3f9d
5
5
  SHA512:
6
- metadata.gz: f6441006f012ab9365bb9b030107f40bb9dc12710b09dd6ef6d1bcaa121ca3c9932cb5868f258a5465254783037aaaa69da87ea3113b17b713e2093eaa5d949c
7
- data.tar.gz: 2821ebc9d1f242d559d00f6dc3ff24cf52e2ad991bbcba4db97b0e7e7eb90f00994f307ec585e734b22466397779e3c1a611da7748cbb3ee7eec523f568cbb37
6
+ metadata.gz: 70fff188ec046d15c82fdf34f12201c41713a85ee1fc478f76d9562e87ec76c208a3921240f7207265b29772715ee9efe319be15430caf9f722d82798deece2a
7
+ data.tar.gz: cdb0f270ca54fd7967184e91872e812a83309c2b383c0e05b43f2b803ae4482de116a1c2a37b4216c60af3d8a6af5742261a21970a1b6d6f450dcc54f10fea81
@@ -17,11 +17,11 @@ module PaperTrail::RelatedChanges
17
17
 
18
18
  def to_h(*)
19
19
  self.diffs = diffs
20
- .group_by(&:source)
21
- .map { |k, g| [k, g.sort_by(&:source_rank)] } # ie. segments can be in display order
22
- .sort_by { |_, g| g[0].rank } # Direct attributes shown first
23
- .flat_map(&:last)
24
- .uniq
20
+ .group_by(&:source)
21
+ .map { |k, g| [k, g.sort_by(&:source_rank)] } # ie. segments can be in display order
22
+ .sort_by { |_, g| g[0].rank } # Direct attributes shown first
23
+ .flat_map(&:last)
24
+ .uniq
25
25
  results = super().except(:merge_into_root).map { |k, v| [k, v.is_a?(Array) ? v.map(&:to_h) : v] }.to_h
26
26
  results.delete(:children) if results[:children].nil?
27
27
  results
@@ -34,7 +34,7 @@ module PaperTrail::RelatedChanges
34
34
  end
35
35
 
36
36
  def add_diff(args)
37
- self.diffs << PaperTrail::RelatedChanges::Serializer::Diff.new(args)
37
+ diffs << PaperTrail::RelatedChanges::Serializer::Diff.new(**args)
38
38
  end
39
39
  end
40
40
  end
@@ -1,5 +1,5 @@
1
1
  module PaperTrail
2
2
  module RelatedChanges
3
- VERSION = '1.0.2'
3
+ VERSION = '1.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail-related_changes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-17 00:00:00.000000000 Z
11
+ date: 2024-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rails
14
+ name: paper_trail
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.1
19
+ version: 10.3.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 6.0.1
26
+ version: 10.3.1
27
27
  - !ruby/object:Gem::Dependency
28
- name: paper_trail
28
+ name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 10.3.1
33
+ version: '6'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 10.3.1
40
+ version: '6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pg
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.1.2
126
+ rubygems_version: 3.0.3.1
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Groups and formats related changes that are recorded with PaperTrail