rails_error_dashboard 0.16.1 → 0.16.2
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/app/jobs/rails_error_dashboard/async_error_logging_job.rb +27 -7
- data/lib/generators/rails_error_dashboard/install/install_generator.rb +0 -4
- data/lib/rails_error_dashboard/version.rb +1 -1
- metadata +2 -32
- data/db/development.sqlite3 +0 -0
- data/lib/generators/rails_error_dashboard/install/templates/README +0 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9cb19fbd3a24300d9d8c31627b53ccb7e8b8b81a2a6760d167ecf056e9955ba3
|
|
4
|
+
data.tar.gz: dceec815d4b0fce705543ceb0b48ba6d96f839843b5a19b4b82a22bccd40dd3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3fcb870b3f4fd00fd7a1bf35d1bc8fff35593f772c78e006beb643c2d0a4ab2ba52b24e8218b612b60aa79bb5018e9bb24524d23874e68d8adbb3a8de58ebd6
|
|
7
|
+
data.tar.gz: 646a9ab4b5f291fe298bc4566f3ef0ff5cac2fb023f5f8facfb46128552453eba9e68316ccc3b4447f5b02f531209a48cec678d5dbaf645611a804901489546e
|
|
@@ -15,7 +15,7 @@ module RailsErrorDashboard
|
|
|
15
15
|
context = context.symbolize_keys if context.respond_to?(:symbolize_keys)
|
|
16
16
|
|
|
17
17
|
# Reconstruct the exception from serialized data
|
|
18
|
-
exception = reconstruct_exception(exception_data)
|
|
18
|
+
exception = reconstruct_exception(exception_data, context)
|
|
19
19
|
|
|
20
20
|
# Pass pre-extracted cause chain via context so LogError can use it
|
|
21
21
|
# (reconstructed exceptions don't have Ruby's built-in cause set)
|
|
@@ -74,14 +74,22 @@ module RailsErrorDashboard
|
|
|
74
74
|
# set the message with Exception's own initializer, bypassing whatever
|
|
75
75
|
# the subclass expects. Fall back to the constructor for classes whose
|
|
76
76
|
# `message` needs state their initializer sets.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
#
|
|
78
|
+
# A client report (ManualErrorReporter) is rebuilt as the same
|
|
79
|
+
# SyntheticException the sync path logs. Its type is the caller's string,
|
|
80
|
+
# usually taken from a frontend or mobile client, so it is never looked up
|
|
81
|
+
# as a constant.
|
|
82
|
+
def reconstruct_exception(data, context)
|
|
83
|
+
if context[:_capture_source] == "client"
|
|
84
|
+
return ManualErrorReporter::SyntheticException.new(
|
|
85
|
+
error_type: data[:class_name].to_s,
|
|
86
|
+
message: data[:message],
|
|
87
|
+
backtrace: Array(data[:backtrace])
|
|
88
|
+
)
|
|
83
89
|
end
|
|
84
90
|
|
|
91
|
+
exception_class = resolve_exception_class(data[:class_name])
|
|
92
|
+
|
|
85
93
|
exception = allocate_exception(exception_class, data[:message]) ||
|
|
86
94
|
construct_exception(exception_class, data[:message]) ||
|
|
87
95
|
StandardError.new(data[:message])
|
|
@@ -92,6 +100,18 @@ module RailsErrorDashboard
|
|
|
92
100
|
exception
|
|
93
101
|
end
|
|
94
102
|
|
|
103
|
+
# Only an Exception subclass is ever built from a queued name. Anything
|
|
104
|
+
# else (a missing constant, a module, a non-exception class, a plain
|
|
105
|
+
# value) becomes a StandardError; the stored error_type still comes from
|
|
106
|
+
# _reported_error_type. Payloads enqueued before 0.16.0 carry no capture
|
|
107
|
+
# source, so a client report from one of them arrives here.
|
|
108
|
+
def resolve_exception_class(name)
|
|
109
|
+
klass = name.constantize
|
|
110
|
+
klass.is_a?(Class) && klass < Exception ? klass : StandardError
|
|
111
|
+
rescue NameError
|
|
112
|
+
StandardError
|
|
113
|
+
end
|
|
114
|
+
|
|
95
115
|
def allocate_exception(exception_class, message)
|
|
96
116
|
return nil unless exception_class < Exception
|
|
97
117
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_error_dashboard
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.16.
|
|
4
|
+
version: 0.16.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anjan Jagirdar
|
|
@@ -149,20 +149,6 @@ dependencies:
|
|
|
149
149
|
- - "~>"
|
|
150
150
|
- !ruby/object:Gem::Version
|
|
151
151
|
version: '3.0'
|
|
152
|
-
- !ruby/object:Gem::Dependency
|
|
153
|
-
name: vcr
|
|
154
|
-
requirement: !ruby/object:Gem::Requirement
|
|
155
|
-
requirements:
|
|
156
|
-
- - "~>"
|
|
157
|
-
- !ruby/object:Gem::Version
|
|
158
|
-
version: '6.0'
|
|
159
|
-
type: :development
|
|
160
|
-
prerelease: false
|
|
161
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
162
|
-
requirements:
|
|
163
|
-
- - "~>"
|
|
164
|
-
- !ruby/object:Gem::Version
|
|
165
|
-
version: '6.0'
|
|
166
152
|
- !ruby/object:Gem::Dependency
|
|
167
153
|
name: simplecov
|
|
168
154
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -177,20 +163,6 @@ dependencies:
|
|
|
177
163
|
- - "~>"
|
|
178
164
|
- !ruby/object:Gem::Version
|
|
179
165
|
version: '1.1'
|
|
180
|
-
- !ruby/object:Gem::Dependency
|
|
181
|
-
name: appraisal
|
|
182
|
-
requirement: !ruby/object:Gem::Requirement
|
|
183
|
-
requirements:
|
|
184
|
-
- - "~>"
|
|
185
|
-
- !ruby/object:Gem::Version
|
|
186
|
-
version: '2.5'
|
|
187
|
-
type: :development
|
|
188
|
-
prerelease: false
|
|
189
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
190
|
-
requirements:
|
|
191
|
-
- - "~>"
|
|
192
|
-
- !ruby/object:Gem::Version
|
|
193
|
-
version: '2.5'
|
|
194
166
|
- !ruby/object:Gem::Dependency
|
|
195
167
|
name: capybara
|
|
196
168
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -384,7 +356,6 @@ files:
|
|
|
384
356
|
- config/locales/uk.yml
|
|
385
357
|
- config/locales/zh-CN.yml
|
|
386
358
|
- config/routes.rb
|
|
387
|
-
- db/development.sqlite3
|
|
388
359
|
- db/migrate/20251223000000_create_rails_error_dashboard_complete_schema.rb
|
|
389
360
|
- db/migrate/20251224000001_create_rails_error_dashboard_error_logs.rb
|
|
390
361
|
- db/migrate/20251224081522_add_better_tracking_to_error_logs.rb
|
|
@@ -438,7 +409,6 @@ files:
|
|
|
438
409
|
- db/migrate/20261015000001_create_rails_error_dashboard_error_occurrence_contexts.rb
|
|
439
410
|
- db/migrate/20261015000002_add_capture_source_to_error_occurrences_and_error_logs.rb
|
|
440
411
|
- lib/generators/rails_error_dashboard/install/install_generator.rb
|
|
441
|
-
- lib/generators/rails_error_dashboard/install/templates/README
|
|
442
412
|
- lib/generators/rails_error_dashboard/install/templates/initializer.rb
|
|
443
413
|
- lib/generators/rails_error_dashboard/solid_queue/solid_queue_generator.rb
|
|
444
414
|
- lib/generators/rails_error_dashboard/uninstall/uninstall_generator.rb
|
|
@@ -628,7 +598,7 @@ metadata:
|
|
|
628
598
|
funding_uri: https://github.com/sponsors/AnjanJ
|
|
629
599
|
post_install_message: |
|
|
630
600
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
631
|
-
RED (Rails Error Dashboard) v0.16.
|
|
601
|
+
RED (Rails Error Dashboard) v0.16.2
|
|
632
602
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
633
603
|
|
|
634
604
|
First install:
|
data/db/development.sqlite3
DELETED
|
Binary file
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
===============================================================================
|
|
2
|
-
|
|
3
|
-
RED (Rails Error Dashboard) has been installed!
|
|
4
|
-
|
|
5
|
-
Next steps:
|
|
6
|
-
|
|
7
|
-
1. Run migrations:
|
|
8
|
-
rails db:migrate
|
|
9
|
-
|
|
10
|
-
2. Start your Rails server:
|
|
11
|
-
rails server
|
|
12
|
-
|
|
13
|
-
3. Visit the dashboard:
|
|
14
|
-
http://localhost:3000/red
|
|
15
|
-
|
|
16
|
-
4. Change the default credentials in:
|
|
17
|
-
config/initializers/rails_error_dashboard.rb
|
|
18
|
-
|
|
19
|
-
For separate database setup, see:
|
|
20
|
-
https://github.com/AnjanJ/rails_error_dashboard/blob/main/docs/guides/CONFIGURATION.md
|
|
21
|
-
|
|
22
|
-
Full docs: https://github.com/AnjanJ/rails_error_dashboard
|
|
23
|
-
|
|
24
|
-
===============================================================================
|