bard-exception_notification 0.2.0 → 0.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/CLAUDE.md +1 -1
- data/app/jobs/bard/exception_notification/test_job.rb +2 -1
- data/lib/bard/exception_notification/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a7dd5da47aa5df6de036d38a67535d24372e4f1327cd5538b83e692de0e15f75
|
|
4
|
+
data.tar.gz: 53a12a125dec4c0d7257912f0dff62b5bec661edb2a233b3c26f68b25e4b0e1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a166bd54c7a3b6af78155daca3bd8e9ff6facc8fbf1341a05b9df375f3c1bff4af5b78be76622e687ec1fb207ec53420eb09c46ec5ed4d6605560f3aa530b268
|
|
7
|
+
data.tar.gz: d9ae378fd00e4cec17058ccea90fd40e93852cd4fca0edcc280ad9bbbf1309a3adb46e47207262be8eaaca8b87d9db71439d6832307edbe167b0079a0359584c
|
data/CLAUDE.md
CHANGED
|
@@ -22,7 +22,7 @@ A Rails engine gem that gives every BARD-managed Rails app the same exception_no
|
|
|
22
22
|
- When `Delayed::Worker` is loaded, `DelayedJobNotification` is prepended to it in `after_initialize`, and it notifies only once delayed_job gives up on a job (`job.attempts >= max_attempts(job)` after `super` has rescheduled it).
|
|
23
23
|
- The test route is prepended with a constraint on `Test::ENV_KEY`, an env key set only in-process, so it can't be reached over HTTP.
|
|
24
24
|
- `lib/bard/exception_notification/test.rb` + `lib/tasks/exception_notification.rake` implement the end-to-end check. `Test.web` drives `Rails.application.call` with a mock request and inspects `exception_notifier.delivered`. It sets `ExceptionNotifier.testing_mode = true` so delivery failures raise instead of being only logged. The `test` task runs `web`, `job`, and `rake`, and exits 0 when all three succeed. A rake notification needs an exception to escape a task, so `Test.rake` runs the hidden `exception_notification:test:raise` task in a child `bin/rails` process. That task registers a last `:bard_test_sent` lambda notifier, which prints `Test::SENT_MARKER` only if the notifiers before it delivered without raising. The parent then checks the child's output for that marker. When `Delayed::Job` exists, the job check also enqueues `TestDelayedJob`, a plain delayed_job payload with `max_attempts` 1, so its notification doesn't wait out the app's retries. It replaces the ActiveJob check when ActiveJob runs on delayed_job.
|
|
25
|
-
- `app/` holds the engine's `TestsController` and `TestJob` (which inherits the host's `::ApplicationJob`).
|
|
25
|
+
- `app/` holds the engine's `TestsController` and `TestJob` (which inherits the host's `::ApplicationJob`, or `ActiveJob::Base` in an app without one).
|
|
26
26
|
|
|
27
27
|
## Specs
|
|
28
28
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
module Bard
|
|
4
4
|
module ExceptionNotification
|
|
5
|
-
|
|
5
|
+
# Inherits the app's ApplicationJob, so it fails with the app's own retries, but not every app has one.
|
|
6
|
+
class TestJob < (defined?(::ApplicationJob) ? ::ApplicationJob : ActiveJob::Base)
|
|
6
7
|
def perform(message)
|
|
7
8
|
raise TestError, message
|
|
8
9
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bard-exception_notification
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Geisel
|
|
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
83
83
|
- !ruby/object:Gem::Version
|
|
84
84
|
version: '0'
|
|
85
85
|
requirements: []
|
|
86
|
-
rubygems_version: 4.0.
|
|
86
|
+
rubygems_version: 4.0.20
|
|
87
87
|
specification_version: 4
|
|
88
88
|
summary: Shared exception_notification setup for BARD-managed Rails projects
|
|
89
89
|
test_files: []
|