paper_trail-related_changes 1.0.1 → 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: d8bb9fcf2145070ca492dcaeb35e34dff9e2cd49a8f4cbb78398b66b248acb7a
4
- data.tar.gz: 736d65504c75769d5b9ea0b0e695afd18aaedbb58b358c8cf0a2ac20363a3c55
3
+ metadata.gz: 66f4ca9ed1fac321e0ed3faa164085d5817e6e802a9c7ecbf2458fe77cca81e8
4
+ data.tar.gz: d652c53ebb98a12a61995348f18106289f633b5f96220d8b8afcb1d084cb3f9d
5
5
  SHA512:
6
- metadata.gz: 97986f4218863ba16ec85b7f31cf5df1844ad602db1682e3ed8eba9db32961ce983b9647918da5c3d8dc867cf36510a3898fbaf8c4634489b5e10d36bf8913ee
7
- data.tar.gz: dd6082706c8aae1b6401190627783cc4526c0b07dd5a5b6ba92ba17177fb3947d0c8d068e65c67fc2759734d3515664b11349e7f1506ad4f1ad9962314f82315
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.1'
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.1
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-16 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
@@ -78,12 +78,12 @@ files:
78
78
  - README.md
79
79
  - Rakefile
80
80
  - app/assets/config/paper_trail_changelog_manifest.js
81
- - app/assets/stylesheets/paper_trail/changelog/application.css
81
+ - app/assets/stylesheets/paper_trail/related_changes/application.css
82
82
  - app/controllers/paper_trail/related_changes/application_controller.rb
83
83
  - app/controllers/paper_trail/related_changes/base_controller.rb
84
- - app/helpers/paper_trail/changelog/application_helper.rb
85
- - app/jobs/paper_trail/changelog/application_job.rb
86
- - app/mailers/paper_trail/changelog/application_mailer.rb
84
+ - app/helpers/paper_trail/related_changes/application_helper.rb
85
+ - app/jobs/paper_trail/related_changes/application_job.rb
86
+ - app/mailers/paper_trail/related_changes/application_mailer.rb
87
87
  - app/models/paper_trail/related_changes/application_record.rb
88
88
  - app/views/layouts/paper_trail/related_changes/application.html.erb
89
89
  - config/routes.rb
@@ -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