paper_trail_history 0.1.3 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b3e54f1afaacc531556a2a10d0bfde605e5e8e9bc02c4571d11d5fd1349cd00
4
- data.tar.gz: e0f5777f1c40623e7ffa1cedff478b3b850c47e1418a1c52c4658b071c1a59a0
3
+ metadata.gz: 9d4cf46205ebd10b78ce9d159df2a384e2b00071a80efad39bf2e79bbcb84b05
4
+ data.tar.gz: 7b1155089a6b7328d76d63d137fb527e0e68219da77da09f1358d824c6f2bfe5
5
5
  SHA512:
6
- metadata.gz: 82be7c5bab02749ab38277d18a9b2d7062100eaed096e80a2d495c6f820f066faf0afe69742ff8022387998af446960bdd815b360d0676453cf4cd734b082ffc
7
- data.tar.gz: b6870227f27cac3e3cfe18c61d5e3386453b2874f2840843119e20fa2a1c945f48b5ae980e77546b8261997eb91d18321ace95b2b8d83bee82481268feb59ac9
6
+ metadata.gz: 92abd0ba47e73f3980186c8f52819b58b7cdf33becc042d49703233a070c3a43a312f45d2d69ecd9bc10e67bb974675c93749f05eb528dd1806f410763e36ff4
7
+ data.tar.gz: f9a7cd1637b73274d866138706ad49ff1f1b1222575f4aca7dff2f8114584c9b30bcfb20f71ed731fb0af1234cb6bebef631f5eb2d23584a0bcd571dbee8cbec
@@ -14,11 +14,10 @@ module PaperTrailHistory
14
14
  result = VersionService.restore_version(@version.id)
15
15
 
16
16
  if result[:success]
17
- redirect_back fallback_location: version_path(@version),
18
- notice: result[:message]
17
+ redirect_back_or_to(version_path(@version), notice: result[:message])
19
18
  else
20
- redirect_back fallback_location: version_path(@version),
21
- alert: t('paper_trail_history.errors.restore_failed', error: result[:error])
19
+ redirect_back_or_to(version_path(@version),
20
+ alert: t('paper_trail_history.errors.restore_failed', error: result[:error]))
22
21
  end
23
22
  end
24
23
 
@@ -8,9 +8,88 @@
8
8
 
9
9
  <%= yield :head %>
10
10
 
11
- <%= stylesheet_link_tag "paper_trail_history/application", media: "all" %>
12
11
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
13
12
  <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css" rel="stylesheet">
13
+
14
+ <style>
15
+ /* Git-style diff formatting */
16
+ .diff-container {
17
+ font-family: 'SFMono-Regular', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
18
+ font-size: 0.9rem;
19
+ }
20
+
21
+ .diff-section {
22
+ border: 1px solid #e1e4e8;
23
+ border-radius: 6px;
24
+ overflow: hidden;
25
+ }
26
+
27
+ .diff-header {
28
+ background-color: #f6f8fa;
29
+ padding: 8px 12px;
30
+ border-bottom: 1px solid #e1e4e8;
31
+ font-weight: 600;
32
+ color: #586069;
33
+ }
34
+
35
+ .diff-content {
36
+ background-color: #fff;
37
+ }
38
+
39
+ .diff-line {
40
+ display: flex;
41
+ align-items: flex-start;
42
+ padding: 2px 0;
43
+ line-height: 1.45;
44
+ position: relative;
45
+ }
46
+
47
+ .diff-line code {
48
+ background: none;
49
+ border: none;
50
+ padding: 4px 8px;
51
+ margin: 0;
52
+ flex: 1;
53
+ font-size: 0.85rem;
54
+ white-space: pre-wrap;
55
+ word-break: break-all;
56
+ }
57
+
58
+ .diff-marker {
59
+ display: inline-block;
60
+ width: 20px;
61
+ text-align: center;
62
+ font-weight: bold;
63
+ flex-shrink: 0;
64
+ font-size: 0.9rem;
65
+ padding: 4px 0;
66
+ user-select: none;
67
+ }
68
+
69
+ .diff-removed {
70
+ background-color: #ffeef0;
71
+ border-left: 3px solid #f85149;
72
+ }
73
+
74
+ .diff-removed .diff-marker {
75
+ color: #f85149;
76
+ background-color: #ffdddf;
77
+ }
78
+
79
+ .diff-added {
80
+ background-color: #e6ffed;
81
+ border-left: 3px solid #2ea043;
82
+ }
83
+
84
+ .diff-added .diff-marker {
85
+ color: #2ea043;
86
+ background-color: #ccf2d4;
87
+ }
88
+
89
+ .diff-line:hover {
90
+ background-color: rgba(0, 0, 0, 0.05);
91
+ }
92
+ </style>
14
93
  </head>
