bullet_train-outgoing_webhooks 1.0.0 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +11 -26
  4. data/Rakefile +5 -11
  5. data/app/assets/config/bullet_train_outgoing_webhooks_manifest.js +0 -0
  6. data/app/controllers/account/webhooks/outgoing/deliveries_controller.rb +79 -0
  7. data/app/controllers/account/webhooks/outgoing/delivery_attempts_controller.rb +80 -0
  8. data/app/controllers/account/webhooks/outgoing/endpoints_controller.rb +79 -0
  9. data/app/controllers/api/v1/webhooks/outgoing/deliveries_endpoint.rb +63 -0
  10. data/app/controllers/api/v1/webhooks/outgoing/delivery_attempts_endpoint.rb +65 -0
  11. data/app/controllers/api/v1/webhooks/outgoing/endpoints_endpoint.rb +119 -0
  12. data/app/jobs/webhooks/outgoing/delivery_job.rb +7 -0
  13. data/{lib → app}/models/concerns/webhooks/outgoing/issuing_model.rb +6 -14
  14. data/{lib → app}/models/concerns/webhooks/outgoing/team_support.rb +0 -0
  15. data/{lib → app}/models/webhooks/outgoing/delivery.rb +18 -1
  16. data/{lib → app}/models/webhooks/outgoing/delivery_attempt.rb +17 -1
  17. data/{lib → app}/models/webhooks/outgoing/endpoint.rb +15 -5
  18. data/{lib → app}/models/webhooks/outgoing/event.rb +3 -3
  19. data/{lib → app}/models/webhooks/outgoing/event_type.rb +4 -6
  20. data/{lib → app}/models/webhooks/outgoing.rb +0 -3
  21. data/app/models/webhooks.rb +5 -0
  22. data/app/serializers/api/v1/webhooks/outgoing/delivery_attempt_serializer.rb +16 -0
  23. data/app/serializers/api/v1/webhooks/outgoing/delivery_serializer.rb +14 -0
  24. data/app/serializers/api/v1/webhooks/outgoing/endpoint_serializer.rb +14 -0
  25. data/app/views/account/webhooks/outgoing/deliveries/_breadcrumbs.html.erb +8 -0
  26. data/app/views/account/webhooks/outgoing/deliveries/_delivery.json.jbuilder +10 -0
  27. data/app/views/account/webhooks/outgoing/deliveries/_form.html.erb +21 -0
  28. data/app/views/account/webhooks/outgoing/deliveries/_index.html.erb +73 -0
  29. data/app/views/account/webhooks/outgoing/deliveries/_menu_item.html.erb +10 -0
  30. data/app/views/account/webhooks/outgoing/deliveries/_success_indicator.html.erb +7 -0
  31. data/app/views/account/webhooks/outgoing/deliveries/edit.html.erb +12 -0
  32. data/app/views/account/webhooks/outgoing/deliveries/index.html.erb +6 -0
  33. data/app/views/account/webhooks/outgoing/deliveries/index.json.jbuilder +1 -0
  34. data/app/views/account/webhooks/outgoing/deliveries/new.html.erb +12 -0
  35. data/app/views/account/webhooks/outgoing/deliveries/show.html.erb +37 -0
  36. data/app/views/account/webhooks/outgoing/deliveries/show.json.jbuilder +1 -0
  37. data/app/views/account/webhooks/outgoing/delivery_attempts/_breadcrumbs.html.erb +8 -0
  38. data/app/views/account/webhooks/outgoing/delivery_attempts/_delivery_attempt.json.jbuilder +12 -0
  39. data/app/views/account/webhooks/outgoing/delivery_attempts/_form.html.erb +22 -0
  40. data/app/views/account/webhooks/outgoing/delivery_attempts/_index.html.erb +69 -0
  41. data/app/views/account/webhooks/outgoing/delivery_attempts/_menu_item.html.erb +10 -0
  42. data/app/views/account/webhooks/outgoing/delivery_attempts/_success_indicator.html.erb +7 -0
  43. data/app/views/account/webhooks/outgoing/delivery_attempts/edit.html.erb +12 -0
  44. data/app/views/account/webhooks/outgoing/delivery_attempts/index.html.erb +6 -0
  45. data/app/views/account/webhooks/outgoing/delivery_attempts/index.json.jbuilder +1 -0
  46. data/app/views/account/webhooks/outgoing/delivery_attempts/new.html.erb +12 -0
  47. data/app/views/account/webhooks/outgoing/delivery_attempts/show.html.erb +32 -0
  48. data/app/views/account/webhooks/outgoing/delivery_attempts/show.json.jbuilder +1 -0
  49. data/app/views/account/webhooks/outgoing/endpoints/_breadcrumbs.html.erb +8 -0
  50. data/app/views/account/webhooks/outgoing/endpoints/_endpoint.json.jbuilder +10 -0
  51. data/app/views/account/webhooks/outgoing/endpoints/_form.html.erb +21 -0
  52. data/app/views/account/webhooks/outgoing/endpoints/_index.html.erb +62 -0
  53. data/app/views/account/webhooks/outgoing/endpoints/_menu_item.html.erb +10 -0
  54. data/app/views/account/webhooks/outgoing/endpoints/edit.html.erb +12 -0
  55. data/app/views/account/webhooks/outgoing/endpoints/index.html.erb +6 -0
  56. data/app/views/account/webhooks/outgoing/endpoints/index.json.jbuilder +1 -0
  57. data/app/views/account/webhooks/outgoing/endpoints/new.html.erb +12 -0
  58. data/app/views/account/webhooks/outgoing/endpoints/show.html.erb +42 -0
  59. data/app/views/account/webhooks/outgoing/endpoints/show.json.jbuilder +1 -0
  60. data/config/locales/en/webhooks/outgoing/deliveries.en.yml +112 -0
  61. data/config/locales/en/webhooks/outgoing/delivery_attempts.en.yml +122 -0
  62. data/config/locales/en/webhooks/outgoing/endpoints.en.yml +108 -0
  63. data/config/locales/en/webhooks/outgoing/events.en.yml +10 -0
  64. data/config/routes.rb +18 -0
  65. data/db/migrate/20180420013127_create_webhooks_outgoing_endpoints.rb +10 -0
  66. data/db/migrate/20180420013505_create_webhooks_outgoing_endpoint_event_types.rb +10 -0
  67. data/db/migrate/20180420013852_create_webhooks_outgoing_event_types.rb +9 -0
  68. data/db/migrate/20180420014623_create_webhooks_outgoing_events.rb +12 -0
  69. data/db/migrate/20180420021016_create_webhooks_outgoing_deliveries.rb +11 -0
  70. data/db/migrate/20180420022027_add_team_to_webhooks_outgoing_events.rb +5 -0
  71. data/db/migrate/20180420165345_create_webhooks_outgoing_delivery_attempts.rb +11 -0
  72. data/db/migrate/20180420172112_add_error_message_to_webhooks_outgoing_delivery_attempt.rb +6 -0
  73. data/db/migrate/20181012234232_add_name_to_webhooks_outgoing_endpoints.rb +5 -0
  74. data/db/migrate/20181013030208_add_delivered_at_to_webhooks_outgoing_deliveries.rb +5 -0
  75. data/db/migrate/20181013165056_add_uuid_to_webhooks_outgoing_events.rb +5 -0
  76. data/db/migrate/20181013174539_add_payload_to_webhooks_outgoing_events.rb +5 -0
  77. data/db/migrate/20181013192951_add_attempt_number_to_webhooks_outgoing_delivery_attempts.rb +5 -0
  78. data/db/migrate/20210805060451_change_body_to_data_on_webhooks_outgoing_events.rb +5 -0
  79. data/db/migrate/20211126230846_add_event_type_ids_to_webhooks_outgoing_endpoints.rb +5 -0
  80. data/db/migrate/20211126230847_migrate_event_type_ids_on_webhooks_outgoing_endpoints.rb +8 -0
  81. data/db/migrate/20211127013539_remove_event_type_from_webhooks_outgoing_events.rb +5 -0
  82. data/db/migrate/20211127013800_add_new_event_type_id_to_webhooks_outgoing_events.rb +5 -0
  83. data/db/migrate/20211127014001_migrate_event_types_on_webhooks_outgoing_events.rb +10 -0
  84. data/db/migrate/20211127015712_drop_webhooks_outgoing_endpoint_event_types.rb +9 -0
  85. data/db/migrate/20211127015713_drop_webhooks_outgoing_event_types.rb +9 -0
  86. data/lib/bullet_train/outgoing_webhooks/engine.rb +13 -0
  87. data/lib/bullet_train/outgoing_webhooks/version.rb +1 -3
  88. data/lib/bullet_train/outgoing_webhooks.rb +2 -17
  89. data/lib/tasks/bullet_train/outgoing_webhooks_tasks.rake +4 -0
  90. metadata +97 -60
  91. data/.standard.yml +0 -2
  92. data/CHANGELOG.md +0 -5
  93. data/CODE_OF_CONDUCT.md +0 -84
  94. data/Gemfile +0 -12
  95. data/Gemfile.lock +0 -193
  96. data/LICENSE.txt +0 -21
  97. data/bin/console +0 -15
  98. data/bin/setup +0 -8
  99. data/lib/models/concerns/webhooks/outgoing/has_uuid.rb +0 -21
  100. data/lib/models/webhooks.rb +0 -2
  101. data/sig/bullet_train/outgoing_webhooks.rbs +0 -6
