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
data/LICENSE.txt DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 Andrew Culver
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "bullet_train/outgoing_webhooks"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,21 +0,0 @@
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
@@ -1,2 +0,0 @@
1
- module Webhooks
2
- end
@@ -1,6 +0,0 @@
1
- module BulletTrain
2
- module OutgoingWebhooks
3
- VERSION: String
4
- # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
- end
6
- end