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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1079aba5031205fee085e6b45a89feae8f0f188d776fc312b62f077aad59075
4
- data.tar.gz: cc93563a291d71073091ab98a00e826b05848a2bf0e3ac39d803662d229b5f64
3
+ metadata.gz: a7dd5da47aa5df6de036d38a67535d24372e4f1327cd5538b83e692de0e15f75
4
+ data.tar.gz: 53a12a125dec4c0d7257912f0dff62b5bec661edb2a233b3c26f68b25e4b0e1f
5
5
  SHA512:
6
- metadata.gz: 6e0d03fa7faa05bea8ff71af77a41f3d8c989b63da530f9e5c2f3327f113a3de931a0db5636b05da8f183965a61d49ddeb1d7fcc689f3002564adbfafbd2a766
7
- data.tar.gz: fdf55cae4d417c62bc499405935cf87a2f0b496d4a34fc3f62b9e9a7cda89dfee7324dcea4c6149ea1bda1c70d2a8ef1e9d12e19aef333ad53c7765dd37dcfae
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
- class TestJob < ::ApplicationJob
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bard
4
4
  module ExceptionNotification
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  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.0
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.6
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: []