action_reporter 1.3.2 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +11 -1
- data/action_reporter.gemspec +12 -8
- data/lib/action_reporter/paper_trail_reporter.rb +23 -0
- data/lib/action_reporter.rb +4 -2
- metadata +75 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd1a58fef3515e786a32bfea51175eb11f081f09773fe6476de0868ca01fa76c
|
4
|
+
data.tar.gz: 4b3953a48e8e34fecbf48ce7068836b228aec8d52f83ef8926667b74e679f4eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9e273e313f21642a7dcc6517c4b38f977a30e41c50928c0b936ded0ac88fc76bbd031e0f9a8f5c3c7bdf9b87991c0e51d5e9af3e3c85b9c7baae8f01e09584e
|
7
|
+
data.tar.gz: 6e3c58d80555fd4487cac9d057eafc2960d1e35028f1a4f772ee05586b625d1e4e8ceabe028776833578334e2a8a2213a13fef55f0e82fe7219818d7a0056181
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
# action_reporter
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/action_reporter.svg)](https://badge.fury.io/rb/action_reporter) [![Test Status](https://github.com/amkisko/action_reporter.rb/actions/workflows/test.yml/badge.svg)](https://github.com/amkisko/action_reporter.rb/actions/workflows/test.yml)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/action_reporter.svg)](https://badge.fury.io/rb/action_reporter) [![Test Status](https://github.com/amkisko/action_reporter.rb/actions/workflows/test.yml/badge.svg)](https://github.com/amkisko/action_reporter.rb/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/amkisko/action_reporter.rb/graph/badge.svg?token=JCV2A7NWTE)](https://codecov.io/gh/amkisko/action_reporter.rb)
|
4
4
|
|
5
5
|
Ruby wrapper for multiple reporting services.
|
6
6
|
|
7
7
|
Supported services:
|
8
8
|
- Rails logger
|
9
9
|
- Audited
|
10
|
+
- PaperTrail
|
10
11
|
- Sentry
|
11
12
|
- Honeybadger
|
12
13
|
- scoutapm
|
@@ -39,6 +40,7 @@ Put this in your `config/initializers/action_reporter.rb` file:
|
|
39
40
|
ActionReporter.enabled_reporters = [
|
40
41
|
ActionReporter::RailsReporter.new,
|
41
42
|
# ActionReporter::AuditedReporter.new,
|
43
|
+
# ActionReporter::PaperTrailReporter.new,
|
42
44
|
# ActionReporter::SentryReporter.new,
|
43
45
|
# ActionReporter::HoneybadgerReporter.new,
|
44
46
|
# ActionReporter::ScoutApmReporter.new
|
@@ -57,6 +59,14 @@ ActionReporter.notify('Something went wrong', context: { record: record })
|
|
57
59
|
|
58
60
|
Bug reports and pull requests are welcome on GitHub at https://github.com/amkisko/action_reporter.rb
|
59
61
|
|
62
|
+
Contribution policy:
|
63
|
+
- It might take up to 2 calendar weeks to review and merge critical fixes
|
64
|
+
- It might take up to 6 calendar months to review and merge pull request
|
65
|
+
- It might take up to 1 calendar year to review an issue
|
66
|
+
- New integrations and third-party features are not nessessarily added to the gem
|
67
|
+
- Pull request should have test coverage for affected parts
|
68
|
+
- Pull request should have changelog entry
|
69
|
+
|
60
70
|
## Publishing
|
61
71
|
|
62
72
|
```sh
|
data/action_reporter.gemspec
CHANGED
@@ -26,16 +26,20 @@ Gem::Specification.new do |gem|
|
|
26
26
|
# s.bindir = "bin"
|
27
27
|
# s.executables = ["action_reporter"]
|
28
28
|
|
29
|
-
gem.required_ruby_version = ">=
|
29
|
+
gem.required_ruby_version = ">= 2.5.0"
|
30
30
|
gem.require_path = "lib"
|
31
31
|
|
32
|
+
gem.add_runtime_dependency 'rails', '> 5'
|
33
|
+
|
34
|
+
gem.add_development_dependency 'audited', '~> 5'
|
35
|
+
gem.add_development_dependency 'honeybadger', '~> 5'
|
36
|
+
gem.add_development_dependency 'sentry-ruby', '~> 5'
|
37
|
+
gem.add_development_dependency 'scout_apm', '~> 5'
|
38
|
+
gem.add_development_dependency 'paper_trail', '~> 15'
|
39
|
+
|
32
40
|
gem.add_development_dependency 'rspec', '~> 3'
|
33
41
|
gem.add_development_dependency 'webmock', '~> 3'
|
34
|
-
gem.add_development_dependency 'pry
|
35
|
-
|
36
|
-
gem.
|
37
|
-
gem.add_runtime_dependency 'audited', '~> 5'
|
38
|
-
gem.add_runtime_dependency 'honeybadger', '~> 5'
|
39
|
-
gem.add_runtime_dependency 'sentry-ruby', '~> 5'
|
40
|
-
gem.add_runtime_dependency 'scout_apm', '~> 5'
|
42
|
+
gem.add_development_dependency 'pry', '~> 0.14'
|
43
|
+
gem.add_development_dependency 'simplecov', '~> 0.21'
|
44
|
+
gem.add_development_dependency 'simplecov-cobertura', '~> 2'
|
41
45
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module ActionReporter
|
2
|
+
class PaperTrailReporter < Base
|
3
|
+
class_accessor "PaperTrail", gem_spec: "paper_trail (~> 15)"
|
4
|
+
|
5
|
+
def notify(*)
|
6
|
+
end
|
7
|
+
|
8
|
+
def context(args)
|
9
|
+
end
|
10
|
+
|
11
|
+
def reset_context
|
12
|
+
PaperTrail.request.whodunnit = nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def audited_user
|
16
|
+
PaperTrail.request.whodunnit
|
17
|
+
end
|
18
|
+
|
19
|
+
def audited_user=(user)
|
20
|
+
PaperTrail.request.whodunnit = user
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/action_reporter.rb
CHANGED
@@ -5,18 +5,20 @@ require 'action_reporter/honeybadger_reporter'
|
|
5
5
|
require 'action_reporter/sentry_reporter'
|
6
6
|
require 'action_reporter/scout_apm_reporter'
|
7
7
|
require 'action_reporter/audited_reporter'
|
8
|
+
require 'action_reporter/paper_trail_reporter'
|
8
9
|
|
9
10
|
module ActionReporter
|
10
11
|
module_function
|
11
12
|
|
12
|
-
VERSION = '1.
|
13
|
+
VERSION = '1.4.1'.freeze
|
13
14
|
|
14
15
|
AVAILABLE_REPORTERS = [
|
15
16
|
ActionReporter::RailsReporter,
|
16
17
|
ActionReporter::HoneybadgerReporter,
|
17
18
|
ActionReporter::SentryReporter,
|
18
19
|
ActionReporter::ScoutApmReporter,
|
19
|
-
ActionReporter::AuditedReporter
|
20
|
+
ActionReporter::AuditedReporter,
|
21
|
+
ActionReporter::PaperTrailReporter
|
20
22
|
].freeze
|
21
23
|
|
22
24
|
@enabled_reporters = []
|
metadata
CHANGED
@@ -1,127 +1,169 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrei Makarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: audited
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
33
|
+
version: '5'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
40
|
+
version: '5'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: honeybadger
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
47
|
+
version: '5'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
54
|
+
version: '5'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: sentry-ruby
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '5'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '5'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: scout_apm
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '5'
|
62
|
-
type: :
|
76
|
+
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '5'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: paper_trail
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
76
|
-
type: :
|
89
|
+
version: '15'
|
90
|
+
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
96
|
+
version: '15'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
90
|
-
type: :
|
103
|
+
version: '3'
|
104
|
+
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
110
|
+
version: '3'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: webmock
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
104
|
-
type: :
|
117
|
+
version: '3'
|
118
|
+
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
124
|
+
version: '3'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
126
|
+
name: pry
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
118
|
-
type: :
|
131
|
+
version: '0.14'
|
132
|
+
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
138
|
+
version: '0.14'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.21'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.21'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: simplecov-cobertura
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '2'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '2'
|
125
167
|
description: Ruby wrapper for multiple reporting services
|
126
168
|
email:
|
127
169
|
- andrei@kiskolabs.com
|
@@ -138,6 +180,7 @@ files:
|
|
138
180
|
- lib/action_reporter/base.rb
|
139
181
|
- lib/action_reporter/error.rb
|
140
182
|
- lib/action_reporter/honeybadger_reporter.rb
|
183
|
+
- lib/action_reporter/paper_trail_reporter.rb
|
141
184
|
- lib/action_reporter/rails_reporter.rb
|
142
185
|
- lib/action_reporter/scout_apm_reporter.rb
|
143
186
|
- lib/action_reporter/sentry_reporter.rb
|
@@ -159,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
202
|
requirements:
|
160
203
|
- - ">="
|
161
204
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
205
|
+
version: 2.5.0
|
163
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
207
|
requirements:
|
165
208
|
- - ">="
|