telex 0.1.0 → 0.1.1

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: 21555637ece74cdb455b24dddc9dcfd7193b8ec0a2cad21d0da1052a583d778c
4
- data.tar.gz: e0f91a8b8acfa3f81db1b51bf13cc2bf8af522cc83106676b8c52563ae30b2f2
3
+ metadata.gz: 7d996298da2a8f90a268e03eea91bd280a6bb0abe473a9feb61ffefd1d30d089
4
+ data.tar.gz: dc2b3b106851f1919422b9b5c4d7d5e3a6841ad19b1e6092ab24967c3317c046
5
5
  SHA512:
6
- metadata.gz: 852c7dd0cbe3fc1011a99bbf0a98dc54c398390f66717c0a08143626e6c798aa41866d0b11e86618652f18ef26d7d59ade28a4b17df5591f4ad92fb37b396e1a
7
- data.tar.gz: c563df784e2e03f8ea8521d3566d4f677967bac6ee762f7e9d33497f6825faedc5e9c19a22c56c987fb765110c338a2664e7f61f6defab22975d9c7b6f17766a
6
+ metadata.gz: 245d45bf33cbb9e695574f564bacd79faeebf090e1cfbd28f74e66680aeb41540209301f98d9372e02e0f3f26c486f89adc26d35fe2886d0d8a7f2c194a0b24b
7
+ data.tar.gz: 75897e2acdd17b0b4017a2dc840ecbc770a20d17014399b81939bd15c8dc9283027c8f5801920a2470db8b537f7f8f8e6010b40ec0ba2b8d46afe75f615732c9
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1 (2026-10-07)
4
+
5
+ - An app that does not load Action Mailbox boots again in production. Telex then only sends: the ingress and its route are left out.
6
+
7
+ ## 0.1.0 (2026-10-07)
8
+
9
+ - First release: the `:lettermint` delivery method for Action Mailer and the Lettermint ingress for Action Mailbox.
data/README.md CHANGED
@@ -11,9 +11,11 @@ Each app has its own Lettermint project: its own API token, logs, webhook and re
11
11
 
12
12
  ```ruby
13
13
  # Gemfile
14
- gem "telex", github: "boxprod/telex"
14
+ gem "telex"
15
15
  ```
16
16
 
17
+ Or `gem "telex", github: "boxprod/telex"` to follow `main` between releases.
18
+
17
19
  ```yaml
18
20
  # bin/rails credentials:edit
19
21
  lettermint:
@@ -34,7 +36,7 @@ The sending domain must be verified in the Lettermint project (SPF, DKIM, return
34
36
 
35
37
  ### Receiving
36
38
 
37
- Install Action Mailbox if the app does not have it yet (it needs Active Storage):
39
+ Install Action Mailbox if the app does not have it yet (it needs Active Storage). Without it, Telex only sends:
38
40
 
39
41
  ```sh
40
42
  bin/rails action_mailbox:install db:migrate
@@ -99,3 +101,5 @@ bundle install
99
101
  bin/rails db:migrate
100
102
  bin/rails test
101
103
  ```
104
+
105
+ To release, bump `lib/telex/version.rb`, commit, then `bundle exec rake release`: it tags, pushes the tag and pushes the gem to RubyGems, asking for a one-time code.
data/config/routes.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  Rails.application.routes.draw do
2
- scope "/rails/action_mailbox", module: "action_mailbox/ingresses" do
3
- post "/lettermint/inbound_emails" => "lettermint/inbound_emails#create", as: :rails_lettermint_inbound_emails
2
+ if Telex.receiving?
3
+ scope "/rails/action_mailbox", module: "action_mailbox/ingresses" do
4
+ post "/lettermint/inbound_emails" => "lettermint/inbound_emails#create", as: :rails_lettermint_inbound_emails
5
+ end
4
6
  end
5
7
  end
data/lib/telex/engine.rb CHANGED
@@ -8,5 +8,11 @@ module Telex
8
8
  add_delivery_method :lettermint, Mail::SMTP, Telex::SMTP_SETTINGS.merge(password: Telex.api_token)
9
9
  end
10
10
  end
11
+
12
+ # An app that only sends does not load Action Mailbox: the ingress is left out, or eager
13
+ # loading it would stop the app from booting.
14
+ initializer "telex.without_action_mailbox", before: :set_autoload_paths do
15
+ Rails.autoloaders.main.ignore(root.join("app/controllers/action_mailbox")) unless Telex.receiving?
16
+ end
11
17
  end
12
18
  end
data/lib/telex/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Telex
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/telex.rb CHANGED
@@ -25,6 +25,11 @@ module Telex
25
25
  Rails.application.credentials.dig(:lettermint, :webhook_secret) || ENV["LETTERMINT_WEBHOOK_SECRET"]
26
26
  end
27
27
 
28
+ # Whether the app loads Action Mailbox, without which Telex only sends.
29
+ def receiving?
30
+ defined?(ActionMailbox::Engine) ? true : false
31
+ end
32
+
28
33
  # Replaced in tests; anything that answers #fetch(url) with the message's source.
29
34
  attr_writer :download
30
35
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - B.O.X
@@ -29,6 +29,7 @@ executables: []
29
29
  extensions: []
30
30
  extra_rdoc_files: []
31
31
  files:
32
+ - CHANGELOG.md
32
33
  - MIT-LICENSE
33
34
  - README.md
34
35
  - Rakefile