bullet_train-outgoing_webhooks 1.2.24.4 → 1.2.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9de9c2505f67a6d16e3c97cd5cfc394de0235ea4312e2e64073ba1dc985af8cb
4
- data.tar.gz: 99b487503b0dd301d9bddc87dacc605205369ffed3bd9770070c1ef837e01fa6
3
+ metadata.gz: e81637d68e3ae36f5f4fd1723c692b5d58577e5dd66db6b834ec843ed1b036a7
4
+ data.tar.gz: 9c422ab8041f69147fb38c5af3539c8742a2225073f27a70f49bf06455ee170c
5
5
  SHA512:
6
- metadata.gz: d6af969ddced47c6ab57d8638c724ced98790f49f2879f790f91cf25662a852b94460c9e81cee7f9e055c9a276d7877df87f74cbd5d1d03b6ba35d3da04690c5
7
- data.tar.gz: 428dcc9bba9e2448bbad0f6d11419e0c61353b06483b80845a87541f97404987d46a07f0899e9b472196e521fda8124b1e06708ec49da13bd1c99ae5c7e57e96
6
+ metadata.gz: f68ed169a9250f8c3d5e73e848125138cec0c4a44cac49d751de96be8ac471ab00e32556e36ad6db471582836a4db38e7b71da2ca7f806da7a8677543e95eaf1
7
+ data.tar.gz: d09b381b296a9ec78084aab2cadfdfd3b1ca6d421e3e7ba75147b4bb963e4b09c6849fb921fbe6a740bc2ecd0ef3600e831f00d899813c876b8904152a940773
@@ -43,7 +43,7 @@ class Api::V1::Webhooks::Outgoing::EndpointsController < Api::V1::ApplicationCon
43
43
  *permitted_fields,
44
44
  :url,
45
45
  :name,
46
- :api_version,
46
+ :version,
47
47
  :scaffolding_absolutely_abstract_creative_concept_id,
48
48
  # 🚅 super scaffolding will insert new fields above this line.
49
49
  *permitted_arrays,
@@ -46,19 +46,13 @@ module Webhooks::Outgoing::DeliveryAttemptSupport
46
46
  end
47
47
 
48
48
  # Net::HTTP will consider the url invalid (and not deliver the webhook) unless it ends with a '/'
49
- if uri.path == ""
50
- uri.path = "/"
49
+ unless uri.path.end_with?("/")
50
+ uri.path = uri.path + "/"
51
51
  end
52
52
 
53
53
  http = Net::HTTP.new(hostname, uri.port)
54
- if uri.scheme == "https"
55
- http.use_ssl = true
56
- if BulletTrain::OutgoingWebhooks.http_verify_mode
57
- # Developers might need to set this to `OpenSSL::SSL::VERIFY_NONE` in some cases.
58
- http.verify_mode = BulletTrain::OutgoingWebhooks.http_verify_mode
59
- end
60
- end
61
- request = Net::HTTP::Post.new(uri.request_uri)
54
+ http.use_ssl = true if uri.scheme == "https"
55
+ request = Net::HTTP::Post.new(uri.path)
62
56
  request.add_field("Host", uri.host)
63
57
  request.add_field("Content-Type", "application/json")
64
58
  request.body = delivery.event.payload.to_json
@@ -0,0 +1,5 @@
1
+ class AddApiVersionToWebhooksOutgoingEndpoints < ActiveRecord::Migration[7.0]
2
+ def change
3
+ add_column :webhooks_outgoing_endpoints, :api_version, :integer, null: false, default: 1
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddApiVersionToWebhooksOutgoingEvents < ActiveRecord::Migration[7.0]
2
+ def change
3
+ add_column :webhooks_outgoing_events, :api_version, :integer, null: false, default: 1
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RemoveDefaultFromWebhooksOutgoingEndpoints < ActiveRecord::Migration[7.0]
2
+ def change
3
+ change_column_default :webhooks_outgoing_endpoints, :api_version, from: 1, to: nil
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RemoveDefaultFromWebhooksOutgoingEvents < ActiveRecord::Migration[7.0]
2
+ def change
3
+ change_column_default :webhooks_outgoing_events, :api_version, from: 1, to: nil
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module OutgoingWebhooks
3
- VERSION = "1.2.24.4"
3
+ VERSION = "1.2.25"
4
4
  end
5
5
  end
@@ -10,7 +10,6 @@ module BulletTrain
10
10
  mattr_accessor :parent_class, default: default_for(BulletTrain, :parent_class, "Team")
11
11
  mattr_accessor :base_class, default: default_for(BulletTrain, :base_class, "ApplicationRecord")
12
12
  mattr_accessor :advanced_hostname_security, default: false
13
- mattr_accessor :http_verify_mode
14
13
 
15
14
  def self.parent_association
16
15
  parent_class.underscore.to_sym
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.24.4
4
+ version: 1.2.25
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-08-03 00:00:00.000000000 Z
11
+ date: 2023-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -147,6 +147,10 @@ files:
147
147
  - db/migrate/20211127015712_drop_webhooks_outgoing_endpoint_event_types.rb
148
148
  - db/migrate/20211127015713_drop_webhooks_outgoing_event_types.rb
149
149
  - db/migrate/20221130063357_add_creative_concept_to_endpoints.rb
150
+ - db/migrate/20221230223200_add_api_version_to_webhooks_outgoing_endpoints.rb
151
+ - db/migrate/20221230235326_add_api_version_to_webhooks_outgoing_events.rb
152
+ - db/migrate/20221231003437_remove_default_from_webhooks_outgoing_endpoints.rb
153
+ - db/migrate/20221231003438_remove_default_from_webhooks_outgoing_events.rb
150
154
  - lib/bullet_train/outgoing_webhooks.rb
151
155
  - lib/bullet_train/outgoing_webhooks/engine.rb
152
156
  - lib/bullet_train/outgoing_webhooks/version.rb
@@ -172,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
176
  - !ruby/object:Gem::Version
173
177
  version: '0'
174
178
  requirements: []
175
- rubygems_version: 3.4.10
179
+ rubygems_version: 3.3.7
176
180
  signing_key:
177
181
  specification_version: 4
178
182
  summary: Allow users of your Rails application to subscribe and receive webhooks when