broadcast-ruby 0.1.1 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f76251ad3cf3d351bd4b197ccc5b4035af1eea66290380050c6f5108ec48b6a
4
- data.tar.gz: 85c3e88178863291ab1da149797f71ea36a7eeaf3418bb72bdcf95ab92dfcf7e
3
+ metadata.gz: 10505042f5920a98bc7a910b72e79febc60bd8701e557fda50c141b3662fe635
4
+ data.tar.gz: 1e3d35420502d145c051a24b33266b693ff84e6ee21813b1558e8c33e1a05e96
5
5
  SHA512:
6
- metadata.gz: 5d71f0add4f5ae7b00705753069c6eee46831c2a1a9b7af36f7dc7cd27d522100d471923a3450a2cd5bab6897b567ace37c127d8e9df16e7e9cef57f53f5a55e
7
- data.tar.gz: f31f85327c7c231c42d5134961387b5da21d2cc6a9080ca8d31061d5be540a4c38f6e4a9641a4c66427767a2ba24129d746f5ba0ebcebf5a4f320b0d12ea29ca
6
+ metadata.gz: 2279cac2d8337e5294d76ae35dad0e1f103dc149dcf7aada43bf29f4854d959fe8865425cdca4dc0ce5fc92d145a83fafd9b0027155380bd9bcde1c17456ea81
7
+ data.tar.gz: 8ce78778855736661aefa17135d8b49c201915523037dd45e36162dc6d6a663a3d8dfbd941e294d4d956e339bf40ea0f7d75f971deb17c6cbed6cdc2b1ee770b
data/.rubocop.yml CHANGED
@@ -34,6 +34,10 @@ Metrics/PerceivedComplexity:
34
34
  Layout/LineLength:
35
35
  Max: 120
36
36
 
37
+ Naming/FileName:
38
+ Exclude:
39
+ - lib/broadcast-ruby.rb
40
+
37
41
  Naming/MethodParameterName:
38
42
  AllowedNames:
39
43
  - a
data/CHANGELOG.md ADDED
@@ -0,0 +1,55 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.1.2] - 2026-03-18
6
+
7
+ ### Added
8
+ - ActionMailer delivery method and Rails Railtie for seamless Rails integration
9
+ - ActionMailer end-to-end integration tests with a real mailer class
10
+ - `User-Agent: broadcast-ruby/VERSION` header on all API requests
11
+ - `Broadcast::DeliveryError` for ActionMailer error wrapping
12
+ - `lib/broadcast-ruby.rb` shim so Bundler auto-requires correctly (no `require:` needed in Gemfile)
13
+ - GitHub Actions CI: Ruby 3.2-4.0 x Rails 7.1-8.1 matrix
14
+ - RuboCop linting in CI
15
+ - Comprehensive README: token setup, permissions table, migration guide, webhook controller example, troubleshooting
16
+ - `.github/secret_scanning.yml` for secret leak prevention
17
+
18
+ ### Fixed
19
+ - Templates `create`/`update` now correctly wrap params under `template` key
20
+ - Trailing slash on `host` is stripped to prevent double-slash URLs
21
+ - GET requests no longer log a spurious "Body: {}" in debug mode
22
+
23
+ ### Removed
24
+ - Dead `Broadcast.configure` global singleton (was disconnected from Client)
25
+
26
+ ## [0.1.1] - 2026-03-18
27
+
28
+ ### Added
29
+ - ActionMailer delivery method (`Broadcast::DeliveryMethod`)
30
+ - Rails Railtie for auto-registering `:broadcast` delivery method
31
+ - `User-Agent` header on all requests
32
+ - `Broadcast::DeliveryError` error class
33
+ - `Broadcast::NotFoundError` for 404 responses
34
+
35
+ ### Fixed
36
+ - Strip trailing slash from `host` configuration
37
+ - Templates API wrapping under `template` key
38
+
39
+ ## [0.1.0] - 2026-03-17
40
+
41
+ ### Added
42
+ - Initial release
43
+ - `Broadcast::Client` with keyword arg construction and eager validation
44
+ - Transactional email: `send_email`, `get_email`
45
+ - Subscribers: list, find, create, update, add/remove tags, deactivate, activate, unsubscribe, resubscribe, redact
46
+ - Sequences: CRUD, subscriber enrollment, step management (14 methods)
47
+ - Broadcasts: CRUD, send, schedule, cancel, statistics (11 methods)
48
+ - Segments: list, get, create, update, delete
49
+ - Templates: list, get, create, update, delete
50
+ - Webhook Endpoints: list, get, create, update, delete, test, deliveries
51
+ - `Broadcast::Webhook.verify` for HMAC-SHA256 signature verification
52
+ - Automatic retry with linear backoff on server errors (5xx) and timeouts
53
+ - Debug logging with configurable logger
54
+ - Thread-safe configuration
55
+ - Full test suite: 108 unit tests + 9 live integration tests
data/Gemfile CHANGED
@@ -4,7 +4,13 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'actionmailer', '>= 6.0'
7
+ rails_version = ENV.fetch('RAILS_VERSION', nil)
8
+ if rails_version
9
+ gem 'actionmailer', "~> #{rails_version}.0"
10
+ else
11
+ gem 'actionmailer', '>= 6.0'
12
+ end
13
+
8
14
  gem 'mail', '~> 2.8'
