bullet_train-outgoing_webhooks 1.2.20 → 1.2.22

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.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/concerns/webhooks/outgoing/delivery_attempt_support.rb +5 -0
  3. data/app/views/account/webhooks/outgoing/deliveries/_index.html.erb +5 -7
  4. data/app/views/account/webhooks/outgoing/deliveries/_menu_item.html.erb +1 -1
  5. data/app/views/account/webhooks/outgoing/deliveries/edit.html.erb +5 -10
  6. data/app/views/account/webhooks/outgoing/deliveries/index.html.erb +3 -5
  7. data/app/views/account/webhooks/outgoing/deliveries/new.html.erb +5 -10
  8. data/app/views/account/webhooks/outgoing/deliveries/show.html.erb +8 -8
  9. data/app/views/account/webhooks/outgoing/delivery_attempts/_index.html.erb +5 -7
  10. data/app/views/account/webhooks/outgoing/delivery_attempts/_menu_item.html.erb +1 -1
  11. data/app/views/account/webhooks/outgoing/delivery_attempts/edit.html.erb +5 -10
  12. data/app/views/account/webhooks/outgoing/delivery_attempts/index.html.erb +3 -5
  13. data/app/views/account/webhooks/outgoing/delivery_attempts/new.html.erb +5 -10
  14. data/app/views/account/webhooks/outgoing/delivery_attempts/show.html.erb +8 -8
  15. data/app/views/account/webhooks/outgoing/endpoints/_index.html.erb +5 -7
  16. data/app/views/account/webhooks/outgoing/endpoints/_menu_item.html.erb +1 -1
  17. data/app/views/account/webhooks/outgoing/endpoints/edit.html.erb +5 -10
  18. data/app/views/account/webhooks/outgoing/endpoints/index.html.erb +3 -5
  19. data/app/views/account/webhooks/outgoing/endpoints/new.html.erb +5 -10
  20. data/app/views/account/webhooks/outgoing/endpoints/show.html.erb +8 -8
  21. data/lib/bullet_train/outgoing_webhooks/version.rb +1 -1
  22. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a3d69ed3e97cb7a2d43852acc6ac4488f8be5baedcbf28cd9e9c4470a565163
4
- data.tar.gz: f9a5e07c0b02bac7df4b5babd021d955f3689a4f4f5be0b2074f19b095329b62
3
+ metadata.gz: a7892e94a0f4e8d2ef359ce53ff0dc55043273627c61a0b2ad088b64d51378b1
4
+ data.tar.gz: f9ec6e43f0606addbb1f9bb44860181e46e36e924101304cd5e02816ce389ee6
5
5
  SHA512:
6
- metadata.gz: e50314e5675c3806aac0d8474c3b84908a40eaf4c50fb01d4958b64607c08f79dbbd946688f8247b47041b1b35285ae37cb33ee27854deb5b75b548c8b13894d
7
- data.tar.gz: d5cd3552a160730bea6fe93021912bc373a78db4b16bbac3f87e30aac631f40242becc40ea497800d5e0723064502b1807c64d2ec22567af654f30776650386c
6
+ metadata.gz: 58f1e6581c3c93842c5d30ba110b752c35314b941ee3189726168e54c9566430da5be8fa428feec75ff4be3ead93a72e538e580761bbe17974954f5f8fbe0cbb
7
+ data.tar.gz: 73fe1dfc32310479af78c11e8088eea671dc0b571ac4c4136bcf96b437f5c2e77ec21ad1a1561c208df65fe5e254ff00d99577a4d199b4655ee94a5718c188ad
@@ -45,6 +45,11 @@ module Webhooks::Outgoing::DeliveryAttemptSupport
45
45
  uri.hostname.downcase
46
46
  end
47
47
 