@@ -0,0 +1,5 @@
1
+ class AddUuidToWebhooksOutgoingEvents < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :webhooks_outgoing_events, :uuid, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddPayloadToWebhooksOutgoingEvents < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :webhooks_outgoing_events, :payload, :jsonb
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddAttemptNumberToWebhooksOutgoingDeliveryAttempts < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :webhooks_outgoing_delivery_attempts, :attempt_number, :integer
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class ChangeBodyToDataOnWebhooksOutgoingEvents < ActiveRecord::Migration[6.1]
2
+ def change
3
+ rename_column :webhooks_outgoing_events, :body, :data
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddEventTypeIdsToWebhooksOutgoingEndpoints < ActiveRecord::Migration[6.1]
2
+ def change
3
+ add_column :webhooks_outgoing_endpoints, :event_type_ids, :jsonb, default: []
4
+ end
5
+ 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
@@ -0,0 +1,5 @@
1
+ class RemoveEventTypeFromWebhooksOutgoingEvents < ActiveRecord::Migration[6.1]
2
+ def change
3
+ remove_reference :webhooks_outgoing_events, :event_type, null: false, foreign_key: false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddNewEventTypeIdToWebhooksOutgoingEvents < ActiveRecord::Migration[6.1]
2
+ def change
3
+ add_column :webhooks_outgoing_events, :event_type_id, :string
4
+ end
5
+ end
@@ -0,0 +1,10 @@
1
+ class MigrateEventTypesOnWebhooksOutgoingEvents < ActiveRecord::Migration[6.1]
2
+ def up
3
+ Webhooks::Outgoing::Event.find_each do |event|
4
+ event.update_column(:event_type_id, event.payload.dig("event_type"))
5
+ end
6
+ end
7
+
8
+ def down
9
+ end
10
+ end
@@ -0,0 +1,9 @@
1
+ class DropWebhooksOutgoingEndpointEventTypes < ActiveRecord::Migration[6.1]
2
+ def up
3
+ drop_table :webhooks_outgoing_endpoint_event_types
4
+ end
5
+
6
+ def down
7
+ raise ActiveRecord::IrreversibleMigration
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class DropWebhooksOutgoingEventTypes < ActiveRecord::Migration[6.1]
2
+ def up
3
+ drop_table :webhooks_outgoing_event_types
4
+ end
5
+
6
+ def down
7
+ raise ActiveRecord::IrreversibleMigration
8
+ end
9
+ end
@@ -0,0 +1,13 @@
1
+ module BulletTrain
2
+ module OutgoingWebhooks
3
+ class Engine < ::Rails::Engine
4
+ initializer "bullet_train.outgoing_webhooks.register_api_endpoints" do |app|
5
+ if BulletTrain::Api
6
+ BulletTrain::Api.endpoints << "Api::V1::Webhooks::Outgoing::EndpointsEndpoint"
7
+ BulletTrain::Api.endpoints << "Api::V1::Webhooks::Outgoing::DeliveriesEndpoint"
8
+ BulletTrain::Api.endpoints << "Api::V1::Webhooks::Outgoing::DeliveryAttemptsEndpoint"
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,7 +1,5 @@
1
- # frozen_string_literal: true
2
-
3
1
  module BulletTrain
