Class: CommandTower::Messaging::Execution::Adapters::Expo::Configuration
- Inherits:
-
Object
- Object
- CommandTower::Messaging::Execution::Adapters::Expo::Configuration
- Defined in:
- app/services/command_tower/messaging/execution/adapters/expo/configuration.rb
Overview
Platform readiness detector for Expo Push delivery. Ready when transport adapter is fake, log, or http — disabled never counts. http does not require access_token (Expo default); Bearer is optional.
Constant Summary collapse
- CONFIGURED_ADAPTERS =
%w[fake log http].freeze
Class Method Summary collapse
Instance Method Summary collapse
- #access_token ⇒ Object
- #adapter_name ⇒ Object
- #api_base_url ⇒ Object
- #expo_configured? ⇒ Boolean
- #timeout_seconds ⇒ Object
Class Method Details
.expo_configured? ⇒ Boolean
14 15 16 |
# File 'app/services/command_tower/messaging/execution/adapters/expo/configuration.rb', line 14 def self.expo_configured? new.expo_configured? end |
Instance Method Details
#access_token ⇒ Object
34 35 36 |
# File 'app/services/command_tower/messaging/execution/adapters/expo/configuration.rb', line 34 def access_token CommandTower.config.messaging.expo.access_token.to_s.strip end |
#adapter_name ⇒ Object
22 23 24 |
# File 'app/services/command_tower/messaging/execution/adapters/expo/configuration.rb', line 22 def adapter_name CommandTower.config.messaging.expo.adapter.to_s end |
#api_base_url ⇒ Object
26 27 28 |
# File 'app/services/command_tower/messaging/execution/adapters/expo/configuration.rb', line 26 def api_base_url CommandTower.config.messaging.expo.api_base_url.to_s.strip end |
#expo_configured? ⇒ Boolean
18 19 20 |
# File 'app/services/command_tower/messaging/execution/adapters/expo/configuration.rb', line 18 def expo_configured? CONFIGURED_ADAPTERS.include?(adapter_name) end |
#timeout_seconds ⇒ Object
30 31 32 |
# File 'app/services/command_tower/messaging/execution/adapters/expo/configuration.rb', line 30 def timeout_seconds CommandTower.config.messaging.expo.timeout_seconds end |