Class: ScalewayTem::ActionMailer::Configuration
- Inherits:
-
Object
- Object
- ScalewayTem::ActionMailer::Configuration
- Defined in:
- lib/scaleway_tem/action_mailer/configuration.rb
Overview
Global settings, set once at boot. Every field can also be overridden per delivery through ActionMailer's own settings hash, which is why DeliveryMethod merges rather than reads these directly.
Constant Summary collapse
- DEFAULT_REGION =
Scaleway exposes Transactional Email in several regions. fr-par is the default because it is the one region TEM launched in and the one the official Symfony bridge assumes.
"fr-par"- DEFAULT_TIMEOUT =
Generous enough for a slow API, short enough that a stuck request does not hold a Puma thread or a Solid Queue worker for a minute.
15- DEFAULT_API_HOST =
"https://api.scaleway.com"
Instance Attribute Summary collapse
-
#api_host ⇒ Object
Returns the value of attribute api_host.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#project_id ⇒ Object
Returns the value of attribute project_id.
-
#region ⇒ Object
Returns the value of attribute region.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
22 23 24 25 26 27 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 22 def initialize @region = DEFAULT_REGION @timeout = DEFAULT_TIMEOUT @open_timeout = DEFAULT_TIMEOUT @api_host = DEFAULT_API_HOST end |
Instance Attribute Details
#api_host ⇒ Object
Returns the value of attribute api_host.
20 21 22 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 20 def api_host @api_host end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
20 21 22 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 20 def open_timeout @open_timeout end |
#project_id ⇒ Object
Returns the value of attribute project_id.
20 21 22 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 20 def project_id @project_id end |
#region ⇒ Object
Returns the value of attribute region.
20 21 22 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 20 def region @region end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
20 21 22 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 20 def secret_key @secret_key end |
#timeout ⇒ Object
Returns the value of attribute timeout.
20 21 22 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 20 def timeout @timeout end |
Instance Method Details
#to_h ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/scaleway_tem/action_mailer/configuration.rb', line 29 def to_h { secret_key: secret_key, project_id: project_id, region: region, timeout: timeout, open_timeout: open_timeout, api_host: api_host } end |