4
2
  module OutgoingWebhooks
5
- VERSION = "1.0.0"
3
+ VERSION = "1.0.4"
6
4
  end
7
5
  end
@@ -1,23 +1,8 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "outgoing_webhooks/version"
4
-
5
- require_relative "../models/webhooks"
6
- require_relative "../models/webhooks/outgoing"
7
-
8
- require_relative "../models/concerns/webhooks/outgoing/issuing_model"
9
- require_relative "../models/concerns/webhooks/outgoing/team_support"
10
- require_relative "../models/concerns/webhooks/outgoing/has_uuid"
11
-
12
- require_relative "../models/webhooks/outgoing/delivery"
13
- require_relative "../models/webhooks/outgoing/delivery_attempt"
14
- require_relative "../models/webhooks/outgoing/endpoint"
15
- require_relative "../models/webhooks/outgoing/event"
16
- require_relative "../models/webhooks/outgoing/event_type"
1
+ require "bullet_train/outgoing_webhooks/version"
2
+ require "bullet_train/outgoing_webhooks/engine"
17
3
 
18
4
  module BulletTrain
19
5
  module OutgoingWebhooks
20
- class Error < StandardError; end
21
6
  # Your code goes here...
22
7
  end
23
8
  end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :bullet_train_outgoing_webhooks do