48
+ # Net::HTTP will consider the url invalid (and not deliver the webhook) unless it ends with a '/'
49
+ unless uri.path.end_with?("/")
50
+ uri.path = uri.path + "/"
51
+ end
52
+
48
53
  http = Net::HTTP.new(hostname, uri.port)
49
54
  http.use_ssl = true if uri.scheme == "https"
50
55
  request = Net::HTTP::Post.new(uri.path)
@@ -4,13 +4,11 @@
4
4
  <% hide_actions ||= false %>
5
5
  <% hide_back ||= false %>
6
6
 
7
- <%= render 'account/shared/box' do |p| %>
8
- <% p.content_for :title, t(".contexts.#{context.class.name.underscore}.header") %>
9
- <% p.content_for :description do %>
10
- <%= t(".contexts.#{context.class.name.underscore}.description") %>
11
- <% end %>
7
+ <%= render 'account/shared/box' do |box| %>
8
+ <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
9
+ <% box.description t(".contexts.#{context.class.name.underscore}.description") %>
12
10
 
13
- <% p.content_for :table do %>
11
+ <% box.table do %>
14
12
  <% if deliveries.any? %>
15
13
  <table class="table">
16
14
  <thead>
@@ -57,7 +55,7 @@
57
55
  <% end %>
58
56
  <% end %>
59
57
 
60
- <% p.content_for :actions do %>
58
+ <% box.actions do %>
61
59
  <% unless hide_actions %>
62
60
  <% if context == endpoint %>
63
61
  <% if can? :create, Webhooks::Outgoing::Delivery.new(endpoint: endpoint) %>
@@ -3,7 +3,7 @@
3
3
  url: main_app.polymorphic_path([:account, send(BulletTrain::OutgoingWebhooks.current_parent_method), :webhooks_outgoing_deliveries]),
4
4
  label: t('webhooks/outgoing/deliveries.navigation.label'),
5
5
  } do |p| %>
6
- <% p.content_for :icon do %>
6
+ <% p.icon do %>
7
7
  <i class="<%= t('webhooks/outgoing/deliveries.navigation.icon') %>"></i>
8
8
  <% end %>
9
9
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', delivery: @delivery %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', delivery: @delivery %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,6 +1,4 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'index', deliveries: @deliveries %>
5
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'index', deliveries: @deliveries %>
6
4
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', delivery: @delivery %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', delivery: @delivery %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,14 +1,14 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section').html_safe %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description do %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section').html_safe %>
3
+ <% page.body do %>
4
+ <%= render 'account/shared/box', divider: true do |box| %>
5
+ <% box.title t('.header') %>
6
+ <% box.description do %>
7
7
  <%= t('.description').html_safe %>
8
8
  <%= t('.manage_description') if can? :manage, @delivery %>
9
9
  <% end %>
10
10
 
11
- <% p.content_for :body do %>
11
+ <% box.body do %>
12
12
  <% with_attribute_settings object: @delivery, strategy: :label do %>
13
13
  <% with_attribute_settings object: @delivery.event do %>
14
14
  <%= render 'shared/attributes/code', attribute: :uuid %>
@@ -24,7 +24,7 @@
24
24
  <% end %>
25
25
  <% end %>
26
26
 
27
- <% p.content_for :actions do %>
27
+ <% box.actions do %>
28
28
  <%= link_to t('.buttons.edit'), [:edit, :account, @delivery], class: first_button_primary if can? :edit, @delivery %>
29
29
  <%= button_to t('.buttons.destroy'), [:account, @delivery], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@delivery)) } if can? :destroy, @delivery %>
30
30
  <%= link_to t('global.buttons.back'), [:account, @endpoint, :deliveries], class: first_button_primary %>
@@ -4,13 +4,11 @@
4
4
  <% hide_actions ||= false %>
5
5
  <% hide_back ||= false %>
6
6
 
