Module: Rerout::Rails
- Defined in:
- lib/rerout/rails.rb,
lib/rerout/rails/events.rb,
lib/rerout/rails/railtie.rb,
lib/rerout/rails/version.rb,
lib/rerout/rails/configuration.rb,
lib/rerout/rails/webhook_controller.rb
Overview
Official Rails integration for the Rerout branded-link API.
Wraps the base Rerout SDK with Rails-native ergonomics:
-
Rails.client — a process-wide Client built from an initializer.
-
WebhookController — verifies the ‘X-Rerout-Signature` header and instruments an `ActiveSupport::Notifications` event per delivery.
-
Events — the notification topics apps subscribe to.
Defined Under Namespace
Modules: Events Classes: Configuration, ConfigurationError, Railtie, WebhookController
Constant Summary collapse
- VERSION =
Version of the ‘rerout-rails` gem. Follows semantic versioning and is released in lockstep with the base `rerout` gem.
'0.1.0'
Class Attribute Summary collapse
-
.config ⇒ Rerout::Rails::Configuration
The global Configuration.
Class Method Summary collapse
-
.client ⇒ Rerout::Client
The shared, lazily-built Client.
-
.configure {|config| ... } ⇒ Rerout::Rails::Configuration
Yields the configuration for mutation.
-
.reset! ⇒ void
Drop the global configuration and cached client.
Class Attribute Details
.config ⇒ Rerout::Rails::Configuration
The global Configuration.
28 29 30 |
# File 'lib/rerout/rails.rb', line 28 def config @config ||= Configuration.new end |
Class Method Details
.client ⇒ Rerout::Client
The shared, lazily-built Client.
49 50 51 |
# File 'lib/rerout/rails.rb', line 49 def client config.client end |
.configure {|config| ... } ⇒ Rerout::Rails::Configuration
40 41 42 43 |
# File 'lib/rerout/rails.rb', line 40 def configure yield(config) if block_given? config end |
.reset! ⇒ void
This method returns an undefined value.
Drop the global configuration and cached client. Test seam.
62 63 64 |
# File 'lib/rerout/rails.rb', line 62 def reset! @config = nil end |