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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66f4ca9ed1fac321e0ed3faa164085d5817e6e802a9c7ecbf2458fe77cca81e8
|
4
|
+
data.tar.gz: d652c53ebb98a12a61995348f18106289f633b5f96220d8b8afcb1d084cb3f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
-
|
37
|
+
diffs << PaperTrail::RelatedChanges::Serializer::Diff.new(**args)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
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.
|
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:
|
11
|
+
date: 2024-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: paper_trail
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
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:
|
26
|
+
version: 10.3.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
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:
|
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
|
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
|