7
- <%= render 'account/shared/box' do |p| %>
8
- <% p.content_for :title, t(".contexts.#{context.class.name.underscore}.header") %>
9
- <% p.content_for :description do %>
10
- <%= t(".contexts.#{context.class.name.underscore}.description") %>
11
- <% end %>
7
+ <%= render 'account/shared/box' do |box| %>
8
+ <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
9
+ <% box.description t(".contexts.#{context.class.name.underscore}.description") %>
12
10
 
13
- <% p.content_for :table do %>
11
+ <% box.table do %>
14
12
  <% if delivery_attempts.any? %>
15
13
  <table class="table">
16
14
  <thead>
@@ -53,7 +51,7 @@
53
51
  <% end %>
54
52
  <% end %>
55
53
 
56
- <% p.content_for :actions do %>
54
+ <% box.actions do %>
57
55
  <% unless hide_actions %>
58
56
  <% if context == delivery %>
59
57
  <% if can? :create, Webhooks::Outgoing::DeliveryAttempt.new(delivery: delivery) %>
@@ -3,7 +3,7 @@
3
3
  url: main_app.polymorphic_path([:account, send(BulletTrain::OutgoingWebhooks.current_parent_method), :webhooks_outgoing_delivery_attempts]),
4
4
  label: t('webhooks/outgoing/delivery_attempts.navigation.label'),
5
5
  } do |p| %>
6
- <% p.content_for :icon do %>
6
+ <% p.icon do %>
7
7
  <i class="<%= t('webhooks/outgoing/delivery_attempts.navigation.icon') %>"></i>
8
8
  <% end %>
9
9
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', delivery_attempt: @delivery_attempt %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', delivery_attempt: @delivery_attempt %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,6 +1,4 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'index', delivery_attempts: @delivery_attempts %>
5
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'index', delivery_attempts: @delivery_attempts %>
6
4
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', delivery_attempt: @delivery_attempt %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', delivery_attempt: @delivery_attempt %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,14 +1,14 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section').html_safe %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description do %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section').html_safe %>
3
+ <% page.body do %>
4
+ <%= render 'account/shared/box', divider: true do |box| %>
5
+ <% box.title t('.header') %>
6
+ <% box.description do %>
7
7
  <%= t('.description') %>
8
8
  <%= t('.manage_description') if can? :manage, @delivery_attempt %>
9
9
  <% end %>
10
10
 
11
- <% p.content_for :body do %>
11
+ <% box.body do %>
12
12
  <% with_attribute_settings object: @delivery_attempt, strategy: :label do %>
13
13
  <%= render 'shared/attributes/text', attribute: :attempt_number %>
14
14
  <%= render 'shared/attributes/attempt', attribute: :status, success_method: :successful?, attempting_method: :still_attempting?, failure_method: :failed? %>
@@ -20,7 +20,7 @@
20
20
  <% end %>
21
21
  <% end %>
22
22
 
23
- <% p.content_for :actions do %>
23
+ <% box.actions do %>
24
24
  <%= link_to t('.buttons.edit'), [:edit, :account, @delivery_attempt], class: first_button_primary if can? :edit, @delivery_attempt %>
25
25
  <%= button_to t('.buttons.destroy'), [:account, @delivery_attempt], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@delivery_attempt)) } if can? :destroy, @delivery_attempt %>
26
26
  <%= link_to t('global.buttons.back'), [:account, @delivery, :delivery_attempts], class: first_button_primary %>
@@ -4,13 +4,11 @@
4
4
  <% hide_actions ||= false %>
5
5
  <% hide_back ||= false %>
6
6
 
7
- <%= render 'account/shared/box' do |p| %>
8
- <% p.content_for :title, t(".contexts.#{context.class.name.underscore}.header") %>
9
- <% p.content_for :description do %>
10
- <%= t(".contexts.#{context.class.name.underscore}.description") %>
11
- <% end %>
7
+ <%= render 'account/shared/box' do |box| %>
8
+ <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
9
+ <% box.description t(".contexts.#{context.class.name.underscore}.description") %>
12
10
 