3
+ # # Task goes here
4
+ # end
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.0.0
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-15 00:00:00.000000000 Z
11
+ date: 2022-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,79 +16,116 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 7.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: activesupport
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: active_hash
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- description: Bullet Train Outgoing Webhooks helps you issue webhooks when activity
56
- takes place in your application.
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.
57
29
  email:
58
30
  - andrew.culver@gmail.com
59
31
  executables: []
60
32
  extensions: []
61
33
  extra_rdoc_files: []
62
34
  files:
63
- - ".standard.yml"
64
- - CHANGELOG.md
65
- - CODE_OF_CONDUCT.md
66
- - Gemfile
67
- - Gemfile.lock
68
- - LICENSE.txt
35
+ - MIT-LICENSE
69
36
  - README.md
70
37
  - Rakefile
71
- - bin/console
72
- - bin/setup
38
+ - app/assets/config/bullet_train_outgoing_webhooks_manifest.js
39
+ - app/controllers/account/webhooks/outgoing/deliveries_controller.rb
40
+ - app/controllers/account/webhooks/outgoing/delivery_attempts_controller.rb
41
+ - app/controllers/account/webhooks/outgoing/endpoints_controller.rb
42
+ - app/controllers/api/v1/webhooks/outgoing/deliveries_endpoint.rb
43
+ - app/controllers/api/v1/webhooks/outgoing/delivery_attempts_endpoint.rb
44
+ - app/controllers/api/v1/webhooks/outgoing/endpoints_endpoint.rb
45
+ - app/jobs/webhooks/outgoing/delivery_job.rb
46
+ - app/models/concerns/webhooks/outgoing/issuing_model.rb
47
+ - app/models/concerns/webhooks/outgoing/team_support.rb
48
+ - app/models/webhooks.rb
49
+ - app/models/webhooks/outgoing.rb
50
+ - app/models/webhooks/outgoing/delivery.rb
51
+ - app/models/webhooks/outgoing/delivery_attempt.rb
52
+ - app/models/webhooks/outgoing/endpoint.rb
53
+ - app/models/webhooks/outgoing/event.rb
54
+ - app/models/webhooks/outgoing/event_type.rb
55
+ - app/serializers/api/v1/webhooks/outgoing/delivery_attempt_serializer.rb
56
+ - app/serializers/api/v1/webhooks/outgoing/delivery_serializer.rb
57
+ - app/serializers/api/v1/webhooks/outgoing/endpoint_serializer.rb
58
+ - app/views/account/webhooks/outgoing/deliveries/_breadcrumbs.html.erb
59
+ - app/views/account/webhooks/outgoing/deliveries/_delivery.json.jbuilder
60
+ - app/views/account/webhooks/outgoing/deliveries/_form.html.erb
61
+ - app/views/account/webhooks/outgoing/deliveries/_index.html.erb
62
+ - app/views/account/webhooks/outgoing/deliveries/_menu_item.html.erb
63
+ - app/views/account/webhooks/outgoing/deliveries/_success_indicator.html.erb
64
+ - app/views/account/webhooks/outgoing/deliveries/edit.html.erb
65
+ - app/views/account/webhooks/outgoing/deliveries/index.html.erb
66
+ - app/views/account/webhooks/outgoing/deliveries/index.json.jbuilder
67
+ - app/views/account/webhooks/outgoing/deliveries/new.html.erb
68
+ - app/views/account/webhooks/outgoing/deliveries/show.html.erb
69
+ - app/views/account/webhooks/outgoing/deliveries/show.json.jbuilder
70
+ - app/views/account/webhooks/outgoing/delivery_attempts/_breadcrumbs.html.erb
71
+ - app/views/account/webhooks/outgoing/delivery_attempts/_delivery_attempt.json.jbuilder
72
+ - app/views/account/webhooks/outgoing/delivery_attempts/_form.html.erb
73
+ - app/views/account/webhooks/outgoing/delivery_attempts/_index.html.erb
74
+ - app/views/account/webhooks/outgoing/delivery_attempts/_menu_item.html.erb
75
+ - app/views/account/webhooks/outgoing/delivery_attempts/_success_indicator.html.erb
76
+ - app/views/account/webhooks/outgoing/delivery_attempts/edit.html.erb
77
+ - app/views/account/webhooks/outgoing/delivery_attempts/index.html.erb
78
+ - app/views/account/webhooks/outgoing/delivery_attempts/index.json.jbuilder
79
+ - app/views/account/webhooks/outgoing/delivery_attempts/new.html.erb
80
+ - app/views/account/webhooks/outgoing/delivery_attempts/show.html.erb
81
+ - app/views/account/webhooks/outgoing/delivery_attempts/show.json.jbuilder
82
+ - app/views/account/webhooks/outgoing/endpoints/_breadcrumbs.html.erb
83
+ - app/views/account/webhooks/outgoing/endpoints/_endpoint.json.jbuilder
84
+ - app/views/account/webhooks/outgoing/endpoints/_form.html.erb
85
+ - app/views/account/webhooks/outgoing/endpoints/_index.html.erb
86
+ - app/views/account/webhooks/outgoing/endpoints/_menu_item.html.erb
87
+ - app/views/account/webhooks/outgoing/endpoints/edit.html.erb
88
+ - app/views/account/webhooks/outgoing/endpoints/index.html.erb
89
+ - app/views/account/webhooks/outgoing/endpoints/index.json.jbuilder
90
+ - app/views/account/webhooks/outgoing/endpoints/new.html.erb
91
+ - app/views/account/webhooks/outgoing/endpoints/show.html.erb
92
+ - app/views/account/webhooks/outgoing/endpoints/show.json.jbuilder
93
+ - config/locales/en/webhooks/outgoing/deliveries.en.yml
94
+ - config/locales/en/webhooks/outgoing/delivery_attempts.en.yml
95
+ - config/locales/en/webhooks/outgoing/endpoints.en.yml
96
+ - config/locales/en/webhooks/outgoing/events.en.yml
97
+ - config/routes.rb
98
+ - db/migrate/20180420013127_create_webhooks_outgoing_endpoints.rb
99
+ - db/migrate/20180420013505_create_webhooks_outgoing_endpoint_event_types.rb
100
+ - db/migrate/20180420013852_create_webhooks_outgoing_event_types.rb
101
+ - db/migrate/20180420014623_create_webhooks_outgoing_events.rb
102
+ - db/migrate/20180420021016_create_webhooks_outgoing_deliveries.rb
103
+ - db/migrate/20180420022027_add_team_to_webhooks_outgoing_events.rb
104
+ - db/migrate/20180420165345_create_webhooks_outgoing_delivery_attempts.rb
105
+ - db/migrate/20180420172112_add_error_message_to_webhooks_outgoing_delivery_attempt.rb
106
+ - db/migrate/20181012234232_add_name_to_webhooks_outgoing_endpoints.rb
107
+ - db/migrate/20181013030208_add_delivered_at_to_webhooks_outgoing_deliveries.rb
108
+ - db/migrate/20181013165056_add_uuid_to_webhooks_outgoing_events.rb
109
+ - db/migrate/20181013174539_add_payload_to_webhooks_outgoing_events.rb
110
+ - db/migrate/20181013192951_add_attempt_number_to_webhooks_outgoing_delivery_attempts.rb
111
+ - db/migrate/20210805060451_change_body_to_data_on_webhooks_outgoing_events.rb
112
+ - db/migrate/20211126230846_add_event_type_ids_to_webhooks_outgoing_endpoints.rb
113
+ - db/migrate/20211126230847_migrate_event_type_ids_on_webhooks_outgoing_endpoints.rb
114
+ - db/migrate/20211127013539_remove_event_type_from_webhooks_outgoing_events.rb
115
+ - db/migrate/20211127013800_add_new_event_type_id_to_webhooks_outgoing_events.rb
116
+ - db/migrate/20211127014001_migrate_event_types_on_webhooks_outgoing_events.rb
117
+ - db/migrate/20211127015712_drop_webhooks_outgoing_endpoint_event_types.rb
118
+ - db/migrate/20211127015713_drop_webhooks_outgoing_event_types.rb
73
119
  - lib/bullet_train/outgoing_webhooks.rb