15
94
  <body>
16
95
  <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PaperTrailHistory
4
- VERSION = '0.1.3'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail_history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Deutscher
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2025-08-13 00:00:00.000000000 Z
11
+ date: 2025-12-04 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: paper_trail
@@ -29,14 +30,14 @@ dependencies:
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
- version: '7.2'
33
+ version: '8.0'
33
34
  type: :runtime
34
35
  prerelease: false
35
36
  version_requirements: !ruby/object:Gem::Requirement
36
37
  requirements:
37
38
  - - ">="
38
39
  - !ruby/object:Gem::Version
39
- version: '7.2'
40
+ version: '8.0'
40
41
  description: |
41
42
  PaperTrailHistory is a mountable Rails engine that provides a comprehensive web interface for viewing, searching,
42
43
  and managing audit trail versions created by the PaperTrail gem. Features include listing trackable models,
@@ -50,7 +51,6 @@ files:
50
51
  - MIT-LICENSE
51
52
  - README.md
52
53
  - Rakefile
53
- - app/assets/stylesheets/paper_trail_history/application.css
54
54
  - app/controllers/paper_trail_history/application_controller.rb
55
55
  - app/controllers/paper_trail_history/models_controller.rb
56
56
  - app/controllers/paper_trail_history/records_controller.rb
@@ -86,6 +86,7 @@ metadata:
86
86
  source_code_uri: https://github.com/its-bede/paper_trail_history
87
87
  changelog_uri: https://github.com/its-bede/paper_trail_history/blob/main/CHANGELOG.md
88
88
  rubygems_mfa_required: 'true'
89
+ post_install_message:
89
90
  rdoc_options: []
90
91
  require_paths:
91
92
  - lib
@@ -93,14 +94,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - ">="
95
96
  - !ruby/object:Gem::Version
96
- version: 3.1.0
97
+ version: 3.3.0
97
98
  required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  requirements:
99
100
  - - ">="
100
101
  - !ruby/object:Gem::Version
101
102
  version: '0'
102
103
  requirements: []
103
- rubygems_version: 3.6.6
104
+ rubygems_version: 3.5.23
105
+ signing_key:
104
106
  specification_version: 4
105
107
  summary: A Rails engine providing a web interface for managing PaperTrail versions.
106
108
  test_files: []
@@ -1,93 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
16
-
17
- /* Git-style diff formatting */
18
- .diff-container {
19
- font-family: 'SFMono-Regular', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
20
- font-size: 0.9rem;
21
- }
22
-
23
- .diff-section {
24
- border: 1px solid #e1e4e8;
25
- border-radius: 6px;
26
- overflow: hidden;
27
- }
28
-
29
- .diff-header {
30
- background-color: #f6f8fa;
31
- padding: 8px 12px;
32
- border-bottom: 1px solid #e1e4e8;
33
- font-weight: 600;
34
- color: #586069;
35
- }
36
-
37
- .diff-content {
38
- background-color: #fff;
39
- }
40
-
41
- .diff-line {
42
- display: flex;
43
- align-items: flex-start;
44
- padding: 2px 0;
45
- line-height: 1.45;
46
- position: relative;
47
- }
48
-
49
- .diff-line code {
50
- background: none;
51
- border: none;
52
- padding: 4px 8px;
53
- margin: 0;
54
- flex: 1;
55
- font-size: 0.85rem;
56
- white-space: pre-wrap;
57
- word-break: break-all;
58
- }
59
-
60
- .diff-marker {
61
- display: inline-block;
62
- width: 20px;
63
- text-align: center;
64
- font-weight: bold;
65
- flex-shrink: 0;
66
- font-size: 0.9rem;
67
- padding: 4px 0;
68
- user-select: none;
69
- }
70
-
71
- .diff-removed {
72
- background-color: #ffeef0;
73
- border-left: 3px solid #f85149;
74
- }
75
-
76
- .diff-removed .diff-marker {
77
- color: #f85149;
78
- background-color: #ffdddf;
79
- }
80
-
81
- .diff-added {
82
- background-color: #e6ffed;
83
- border-left: 3px solid #2ea043;
84
- }
85
-
86
- .diff-added .diff-marker {
87
- color: #2ea043;
88
- background-color: #ccf2d4;
89
- }
90
-
91
- .diff-line:hover {
92
- background-color: rgba(0, 0, 0, 0.05);
93
- }