13
- <% p.content_for :table do %>
11
+ <% box.table do %>
14
12
  <% if endpoints.any? %>
15
13
  <table class="table">
16
14
  <thead>
@@ -46,7 +44,7 @@
46
44
  <% end %>
47
45
  <% end %>
48
46
 
49
- <% p.content_for :actions do %>
47
+ <% box.actions do %>
50
48
  <% unless hide_actions %>
51
49
  <% if context == team %>
52
50
  <% if can? :create, Webhooks::Outgoing::Endpoint.new(BulletTrain::OutgoingWebhooks.parent_association => @parent) %>
@@ -3,7 +3,7 @@
3
3
  url: main_app.polymorphic_path([:account, send(BulletTrain::OutgoingWebhooks.current_parent_method), :webhooks_outgoing_endpoints]),
4
4
  label: t('webhooks/outgoing/endpoints.navigation.label'),
5
5
  } do |p| %>
6
- <% p.content_for :icon do %>
6
+ <% p.icon do %>
7
7
  <i class="<%= t('webhooks/outgoing/endpoints.navigation.icon') %>"></i>
8
8
  <% end %>
9
9
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', endpoint: @endpoint %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', endpoint: @endpoint %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,6 +1,4 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'index', endpoints: @endpoints %>
5
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'index', endpoints: @endpoints %>
6
4
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description, t('.description') %>
7
- <% p.content_for :body do %>
8
- <%= render 'form', endpoint: @endpoint %>
9
- <% end %>
10
- <% end %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body.render 'account/shared/box', divider: true do |box| %>
4
+ <% box.t :description, title: '.header' %>
5
+ <% box.body.render 'form', endpoint: @endpoint %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,14 +1,14 @@
1
- <%= render 'account/shared/page' do |p| %>
2
- <% p.content_for :title, t('.section') %>
3
- <% p.content_for :body do %>
4
- <%= render 'account/shared/box', divider: true do |p| %>
5
- <% p.content_for :title, t('.header') %>
6
- <% p.content_for :description do %>
1
+ <%= render 'account/shared/page' do |page| %>
2
+ <% page.title t('.section') %>
3
+ <% page.body do %>
4
+ <%= render 'account/shared/box', divider: true do |box| %>
5
+ <% box.title t('.header') %>
6
+ <% box.description do %>
7
7
  <%= t('.description') %>
8
8
  <%= t('.manage_description') if can? :manage, @endpoint %>
9
9
  <% end %>
10
10
 
11
- <% p.content_for :body do %>
11
+ <% box.body do %>
12
12
  <% with_attribute_settings object: @endpoint, strategy: :label do %>
13
13
  <%= render 'shared/attributes/text', attribute: :name %>
14
14
  <%= render 'shared/attributes/code', attribute: :url %>
@@ -32,7 +32,7 @@
32
32
  <% end %>
33
33
  <% end %>
34
34
 
35
- <% p.content_for :actions do %>
35
+ <% box.actions do %>
36
36
  <%= link_to t('.buttons.edit'), [:edit, :account, @endpoint], class: first_button_primary if can? :edit, @endpoint %>
37
37
  <%= button_to t('.buttons.destroy'), [:account, @endpoint], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@endpoint)) } if can? :destroy, @endpoint %>
38
38
  <%= link_to t('global.buttons.back'), [:account, @parent, :webhooks_outgoing_endpoints], class: first_button_primary %>
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module OutgoingWebhooks
3
- VERSION = "1.2.20"
3
+ VERSION = "1.2.22"
4
4
  end
5
5
  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.2.20
4
+ version: 1.2.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-11 00:00:00.000000000 Z
11
+ date: 2023-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0'
175
175
  requirements: []
176
- rubygems_version: 3.4.1
176
+ rubygems_version: 3.3.7
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Allow users of your Rails application to subscribe and receive webhooks when