activeerror 2.1.1 → 2.2.1
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 +4 -4
- data/README.md +7 -0
- data/app/models/active_error/application_record.rb +2 -0
- data/lib/active_error/engine.rb +23 -19
- data/lib/active_error/version.rb +1 -1
- data/lib/active_error.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4ff2d1bb1a45d6f52d8ca005ddf945b7e2719b79a402f7c6dbe36b9254e3f360
|
|
4
|
+
data.tar.gz: 6173233d28c1e97b6c16ceec799da98ea663512f93109829922a3271921661da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5852b47848365f48df96b81a21f5223e061933044ac65a219dba62ac182d5ffb09b9c56b3186b4ced7c3cdd5c15f2f026a2e0d631d15d278bd01f5fdf84bc2d6
|
|
7
|
+
data.tar.gz: 46e8201ecaa79af2403ad5b4c29525b100d5104ed5ab9860b139f8197a03970a6c8d8109c7ed4eee19e18d623fd1ee941420af1e33e135d22ed6a2630f1f18fc
|
data/README.md
CHANGED
|
@@ -58,6 +58,13 @@ ignore classes of errors.
|
|
|
58
58
|
config.active_error.ignored = ["NoMethodError"]
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
You can supply a hash of connection options to `connects_to` set the connection
|
|
62
|
+
options for the base `ActiveError` model.
|
|
63
|
+
|
|
64
|
+
```ruby
|
|
65
|
+
config.active_error.connects_to = { database: { writing: :errors } }
|
|
66
|
+
```
|
|
67
|
+
|
|
61
68
|
## Development
|
|
62
69
|
|
|
63
70
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
data/lib/active_error/engine.rb
CHANGED
|
@@ -20,27 +20,31 @@ module ActiveError
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
initializer "active_error.context" do
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
ActiveSupport.on_load(:action_controller_base) do
|
|
24
|
+
ActionController::Base.before_action do
|
|
25
|
+
Rails.error.set_context(active_error_request: request)
|
|
26
|
+
end
|
|
25
27
|
end
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
ActiveSupport.on_load(:active_job) do
|
|
30
|
+
ActiveJob::Base.before_perform do
|
|
31
|
+
Rails.error.set_context(active_error_request:
|
|
32
|
+
ActiveJobRequest.new(serialize, serialize, self.class.name))
|
|
33
|
+
rescue ActiveJob::SerializationError
|
|
34
|
+
without_args = { "job_class" => self.class.name,
|
|
35
|
+
"job_id" => job_id,
|
|
36
|
+
"provider_job_id" => provider_job_id,
|
|
37
|
+
"queue_name" => queue_name,
|
|
38
|
+
"priority" => priority,
|
|
39
|
+
"executions" => executions,
|
|
40
|
+
"exception_executions" => exception_executions,
|
|
41
|
+
"locale" => I18n.locale.to_s,
|
|
42
|
+
"timezone" => timezone,
|
|
43
|
+
"enqueued_at" => Time.now.utc.iso8601(9),
|
|
44
|
+
"scheduled_at" => scheduled_at&.utc&.iso8601(9) }
|
|
45
|
+
Rails.error.set_context(active_error_request:
|
|
46
|
+
ActiveJobRequest.new(without_args, without_args, self.class.name))
|
|
47
|
+
end
|
|
44
48
|
end
|
|
45
49
|
end
|
|
46
50
|
end
|
data/lib/active_error/version.rb
CHANGED
data/lib/active_error.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activeerror
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nick Pezza
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-04-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
99
99
|
- !ruby/object:Gem::Version
|
|
100
100
|
version: '0'
|
|
101
101
|
requirements: []
|
|
102
|
-
rubygems_version: 3.5.
|
|
102
|
+
rubygems_version: 3.5.16
|
|
103
103
|
signing_key:
|
|
104
104
|
specification_version: 4
|
|
105
105
|
summary: Rails exception logger
|