9
15
  gem 'minitest', '~> 5.0'
10
16
  gem 'rake', '~> 13.0'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- broadcast-ruby (0.1.0)
4
+ broadcast-ruby (0.1.3)
5
5
  base64
6
6
 
7
7
  GEM
@@ -97,6 +97,8 @@ GEM
97
97
  net-protocol
98
98
  nokogiri (1.19.1-arm64-darwin)
99
99
  racc (~> 1.4)
100
+ nokogiri (1.19.1-x86_64-linux-gnu)
101
+ racc (~> 1.4)
100
102
  parallel (1.27.0)
101
103
  parser (3.3.10.2)
102
104
  ast (~> 2.4.1)
@@ -153,6 +155,7 @@ GEM
153
155
 
154
156
  PLATFORMS
155
157
  arm64-darwin-24
158
+ x86_64-linux
156
159
 
157
160
  DEPENDENCIES
158
161
  actionmailer (>= 6.0)
@@ -173,7 +176,7 @@ CHECKSUMS
173
176
  ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
174
177
  base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
175
178
  bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7
176
- broadcast-ruby (0.1.0)
179
+ broadcast-ruby (0.1.3)
177
180
  builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
178
181
  concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
179
182
  connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
@@ -200,6 +203,7 @@ CHECKSUMS
200
203
  net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8
201
204
  net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736
202
205
  nokogiri (1.19.1-arm64-darwin) sha256=dfe2d337e6700eac47290407c289d56bcf85805d128c1b5a6434ddb79731cb9e
206
+ nokogiri (1.19.1-x86_64-linux-gnu) sha256=1a4902842a186b4f901078e692d12257678e6133858d0566152fe29cdb98456a
203
207
  parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
204
208
  parser (3.3.10.2) sha256=6f60c84aa4bdcedb6d1a2434b738fe8a8136807b6adc8f7f53b97da9bc4e9357
205
209
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
@@ -4,10 +4,8 @@ require_relative 'delivery_method'
4
4
 
5
5
  module Broadcast
6
6
  class Railtie < Rails::Railtie
7
- initializer 'broadcast.add_delivery_method' do
8
- ActiveSupport.on_load(:action_mailer) do
9
- ActionMailer::Base.add_delivery_method :broadcast, Broadcast::DeliveryMethod
10
- end
7
+ initializer 'broadcast.add_delivery_method', before: :load_config_initializers do
8
+ ActionMailer::Base.add_delivery_method :broadcast, Broadcast::DeliveryMethod
11
9
  end
12
10
  end
13
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Broadcast
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.3'
5
5
  end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'broadcast'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: broadcast-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Chiu
@@ -32,11 +32,13 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - ".rubocop.yml"
35
+ - CHANGELOG.md
35
36
  - Gemfile
36
37
  - Gemfile.lock
37
38
  - LICENSE.txt
38
39
  - README.md
39
40
  - Rakefile
41
+ - lib/broadcast-ruby.rb
40
42
  - lib/broadcast.rb
41
43
  - lib/broadcast/client.rb
42
44
  - lib/broadcast/configuration.rb