rails_webhook_outbox 0.2.0 → 0.4.0
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 +218 -4
- data/Rakefile +6 -1
- data/UPGRADING.md +92 -0
- data/app/assets/stylesheets/rails_webhook_outbox/_01_base.css +53 -0
- data/app/assets/stylesheets/rails_webhook_outbox/_02_layout.css +88 -0
- data/app/assets/stylesheets/rails_webhook_outbox/_03_table.css +26 -0
- data/app/assets/stylesheets/rails_webhook_outbox/_04_badges.css +19 -0
- data/app/assets/stylesheets/rails_webhook_outbox/_05_forms.css +42 -0
- data/app/assets/stylesheets/rails_webhook_outbox/_06_filters.css +13 -0
- data/app/assets/stylesheets/rails_webhook_outbox/_07_timeline.css +31 -0
- data/app/controllers/rails_webhook_outbox/base_controller.rb +15 -0
- data/app/controllers/rails_webhook_outbox/deliveries_controller.rb +46 -0
- data/app/controllers/rails_webhook_outbox/events_controller.rb +13 -0
- data/app/controllers/rails_webhook_outbox/overview_controller.rb +7 -0
- data/app/controllers/rails_webhook_outbox/subscriptions_controller.rb +62 -0
- data/app/helpers/rails_webhook_outbox/application_helper.rb +29 -0
- data/app/javascript/rails_webhook_outbox/application.js +2 -0
- data/app/javascript/rails_webhook_outbox/controllers/application.js +4 -0
- data/app/javascript/rails_webhook_outbox/controllers/index.js +4 -0
- data/app/javascript/rails_webhook_outbox/controllers/secret_controller.js +24 -0
- data/app/jobs/rails_webhook_outbox/delivery_job.rb +62 -1
- data/app/models/rails_webhook_outbox/delivery.rb +28 -0
- data/app/models/rails_webhook_outbox/delivery_attempt.rb +13 -0
- data/app/models/rails_webhook_outbox/overview.rb +49 -0
- data/app/models/rails_webhook_outbox/subscription.rb +50 -2
- data/app/views/layouts/rails_webhook_outbox/application.html.erb +22 -0
- data/app/views/rails_webhook_outbox/deliveries/_detail.html.erb +47 -0
- data/app/views/rails_webhook_outbox/deliveries/_row.html.erb +7 -0
- data/app/views/rails_webhook_outbox/deliveries/_timeline.html.erb +41 -0
- data/app/views/rails_webhook_outbox/deliveries/index.html.erb +62 -0
- data/app/views/rails_webhook_outbox/deliveries/retry.turbo_stream.erb +2 -0
- data/app/views/rails_webhook_outbox/deliveries/show.html.erb +5 -0
- data/app/views/rails_webhook_outbox/events/index.html.erb +22 -0
- data/app/views/rails_webhook_outbox/overview/_recent_failures.html.erb +29 -0
- data/app/views/rails_webhook_outbox/overview/_stats.html.erb +19 -0
- data/app/views/rails_webhook_outbox/overview/show.html.erb +8 -0
- data/app/views/rails_webhook_outbox/subscriptions/_form.html.erb +49 -0
- data/app/views/rails_webhook_outbox/subscriptions/edit.html.erb +7 -0
- data/app/views/rails_webhook_outbox/subscriptions/index.html.erb +37 -0
- data/app/views/rails_webhook_outbox/subscriptions/new.html.erb +7 -0
- data/app/views/rails_webhook_outbox/subscriptions/show.html.erb +49 -0
- data/config/importmap.rb +6 -0
- data/config/routes.rb +17 -0
- data/db/migrate/20260624000001_create_webhook_outbox_subscriptions.rb +1 -1
- data/db/migrate/20260624000002_create_webhook_outbox_deliveries.rb +4 -4
- data/db/migrate/20260629000002_add_idempotency_key_to_webhook_outbox_deliveries.rb +2 -2
- data/db/migrate/20260701000001_add_secret_rotation_to_webhook_outbox_subscriptions.rb +6 -0
- data/db/migrate/20260701000002_add_consecutive_failures_to_webhook_outbox_subscriptions.rb +5 -0
- data/db/migrate/20261027000001_create_webhook_outbox_delivery_attempts.rb +16 -0
- data/lib/generators/rails_webhook_outbox/install/install_generator.rb +1 -19
- data/lib/rails_webhook_outbox/configuration.rb +14 -1
- data/lib/rails_webhook_outbox/engine.rb +16 -0
- data/lib/rails_webhook_outbox/secret_rotation_error.rb +8 -0
- data/lib/rails_webhook_outbox/sender.rb +2 -1
- data/lib/rails_webhook_outbox/signature.rb +2 -2
- data/lib/rails_webhook_outbox/version.rb +1 -1
- data/lib/rails_webhook_outbox.rb +1 -0
- data/lib/tasks/rails_webhook_outbox_tasks.rake +51 -4
- metadata +70 -3
- data/lib/generators/rails_webhook_outbox/install/templates/create_webhook_outbox_deliveries.rb.tt +0 -21
- data/lib/generators/rails_webhook_outbox/install/templates/create_webhook_outbox_subscriptions.rb.tt +0 -13
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_webhook_outbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chuck Smith
|
|
@@ -23,6 +23,34 @@ dependencies:
|
|
|
23
23
|
- - ">="
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
25
|
version: '7.2'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: importmap-rails
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: turbo-rails
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
type: :runtime
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
26
54
|
description: A Rails engine for sending outgoing webhooks with HMAC signing, ActiveJob-based
|
|
27
55
|
retry, and delivery logging.
|
|
28
56
|
email:
|
|
@@ -34,20 +62,58 @@ files:
|
|
|
34
62
|
- MIT-LICENSE
|
|
35
63
|
- README.md
|
|
36
64
|
- Rakefile
|
|
65
|
+
- UPGRADING.md
|
|
66
|
+
- app/assets/stylesheets/rails_webhook_outbox/_01_base.css
|
|
67
|
+
- app/assets/stylesheets/rails_webhook_outbox/_02_layout.css
|
|
68
|
+
- app/assets/stylesheets/rails_webhook_outbox/_03_table.css
|
|
69
|
+
- app/assets/stylesheets/rails_webhook_outbox/_04_badges.css
|
|
70
|
+
- app/assets/stylesheets/rails_webhook_outbox/_05_forms.css
|
|
71
|
+
- app/assets/stylesheets/rails_webhook_outbox/_06_filters.css
|
|
72
|
+
- app/assets/stylesheets/rails_webhook_outbox/_07_timeline.css
|
|
37
73
|
- app/controllers/rails_webhook_outbox/application_controller.rb
|
|
74
|
+
- app/controllers/rails_webhook_outbox/base_controller.rb
|
|
75
|
+
- app/controllers/rails_webhook_outbox/deliveries_controller.rb
|
|
76
|
+
- app/controllers/rails_webhook_outbox/events_controller.rb
|
|
77
|
+
- app/controllers/rails_webhook_outbox/overview_controller.rb
|
|
78
|
+
- app/controllers/rails_webhook_outbox/subscriptions_controller.rb
|
|
79
|
+
- app/helpers/rails_webhook_outbox/application_helper.rb
|
|
80
|
+
- app/javascript/rails_webhook_outbox/application.js
|
|
81
|
+
- app/javascript/rails_webhook_outbox/controllers/application.js
|
|
82
|
+
- app/javascript/rails_webhook_outbox/controllers/index.js
|
|
83
|
+
- app/javascript/rails_webhook_outbox/controllers/secret_controller.js
|
|
38
84
|
- app/jobs/rails_webhook_outbox/application_job.rb
|
|
39
85
|
- app/jobs/rails_webhook_outbox/delivery_job.rb
|
|
40
86
|
- app/mailers/rails_webhook_outbox/application_mailer.rb
|
|
41
87
|
- app/models/rails_webhook_outbox/application_record.rb
|
|
42
88
|
- app/models/rails_webhook_outbox/delivery.rb
|
|
89
|
+
- app/models/rails_webhook_outbox/delivery_attempt.rb
|
|
90
|
+
- app/models/rails_webhook_outbox/overview.rb
|
|
43
91
|
- app/models/rails_webhook_outbox/subscription.rb
|
|
92
|
+
- app/views/layouts/rails_webhook_outbox/application.html.erb
|
|
93
|
+
- app/views/rails_webhook_outbox/deliveries/_detail.html.erb
|
|
94
|
+
- app/views/rails_webhook_outbox/deliveries/_row.html.erb
|
|
95
|
+
- app/views/rails_webhook_outbox/deliveries/_timeline.html.erb
|
|
96
|
+
- app/views/rails_webhook_outbox/deliveries/index.html.erb
|
|
97
|
+
- app/views/rails_webhook_outbox/deliveries/retry.turbo_stream.erb
|
|
98
|
+
- app/views/rails_webhook_outbox/deliveries/show.html.erb
|
|
99
|
+
- app/views/rails_webhook_outbox/events/index.html.erb
|
|
100
|
+
- app/views/rails_webhook_outbox/overview/_recent_failures.html.erb
|
|
101
|
+
- app/views/rails_webhook_outbox/overview/_stats.html.erb
|
|
102
|
+
- app/views/rails_webhook_outbox/overview/show.html.erb
|
|
103
|
+
- app/views/rails_webhook_outbox/subscriptions/_form.html.erb
|
|
104
|
+
- app/views/rails_webhook_outbox/subscriptions/edit.html.erb
|
|
105
|
+
- app/views/rails_webhook_outbox/subscriptions/index.html.erb
|
|
106
|
+
- app/views/rails_webhook_outbox/subscriptions/new.html.erb
|
|
107
|
+
- app/views/rails_webhook_outbox/subscriptions/show.html.erb
|
|
108
|
+
- config/importmap.rb
|
|
44
109
|
- config/routes.rb
|
|
45
110
|
- db/migrate/20260624000001_create_webhook_outbox_subscriptions.rb
|
|
46
111
|
- db/migrate/20260624000002_create_webhook_outbox_deliveries.rb
|
|
47
112
|
- db/migrate/20260629000002_add_idempotency_key_to_webhook_outbox_deliveries.rb
|
|
113
|
+
- db/migrate/20260701000001_add_secret_rotation_to_webhook_outbox_subscriptions.rb
|
|
114
|
+
- db/migrate/20260701000002_add_consecutive_failures_to_webhook_outbox_subscriptions.rb
|
|
115
|
+
- db/migrate/20261027000001_create_webhook_outbox_delivery_attempts.rb
|
|
48
116
|
- lib/generators/rails_webhook_outbox/install/install_generator.rb
|
|
49
|
-
- lib/generators/rails_webhook_outbox/install/templates/create_webhook_outbox_deliveries.rb.tt
|
|
50
|
-
- lib/generators/rails_webhook_outbox/install/templates/create_webhook_outbox_subscriptions.rb.tt
|
|
51
117
|
- lib/generators/rails_webhook_outbox/install/templates/initializer.rb
|
|
52
118
|
- lib/rails_webhook_outbox.rb
|
|
53
119
|
- lib/rails_webhook_outbox/configuration.rb
|
|
@@ -56,6 +122,7 @@ files:
|
|
|
56
122
|
- lib/rails_webhook_outbox/engine.rb
|
|
57
123
|
- lib/rails_webhook_outbox/payload_size_error.rb
|
|
58
124
|
- lib/rails_webhook_outbox/rspec_matchers.rb
|
|
125
|
+
- lib/rails_webhook_outbox/secret_rotation_error.rb
|
|
59
126
|
- lib/rails_webhook_outbox/sender.rb
|
|
60
127
|
- lib/rails_webhook_outbox/signature.rb
|
|
61
128
|
- lib/rails_webhook_outbox/testing.rb
|
data/lib/generators/rails_webhook_outbox/install/templates/create_webhook_outbox_deliveries.rb.tt
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
class CreateWebhookOutboxDeliveries < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :webhook_outbox_deliveries do |t|
|
|
4
|
-
t.references :subscription, null: false, foreign_key: { to_table: :webhook_outbox_subscriptions }
|
|
5
|
-
t.string :event, null: false
|
|
6
|
-
t.json :payload, null: false
|
|
7
|
-
t.integer :status, null: false, default: 0
|
|
8
|
-
t.integer :response_code
|
|
9
|
-
t.text :response_body
|
|
10
|
-
t.integer :attempts, null: false, default: 0
|
|
11
|
-
t.string :idempotency_key
|
|
12
|
-
t.datetime :delivered_at
|
|
13
|
-
t.datetime :next_retry_at
|
|
14
|
-
t.timestamps
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
add_index :webhook_outbox_deliveries, :status
|
|
18
|
-
add_index :webhook_outbox_deliveries, :event
|
|
19
|
-
add_index :webhook_outbox_deliveries, [:subscription_id, :created_at]
|
|
20
|
-
end
|
|
21
|
-
end
|
data/lib/generators/rails_webhook_outbox/install/templates/create_webhook_outbox_subscriptions.rb.tt
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
class CreateWebhookOutboxSubscriptions < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
|
|
2
|
-
def change
|
|
3
|
-
create_table :webhook_outbox_subscriptions do |t|
|
|
4
|
-
t.string :url, null: false
|
|
5
|
-
t.string :secret, null: false
|
|
6
|
-
t.json :events, null: false, default: []
|
|
7
|
-
t.boolean :active, null: false, default: true
|
|
8
|
-
t.string :description
|
|
9
|
-
t.json :metadata, default: {}
|
|
10
|
-
t.timestamps
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|