bullet_train-outgoing_webhooks 1.6.26 → 1.6.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/webhooks/outgoing/delivery_attempt_support.rb +2 -1
- data/app/models/concerns/webhooks/outgoing/delivery_support.rb +1 -1
- data/app/models/webhooks/outgoing/event_type.rb +1 -1
- data/lib/bullet_train/outgoing_webhooks/version.rb +1 -1
- metadata +3 -4
- data/config/models/webhooks/outgoing/event_types.yml +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8f079be27c5633d3a789ab4a6c001394548dae38dbe6bc6dca08ca9776174b6
|
4
|
+
data.tar.gz: 64e489f7fb7262a99b6513cef9f09e50b089ebe114d53b996f9571b378459c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6509e1a134d258a3c61ee038041019d8fa99220b457875f4d88e8b46c2c50d373ae6a581b1ec803e98f01531d3eccc72009225bb352a1269281a4a7abdb3d693
|
7
|
+
data.tar.gz: cde8cfa17d9bebaffef0e4b2a3379ed8847f52d0cdfabf99829dd2eaab70288e873916ff9dd0b88c489729f67b5262657828060e815930488aa13405bb1d7aa3
|
@@ -9,7 +9,7 @@ module Webhooks::Outgoing::DeliveryAttemptSupport
|
|
9
9
|
has_one :team, through: :delivery unless BulletTrain::OutgoingWebhooks.parent_class_specified?
|
10
10
|
scope :successful, -> { where(response_code: SUCCESS_RESPONSE_CODES) }
|
11
11
|
|
12
|
-
|
12
|
+
after_initialize do
|
13
13
|
self.attempt_number = delivery.attempt_count + 1
|
14
14
|
end
|
15
15
|
|
@@ -35,6 +35,7 @@ module Webhooks::Outgoing::DeliveryAttemptSupport
|
|
35
35
|
unless allowed_uri?(uri)
|
36
36
|
self.response_code = 0
|
37
37
|
self.error_message = "URI is not allowed: " + uri
|
38
|
+
save
|
38
39
|
return false
|
39
40
|
end
|
40
41
|
end
|
@@ -34,7 +34,7 @@ module Webhooks::Outgoing::DeliverySupport
|
|
34
34
|
def deliver
|
35
35
|
# TODO If we ever do away with the `async: true` default for webhook generation, then I believe this needs to
|
36
36
|
# change otherwise we'd be attempting the first delivery of webhooks inline.
|
37
|
-
if delivery_attempts.
|
37
|
+
if delivery_attempts.new.attempt
|
38
38
|
touch(:delivered_at)
|
39
39
|
else
|
40
40
|
deliver_async
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class Webhooks::Outgoing::EventType < ApplicationHash
|
2
|
-
self.data = YAML.load_file("config/models/webhooks/outgoing/event_types.yml").map do |topic, events|
|
2
|
+
self.data = YAML.load_file("#{Rails.root}/config/models/webhooks/outgoing/event_types.yml").map do |topic, events|
|
3
3
|
events.map { |event| (event == "crud") ? ["created", "updated", "deleted"] : event }.flatten.map { |event| {id: "#{topic}.#{event}"} }
|
4
4
|
end.flatten
|
5
5
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train-outgoing_webhooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -138,7 +138,6 @@ files:
|
|
138
138
|
- config/locales/en/webhooks/outgoing/delivery_attempts.en.yml
|
139
139
|
- config/locales/en/webhooks/outgoing/endpoints.en.yml
|
140
140
|
- config/locales/en/webhooks/outgoing/events.en.yml
|
141
|
-
- config/models/webhooks/outgoing/event_types.yml
|
142
141
|
- config/routes.rb
|
143
142
|
- db/migrate/20180420013127_create_webhooks_outgoing_endpoints.rb
|
144
143
|
- db/migrate/20180420013505_create_webhooks_outgoing_endpoint_event_types.rb
|
@@ -191,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
190
|
- !ruby/object:Gem::Version
|
192
191
|
version: '0'
|
193
192
|
requirements: []
|
194
|
-
rubygems_version: 3.
|
193
|
+
rubygems_version: 3.5.3
|
195
194
|
signing_key:
|
196
195
|
specification_version: 4
|
197
196
|
summary: Allow users of your Rails application to subscribe and receive webhooks when
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# This is a default implementation of this file that we supply to help with gem tests.
|
2
|
-
# The version from the starter repo will take precedence when running the full app.
|
3
|
-
# You can think of the file in the starter repo as having been ejected from this gem.
|
4
|
-
|
5
|
-
# This file is here just to allow tests to pass when run from inside this gem directory.
|
6
|
-
# It wasn't found if I put the file in test/dummy/config/models/webhooks/outgoing, so
|
7
|
-
# maybe we need a better resolution method?
|
8
|
-
scaffolding/absolutely_abstract/creative_concept:
|
9
|
-
# This automatically generates `created`, `updated`, and `deleted` webhook events.
|
10
|
-
- crud
|
11
|
-
scaffolding/completely_concrete/tangible_thing:
|
12
|
-
- crud
|
13
|
-
invitation:
|
14
|
-
- crud
|
15
|
-
membership:
|
16
|
-
- crud
|