bullet_train-outgoing_webhooks-core 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +29 -0
- data/Rakefile +8 -0
- data/app/assets/config/bullet_train_outgoing_webhooks_core_manifest.js +0 -0
- data/app/jobs/webhooks/outgoing/delivery_job.rb +7 -0
- data/app/models/concerns/webhooks/outgoing/has_uuid.rb +21 -0
- data/app/models/concerns/webhooks/outgoing/issuing_model.rb +49 -0
- data/app/models/concerns/webhooks/outgoing/team_support.rb +15 -0
- data/app/models/outgoing.rb +5 -0
- data/app/models/webhooks/outgoing/delivery.rb +79 -0
- data/app/models/webhooks/outgoing/delivery_attempt.rb +65 -0
- data/app/models/webhooks/outgoing/endpoint.rb +32 -0
- data/app/models/webhooks/outgoing/event.rb +41 -0
- data/app/models/webhooks/outgoing/event_type.rb +13 -0
- data/app/models/webhooks/outgoing.rb +5 -0
- data/config/models/webhooks/outgoing/event_types.yml +9 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20180420013127_create_webhooks_outgoing_endpoints.rb +10 -0
- data/db/migrate/20180420013505_create_webhooks_outgoing_endpoint_event_types.rb +10 -0
- data/db/migrate/20180420013852_create_webhooks_outgoing_event_types.rb +9 -0
- data/db/migrate/20180420014623_create_webhooks_outgoing_events.rb +12 -0
- data/db/migrate/20180420021016_create_webhooks_outgoing_deliveries.rb +11 -0
- data/db/migrate/20180420022027_add_team_to_webhooks_outgoing_events.rb +5 -0
- data/db/migrate/20180420165345_create_webhooks_outgoing_delivery_attempts.rb +11 -0
- data/db/migrate/20180420172112_add_error_message_to_webhooks_outgoing_delivery_attempt.rb +6 -0
- data/db/migrate/20181012234232_add_name_to_webhooks_outgoing_endpoints.rb +5 -0
- data/db/migrate/20181013030208_add_delivered_at_to_webhooks_outgoing_deliveries.rb +5 -0
- data/db/migrate/20181013165056_add_uuid_to_webhooks_outgoing_events.rb +5 -0
- data/db/migrate/20181013174539_add_payload_to_webhooks_outgoing_events.rb +5 -0
- data/db/migrate/20181013192951_add_attempt_number_to_webhooks_outgoing_delivery_attempts.rb +5 -0
- data/db/migrate/20210805060451_change_body_to_data_on_webhooks_outgoing_events.rb +5 -0
- data/db/migrate/20211126230846_add_event_type_ids_to_webhooks_outgoing_endpoints.rb +5 -0
- data/db/migrate/20211126230847_migrate_event_type_ids_on_webhooks_outgoing_endpoints.rb +8 -0
- data/db/migrate/20211127013539_remove_event_type_from_webhooks_outgoing_events.rb +5 -0
- data/db/migrate/20211127013800_add_new_event_type_id_to_webhooks_outgoing_events.rb +5 -0
- data/db/migrate/20211127014001_migrate_event_types_on_webhooks_outgoing_events.rb +10 -0
- data/db/migrate/20211127015712_drop_webhooks_outgoing_endpoint_event_types.rb +9 -0
- data/db/migrate/20211127015713_drop_webhooks_outgoing_event_types.rb +9 -0
- data/lib/bullet_train/outgoing_webhooks/core/engine.rb +8 -0
- data/lib/bullet_train/outgoing_webhooks/core/version.rb +7 -0
- data/lib/bullet_train/outgoing_webhooks/core.rb +10 -0
- data/lib/tasks/bullet_train/outgoing_webhooks/core_tasks.rake +4 -0
- metadata +103 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: be13c183fdbc243bb02ccc3053bee0e9daa369eae1ee7a2b35c602365d3115c7
|
4
|
+
data.tar.gz: 2def8c82a2551adef85f807ba76741a0b819f58e2ab618ebbdd49eff2cf2ca9e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 668fbd53b8f4271b90ef62d7bc097ee97a3012ccda9d84c52588c7c6cb2193a0ee3a5d29abde1ca88c00d61323c204927e897f9bd5531c074c62a2cf3c9f23a1
|
7
|
+
data.tar.gz: 73a1cee86a21509e18887eafda93d7dae31393645dc2a31c9b823190ec51ee056e6947b23ec501442ae4a3e0b6cbdb3eb1193711caa1bd5bd99d0e3460113ca3
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2022 Andrew Culver
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Bullet Train Outgoing Webhooks Core
|
2
|
+
|
3
|
+
Bullet Train Outgoing Webhooks Core allows users of your Rails application to subscribe and receive webhooks when activity takes place in your application. It was developed by [Andrew Culver](https://twitter.com/andrewculver) and extracted from [Bullet Train](https://bullettrain.co).
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
How to use my plugin.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem "bullet_train-outgoing_webhooks-core"
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
```bash
|
17
|
+
$ bundle
|
18
|
+
```
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
```bash
|
22
|
+
$ gem install bullet_train-outgoing_webhooks-core
|
23
|
+
```
|
24
|
+
|
25
|
+
## Contributing
|
26
|
+
Contribution directions go here.
|
27
|
+
|
28
|
+
## License
|
29
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Webhooks::Outgoing::HasUuid
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
# define relationships.
|
5
|
+
included do
|
6
|
+
after_initialize do
|
7
|
+
self.uuid ||= SecureRandom.hex
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# define class methods.
|
12
|
+
module ClassMethods
|
13
|
+
end
|
14
|
+
|
15
|
+
# define object methods.
|
16
|
+
def short_uuid
|
17
|
+
self.uuid.first(7)
|
18
|
+
rescue
|
19
|
+
"nil"
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Webhooks::Outgoing::IssuingModel
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
# define relationships.
|
5
|
+
included do
|
6
|
+
after_commit :generate_created_webhook, on: [:create]
|
7
|
+
after_commit :generate_updated_webhook, on: [:update]
|
8
|
+
after_commit :generate_deleted_webhook, on: [:destroy]
|
9
|
+
has_many :webhooks_outgoing_events, as: :subject, class_name: "Webhooks::Outgoing::Event", dependent: :nullify
|
10
|
+
end
|
11
|
+
|
12
|
+
# define class methods.
|
13
|
+
module ClassMethods
|
14
|
+
end
|
15
|
+
|
16
|
+
def generate_webhook(action)
|
17
|
+
# we can only generate webhooks for objects that return their team.
|
18
|
+
return unless respond_to? :team
|
19
|
+
|
20
|
+
# Try to find an event type definition for this action.
|
21
|
+
event_type = Webhooks::Outgoing::EventType.find_by(id: "#{self.class.name.underscore}.#{action}")
|
22
|
+
|
23
|
+
# If the event type is defined as one that people can be subscribed to,
|
24
|
+
# and this object has a team where an associated outgoing webhooks endpoint could be registered.
|
25
|
+
if event_type && team
|
26
|
+
|
27
|
+
# Only generate an event record if an endpoint is actually listening for this event type.
|
28
|
+
if team.webhooks_outgoing_endpoints.listening_for_event_type_id(event_type.id).any?
|
29
|
+
data = "Api::V1::#{self.class.name}Serializer".constantize.new(self).serializable_hash[:data]
|
30
|
+
webhook = team.webhooks_outgoing_events.create(event_type_id: event_type.id, subject: self, data: data)
|
31
|
+
webhook.deliver
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def generate_created_webhook
|
37
|
+
generate_webhook("created")
|
38
|
+
end
|
39
|
+
|
40
|
+
def generate_updated_webhook
|
41
|
+
generate_webhook("updated")
|
42
|
+
end
|
43
|
+
|
44
|
+
def generate_deleted_webhook
|
45
|
+
return false unless respond_to?(:team)
|
46
|
+
return false if team&.being_destroyed?
|
47
|
+
generate_webhook("deleted")
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Webhooks::Outgoing::TeamSupport
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
has_many :webhooks_outgoing_endpoints, class_name: "Webhooks::Outgoing::Endpoint", dependent: :destroy
|
6
|
+
has_many :webhooks_outgoing_events, class_name: "Webhooks::Outgoing::Event", dependent: :destroy
|
7
|
+
|
8
|
+
before_destroy :mark_for_destruction, prepend: true
|
9
|
+
end
|
10
|
+
|
11
|
+
def mark_for_destruction
|
12
|
+
# This allows downstream logic to check whether a team is being destroyed in order to bypass webhook issuance.
|
13
|
+
update_column(:being_destroyed, true)
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
class Webhooks::Outgoing::Delivery < ApplicationRecord
|
2
|
+
# 🚅 add concerns above.
|
3
|
+
|
4
|
+
belongs_to :endpoint, class_name: "Webhooks::Outgoing::Endpoint"
|
5
|
+
belongs_to :event, class_name: "Webhooks::Outgoing::Event"
|
6
|
+
has_one :team, through: :endpoint
|
7
|
+
|
8
|
+
ATTEMPT_SCHEDULE = {
|
9
|
+
1 => 15.seconds,
|
10
|
+
2 => 1.minute,
|
11
|
+
3 => 5.minutes,
|
12
|
+
4 => 15.minutes,
|
13
|
+
5 => 1.hour,
|
14
|
+
}
|
15
|
+
|
16
|
+
# 🚅 add belongs_to associations above.
|
17
|
+
|
18
|
+
has_many :delivery_attempts, class_name: "Webhooks::Outgoing::DeliveryAttempt", dependent: :destroy, foreign_key: :delivery_id
|
19
|
+
# 🚅 add has_many associations above.
|
20
|
+
|
21
|
+
# 🚅 add has_one associations above.
|
22
|
+
|
23
|
+
# 🚅 add scopes above.
|
24
|
+
|
25
|
+
# 🚅 add validations above.
|
26
|
+
|
27
|
+
# 🚅 add callbacks above.
|
28
|
+
|
29
|
+
# 🚅 add delegations above.
|
30
|
+
|
31
|
+
def label_string
|
32
|
+
event.short_uuid
|
33
|
+
end
|
34
|
+
|
35
|
+
def next_reattempt_delay
|
36
|
+
ATTEMPT_SCHEDULE[attempt_count]
|
37
|
+
end
|
38
|
+
|
39
|
+
def deliver_async
|
40
|
+
if still_attempting?
|
41
|
+
Webhooks::Outgoing::DeliveryJob.set(wait: next_reattempt_delay).perform_later(self)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def deliver
|
46
|
+
if delivery_attempts.create.attempt
|
47
|
+
touch(:delivered_at)
|
48
|
+
else
|
49
|
+
deliver_async
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def attempt_count
|
54
|
+
delivery_attempts.count
|
55
|
+
end
|
56
|
+
|
57
|
+
def delivered?
|
58
|
+
delivered_at.present?
|
59
|
+
end
|
60
|
+
|
61
|
+
def still_attempting?
|
62
|
+
return false if delivered?
|
63
|
+
attempt_count < max_attempts
|
64
|
+
end
|
65
|
+
|
66
|
+
def failed?
|
67
|
+
!(delivered? || still_attempting?)
|
68
|
+
end
|
69
|
+
|
70
|
+
def name
|
71
|
+
event.short_uuid
|
72
|
+
end
|
73
|
+
|
74
|
+
def max_attempts
|
75
|
+
ATTEMPT_SCHEDULE.keys.max
|
76
|
+
end
|
77
|
+
|
78
|
+
# 🚅 add methods above.
|
79
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
class Webhooks::Outgoing::DeliveryAttempt < ApplicationRecord
|
2
|
+
# 🚅 add concerns above.
|
3
|
+
|
4
|
+
belongs_to :delivery
|
5
|
+
has_one :team, through: :delivery
|
6
|
+
scope :successful, -> { where(response_code: 200) }
|
7
|
+
|
8
|
+
before_create do
|
9
|
+
self.attempt_number = delivery.attempt_count + 1
|
10
|
+
end
|
11
|
+
|
12
|
+
def still_attempting?
|
13
|
+
error_message.nil? && response_code.nil?
|
14
|
+
end
|
15
|
+
|
16
|
+
def successful?
|
17
|
+
[200, 201, 202, 203, 204, 205, 206, 207, 226].include?(response_code)
|
18
|
+
end
|
19
|
+
|
20
|
+
def failed?
|
21
|
+
!(successful? || still_attempting?)
|
22
|
+
end
|
23
|
+
|
24
|
+
def attempt
|
25
|
+
uri = URI.parse(delivery.endpoint_url)
|
26
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
27
|
+
http.use_ssl = true if uri.scheme == "https"
|
28
|
+
request = Net::HTTP::Post.new(uri.path)
|
29
|
+
request.add_field("Content-Type", "application/json")
|
30
|
+
request.body = delivery.event.payload.to_json
|
31
|
+
|
32
|
+
begin
|
33
|
+
response = http.request(request)
|
34
|
+
self.response_message = response.message
|
35
|
+
self.response_code = response.code
|
36
|
+
self.response_body = response.body
|
37
|
+
rescue Exception => exception
|
38
|
+
self.response_code = 0
|
39
|
+
self.error_message = exception.message
|
40
|
+
end
|
41
|
+
|
42
|
+
save
|
43
|
+
successful?
|
44
|
+
end
|
45
|
+
|
46
|
+
def label_string
|
47
|
+
"#{attempt_number.ordinalize} Attempt"
|
48
|
+
end
|
49
|
+
# 🚅 add belongs_to associations above.
|
50
|
+
|
51
|
+
# 🚅 add has_many associations above.
|
52
|
+
|
53
|
+
# 🚅 add has_one associations above.
|
54
|
+
|
55
|
+
# 🚅 add scopes above.
|
56
|
+
|
57
|
+
validates :response_code, presence: true
|
58
|
+
# 🚅 add validations above.
|
59
|
+
|
60
|
+
# 🚅 add callbacks above.
|
61
|
+
|
62
|
+
# 🚅 add delegations above.
|
63
|
+
|
64
|
+
# 🚅 add methods above.
|
65
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class Webhooks::Outgoing::Endpoint < ApplicationRecord
|
2
|
+
# 🚅 add concerns above.
|
3
|
+
|
4
|
+
belongs_to :team
|
5
|
+
# 🚅 add belongs_to associations above.
|
6
|
+
|
7
|
+
has_many :deliveries, class_name: "Webhooks::Outgoing::Delivery", dependent: :destroy, foreign_key: :endpoint_id
|
8
|
+
has_many :events, -> { distinct }, through: :deliveries
|
9
|
+
# 🚅 add has_many associations above.
|
10
|
+
|
11
|
+
# 🚅 add has_one associations above.
|
12
|
+
|
13
|
+
scope :listening_for_event_type_id, ->(event_type_id) { where("event_type_ids @> ? OR event_type_ids = '[]'::jsonb", "\"#{event_type_id}\"") }
|
14
|
+
# 🚅 add scopes above.
|
15
|
+
|
16
|
+
validates :name, presence: true
|
17
|
+
# 🚅 add validations above.
|
18
|
+
|
19
|
+
# 🚅 add callbacks above.
|
20
|
+
|
21
|
+
# 🚅 add delegations above.
|
22
|
+
|
23
|
+
def valid_event_types
|
24
|
+
Webhooks::Outgoing::EventType.all
|
25
|
+
end
|
26
|
+
|
27
|
+
def event_types
|
28
|
+
event_type_ids.map { |id| Webhooks::Outgoing::EventType.find(id) }
|
29
|
+
end
|
30
|
+
|
31
|
+
# 🚅 add methods above.
|
32
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
class Webhooks::Outgoing::Event < ApplicationRecord
|
2
|
+
include HasUuid
|
3
|
+
belongs_to :team
|
4
|
+
belongs_to :event_type, class_name: "Webhooks::Outgoing::EventType"
|
5
|
+
belongs_to :subject, polymorphic: true
|
6
|
+
has_many :deliveries, dependent: :destroy
|
7
|
+
|
8
|
+
before_create do
|
9
|
+
self.payload = generate_payload
|
10
|
+
end
|
11
|
+
|
12
|
+
def generate_payload
|
13
|
+
{
|
14
|
+
event_id: uuid,
|
15
|
+
event_type: event_type_id,
|
16
|
+
subject_id: subject_id,
|
17
|
+
subject_type: subject_type,
|
18
|
+
data: data
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def event_type_name
|
23
|
+
payload.dig("event_type")
|
24
|
+
end
|
25
|
+
|
26
|
+
def endpoints
|
27
|
+
team.webhooks_outgoing_endpoints.listening_for_event_type_id(event_type_id)
|
28
|
+
end
|
29
|
+
|
30
|
+
def deliver
|
31
|
+
endpoints.each do |endpoint|
|
32
|
+
unless endpoint.deliveries.where(event: self).any?
|
33
|
+
endpoint.deliveries.create(event: self, endpoint_url: endpoint.url).deliver_async
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def label_string
|
39
|
+
short_uuid
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class Webhooks::Outgoing::EventType < ApplicationHash
|
2
|
+
self.data = YAML.load_file("config/models/webhooks/outgoing/event_types.yml").map do |topic, events|
|
3
|
+
events.map { |event| event == "crud" ? ["created", "updated", "deleted"] : event }.flatten.map { |event| {id: "#{topic}.#{event}"} }
|
4
|
+
end.flatten
|
5
|
+
|
6
|
+
def label_string
|
7
|
+
name
|
8
|
+
end
|
9
|
+
|
10
|
+
def name
|
11
|
+
id
|
12
|
+
end
|
13
|
+
end
|
data/config/routes.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
class CreateWebhooksOutgoingDeliveryAttempts < ActiveRecord::Migration[5.2]
|
2
|
+
def change
|
3
|
+
create_table :webhooks_outgoing_delivery_attempts do |t|
|
4
|
+
t.integer :delivery_id
|
5
|
+
t.integer :response_code
|
6
|
+
t.text :response_body
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class MigrateEventTypeIdsOnWebhooksOutgoingEndpoints < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
Webhooks::Outgoing::Endpoint.find_each do |endpoint|
|
4
|
+
event_type_ids = ActiveRecord::Base.connection.execute("SELECT * FROM webhooks_outgoing_endpoint_event_types JOIN webhooks_outgoing_event_types ON webhooks_outgoing_endpoint_event_types.event_type_id = webhooks_outgoing_event_types.id WHERE endpoint_id = #{endpoint.id}").to_a.map { |result| result.dig("name") }
|
5
|
+
endpoint.update(event_type_ids: event_type_ids)
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
metadata
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bullet_train-outgoing_webhooks-core
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew Culver
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-01-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 7.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 7.0.0
|
27
|
+
description: Allow users of your Rails application to subscribe and receive webhooks
|
28
|
+
when activity takes place in your application.
|
29
|
+
email:
|
30
|
+
- andrew.culver@gmail.com
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- MIT-LICENSE
|
36
|
+
- README.md
|
37
|
+
- Rakefile
|
38
|
+
- app/assets/config/bullet_train_outgoing_webhooks_core_manifest.js
|
39
|
+
- app/jobs/webhooks/outgoing/delivery_job.rb
|
40
|
+
- app/models/concerns/webhooks/outgoing/has_uuid.rb
|
41
|
+
- app/models/concerns/webhooks/outgoing/issuing_model.rb
|
42
|
+
- app/models/concerns/webhooks/outgoing/team_support.rb
|
43
|
+
- app/models/outgoing.rb
|
44
|
+
- app/models/webhooks/outgoing.rb
|
45
|
+
- app/models/webhooks/outgoing/delivery.rb
|
46
|
+
- app/models/webhooks/outgoing/delivery_attempt.rb
|
47
|
+
- app/models/webhooks/outgoing/endpoint.rb
|
48
|
+
- app/models/webhooks/outgoing/event.rb
|
49
|
+
- app/models/webhooks/outgoing/event_type.rb
|
50
|
+
- config/models/webhooks/outgoing/event_types.yml
|
51
|
+
- config/routes.rb
|
52
|
+
- db/migrate/20180420013127_create_webhooks_outgoing_endpoints.rb
|
53
|
+
- db/migrate/20180420013505_create_webhooks_outgoing_endpoint_event_types.rb
|
54
|
+
- db/migrate/20180420013852_create_webhooks_outgoing_event_types.rb
|
55
|
+
- db/migrate/20180420014623_create_webhooks_outgoing_events.rb
|
56
|
+
- db/migrate/20180420021016_create_webhooks_outgoing_deliveries.rb
|
57
|
+
- db/migrate/20180420022027_add_team_to_webhooks_outgoing_events.rb
|
58
|
+
- db/migrate/20180420165345_create_webhooks_outgoing_delivery_attempts.rb
|
59
|
+
- db/migrate/20180420172112_add_error_message_to_webhooks_outgoing_delivery_attempt.rb
|
60
|
+
- db/migrate/20181012234232_add_name_to_webhooks_outgoing_endpoints.rb
|
61
|
+
- db/migrate/20181013030208_add_delivered_at_to_webhooks_outgoing_deliveries.rb
|
62
|
+
- db/migrate/20181013165056_add_uuid_to_webhooks_outgoing_events.rb
|
63
|
+
- db/migrate/20181013174539_add_payload_to_webhooks_outgoing_events.rb
|
64
|
+
- db/migrate/20181013192951_add_attempt_number_to_webhooks_outgoing_delivery_attempts.rb
|
65
|
+
- db/migrate/20210805060451_change_body_to_data_on_webhooks_outgoing_events.rb
|
66
|
+
- db/migrate/20211126230846_add_event_type_ids_to_webhooks_outgoing_endpoints.rb
|
67
|
+
- db/migrate/20211126230847_migrate_event_type_ids_on_webhooks_outgoing_endpoints.rb
|
68
|
+
- db/migrate/20211127013539_remove_event_type_from_webhooks_outgoing_events.rb
|
69
|
+
- db/migrate/20211127013800_add_new_event_type_id_to_webhooks_outgoing_events.rb
|
70
|
+
- db/migrate/20211127014001_migrate_event_types_on_webhooks_outgoing_events.rb
|
71
|
+
- db/migrate/20211127015712_drop_webhooks_outgoing_endpoint_event_types.rb
|
72
|
+
- db/migrate/20211127015713_drop_webhooks_outgoing_event_types.rb
|
73
|
+
- lib/bullet_train/outgoing_webhooks/core.rb
|
74
|
+
- lib/bullet_train/outgoing_webhooks/core/engine.rb
|
75
|
+
- lib/bullet_train/outgoing_webhooks/core/version.rb
|
76
|
+
- lib/tasks/bullet_train/outgoing_webhooks/core_tasks.rake
|
77
|
+
homepage: https://github.com/bullet-train-co/bullet_train-outgoing_webhooks-core
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata:
|
81
|
+
homepage_uri: https://github.com/bullet-train-co/bullet_train-outgoing_webhooks-core
|
82
|
+
source_code_uri: https://github.com/bullet-train-co/bullet_train-outgoing_webhooks-core
|
83
|
+
post_install_message:
|
84
|
+
rdoc_options: []
|
85
|
+
require_paths:
|
86
|
+
- lib
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
requirements: []
|
98
|
+
rubygems_version: 3.2.22
|
99
|
+
signing_key:
|
100
|
+
specification_version: 4
|
101
|
+
summary: Allow users of your Rails application to subscribe and receive webhooks when
|
102
|
+
activity takes place in your application.
|
103
|
+
test_files: []
|