120
+ - lib/bullet_train/outgoing_webhooks/engine.rb
74
121
  - lib/bullet_train/outgoing_webhooks/version.rb
75
- - lib/models/concerns/webhooks/outgoing/has_uuid.rb
76
- - lib/models/concerns/webhooks/outgoing/issuing_model.rb
77
- - lib/models/concerns/webhooks/outgoing/team_support.rb
78
- - lib/models/webhooks.rb
79
- - lib/models/webhooks/outgoing.rb
80
- - lib/models/webhooks/outgoing/delivery.rb
81
- - lib/models/webhooks/outgoing/delivery_attempt.rb
82
- - lib/models/webhooks/outgoing/endpoint.rb
83
- - lib/models/webhooks/outgoing/event.rb
84
- - lib/models/webhooks/outgoing/event_type.rb
85
- - sig/bullet_train/outgoing_webhooks.rbs
86
- homepage: http://github.com/bullet-train-co/bullet_train-outgoing_webhooks
122
+ - lib/tasks/bullet_train/outgoing_webhooks_tasks.rake
123
+ homepage: https://github.com/bullet-train-co/bullet_train-outgoing_webhooks
87
124
  licenses:
88
125
  - MIT
89
126
  metadata:
90
- homepage_uri: http://github.com/bullet-train-co/bullet_train-outgoing_webhooks
91
- source_code_uri: http://github.com/bullet-train-co/bullet_train-outgoing_webhooks
127
+ homepage_uri: https://github.com/bullet-train-co/bullet_train-outgoing_webhooks
128
+ source_code_uri: https://github.com/bullet-train-co/bullet_train-outgoing_webhooks
92
129
  post_install_message:
93
130
  rdoc_options: []
94
131
  require_paths:
@@ -97,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
134
  requirements:
98
135
  - - ">="
99
136
  - !ruby/object:Gem::Version
100
- version: 2.6.0
137
+ version: '0'
101
138
  required_rubygems_version: !ruby/object:Gem::Requirement
102
139
  requirements:
103
140
  - - ">="
@@ -107,6 +144,6 @@ requirements: []
107
144
  rubygems_version: 3.2.22
108
145
  signing_key:
109
146
  specification_version: 4
110
- summary: Bullet Train Outgoing Webhooks helps you issue webhooks when activity takes
111
- place in your application.
147
+ summary: Allow users of your Rails application to subscribe and receive webhooks when
148
+ activity takes place in your application.
112
149
  test_files: []
data/.standard.yml DELETED
@@ -1,2 +0,0 @@
1
- # For available configuration options, see:
2
- # https://github.com/testdouble/standard
data/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- ## [Unreleased]
2
-
3
- ## [0.1.0] - 2022-01-15
4
-
5
- - Initial release
data/CODE_OF_CONDUCT.md DELETED
@@ -1,84 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
-
7
- We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
-
9
- ## Our Standards
10
-
11
- Examples of behavior that contributes to a positive environment for our community include:
12
-
13
- * Demonstrating empathy and kindness toward other people
14
- * Being respectful of differing opinions, viewpoints, and experiences
15
- * Giving and gracefully accepting constructive feedback
16
- * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
- * Focusing on what is best not just for us as individuals, but for the overall community
18
-
19
- Examples of unacceptable behavior include:
20
-
21
- * The use of sexualized language or imagery, and sexual attention or
22
- advances of any kind
23
- * Trolling, insulting or derogatory comments, and personal or political attacks
24
- * Public or private harassment
25
- * Publishing others' private information, such as a physical or email
26
- address, without their explicit permission
27
- * Other conduct which could reasonably be considered inappropriate in a
28
- professional setting
29
-
30
- ## Enforcement Responsibilities
31
-
32
- Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
-
34
- Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
-
36
- ## Scope
37
-
38
- This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
-
40
- ## Enforcement
41
-
42
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at andrew.culver@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
-
44
- All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
-
46
- ## Enforcement Guidelines
47
-
48
- Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
-
50
- ### 1. Correction
51
-
52
- **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
-
54
- **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
-
56
- ### 2. Warning
57
-
58
- **Community Impact**: A violation through a single incident or series of actions.
59
-
60
- **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
-
62
- ### 3. Temporary Ban
63
-
64
- **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
-
66
- **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
-
68
- ### 4. Permanent Ban
69
-
70
- **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
-
72
- **Consequence**: A permanent ban from any sort of public interaction within the community.
73
-
74
- ## Attribution
75
-
76
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
- available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
-
79
- Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
-
81
- [homepage]: https://www.contributor-covenant.org
82
-
83
- For answers to common questions about this code of conduct, see the FAQ at
84
- https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in bullet_train-outgoing_webhooks.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "minitest", "~> 5.0"
11
-
12
- gem "standard", "~> 1.3"
data/Gemfile.lock DELETED
@@ -1,193 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- bullet_train-outgoing_webhooks (0.1.0)
5
- active_hash
6
- activesupport
7
- rails
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actioncable (7.0.1)
13
- actionpack (= 7.0.1)
14
- activesupport (= 7.0.1)
15
- nio4r (~> 2.0)
16
- websocket-driver (>= 0.6.1)
17
- actionmailbox (7.0.1)
18
- actionpack (= 7.0.1)
19
- activejob (= 7.0.1)
20
- activerecord (= 7.0.1)
21
- activestorage (= 7.0.1)
22
- activesupport (= 7.0.1)
23
- mail (>= 2.7.1)
24
- net-imap
25
- net-pop
26
- net-smtp
27
- actionmailer (7.0.1)
28
- actionpack (= 7.0.1)
29
- actionview (= 7.0.1)
30
- activejob (= 7.0.1)
31
- activesupport (= 7.0.1)
32
- mail (~> 2.5, >= 2.5.4)
33
- net-imap
34
- net-pop
35
- net-smtp
36
- rails-dom-testing (~> 2.0)
37
- actionpack (7.0.1)
38
- actionview (= 7.0.1)
39
- activesupport (= 7.0.1)
40
- rack (~> 2.0, >= 2.2.0)
41
- rack-test (>= 0.6.3)
42
- rails-dom-testing (~> 2.0)
43
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
44
- actiontext (7.0.1)
45
- actionpack (= 7.0.1)
46
- activerecord (= 7.0.1)
47
- activestorage (= 7.0.1)
48
- activesupport (= 7.0.1)
49
- globalid (>= 0.6.0)
50
- nokogiri (>= 1.8.5)
51
- actionview (7.0.1)
52
- activesupport (= 7.0.1)
53
- builder (~> 3.1)
54
- erubi (~> 1.4)
55
- rails-dom-testing (~> 2.0)
56
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
57
- active_hash (3.1.0)
58
- activesupport (>= 5.0.0)
59
- activejob (7.0.1)
60
- activesupport (= 7.0.1)
61
- globalid (>= 0.3.6)
62
- activemodel (7.0.1)
63
- activesupport (= 7.0.1)
64
- activerecord (7.0.1)
65
- activemodel (= 7.0.1)
66
- activesupport (= 7.0.1)
67
- activestorage (7.0.1)
68
- actionpack (= 7.0.1)
69
- activejob (= 7.0.1)
70
- activerecord (= 7.0.1)
71
- activesupport (= 7.0.1)
72
- marcel (~> 1.0)
73
- mini_mime (>= 1.1.0)
74
- activesupport (7.0.1)
75
- concurrent-ruby (~> 1.0, >= 1.0.2)
76
- i18n (>= 1.6, < 2)
77
- minitest (>= 5.1)
78
- tzinfo (~> 2.0)
79
- ast (2.4.2)
80
- builder (3.2.4)
81
- concurrent-ruby (1.1.9)
82
- crass (1.0.6)
83
- digest (3.1.0)
84
- erubi (1.10.0)
85
- globalid (1.0.0)
86
- activesupport (>= 5.0)
87
- i18n (1.8.11)
88
- concurrent-ruby (~> 1.0)
89
- io-wait (0.2.1)
90
- loofah (2.13.0)
91
- crass (~> 1.0.2)
92
- nokogiri (>= 1.5.9)
93
- mail (2.7.1)
94
- mini_mime (>= 0.1.1)
95
- marcel (1.0.2)
96
- method_source (1.0.0)
97
- mini_mime (1.1.2)
98
- minitest (5.15.0)
99
- net-imap (0.2.3)
100
- digest
101
- net-protocol
102
- strscan
103
- net-pop (0.1.1)
104
- digest
105
- net-protocol
106
- timeout
107
- net-protocol (0.1.2)
108
- io-wait
109
- timeout
110
- net-smtp (0.3.1)
111
- digest
112
- net-protocol
113
- timeout
114
- nio4r (2.5.8)
115
- nokogiri (1.13.1-arm64-darwin)
116
- racc (~> 1.4)
117
- parallel (1.21.0)
118
- parser (3.1.0.0)
119
- ast (~> 2.4.1)
120
- racc (1.6.0)
121
- rack (2.2.3)
122
- rack-test (1.1.0)
123
- rack (>= 1.0, < 3)
124
- rails (7.0.1)
125
- actioncable (= 7.0.1)
126
- actionmailbox (= 7.0.1)
127
- actionmailer (= 7.0.1)
128
- actionpack (= 7.0.1)
129
- actiontext (= 7.0.1)
130
- actionview (= 7.0.1)
131
- activejob (= 7.0.1)
132
- activemodel (= 7.0.1)
133
- activerecord (= 7.0.1)
134
- activestorage (= 7.0.1)
135
- activesupport (= 7.0.1)
136
- bundler (>= 1.15.0)
137
- railties (= 7.0.1)
138
- rails-dom-testing (2.0.3)
139
- activesupport (>= 4.2.0)
140
- nokogiri (>= 1.6)
141
- rails-html-sanitizer (1.4.2)
142
- loofah (~> 2.3)
143
- railties (7.0.1)
144
- actionpack (= 7.0.1)
145
- activesupport (= 7.0.1)
146
- method_source
147
- rake (>= 12.2)
148
- thor (~> 1.0)
149
- zeitwerk (~> 2.5)
150
- rainbow (3.1.1)
151
- rake (13.0.6)
152
- regexp_parser (2.2.0)
153
- rexml (3.2.5)
154
- rubocop (1.24.1)
155
- parallel (~> 1.10)
156
- parser (>= 3.0.0.0)
157
- rainbow (>= 2.2.2, < 4.0)
158
- regexp_parser (>= 1.8, < 3.0)
159
- rexml
160
- rubocop-ast (>= 1.15.1, < 2.0)
161
- ruby-progressbar (~> 1.7)
162
- unicode-display_width (>= 1.4.0, < 3.0)
163
- rubocop-ast (1.15.1)
164
- parser (>= 3.0.1.1)
165
- rubocop-performance (1.13.1)
166
- rubocop (>= 1.7.0, < 2.0)
167
- rubocop-ast (>= 0.4.0)
168
- ruby-progressbar (1.11.0)
169
- standard (1.6.0)
170
- rubocop (= 1.24.1)
171
- rubocop-performance (= 1.13.1)
172
- strscan (3.0.1)
173
- thor (1.2.1)
174
- timeout (0.2.0)
175
- tzinfo (2.0.4)
176
- concurrent-ruby (~> 1.0)
177
- unicode-display_width (2.1.0)
178
- websocket-driver (0.7.5)
179
- websocket-extensions (>= 0.1.0)
180
- websocket-extensions (0.1.5)
181
- zeitwerk (2.5.3)
182
-
183
- PLATFORMS
184
- arm64-darwin-21
185
-
186
- DEPENDENCIES
187
- bullet_train-outgoing_webhooks!
188
- minitest (~> 5.0)
189
- rake (~> 13.0)
190
- standard (~> 1.3)
191
-
192
- BUNDLED WITH
193
- 2.3.4