class Namira::Config
Namira
configuration
Namira.configure do |config| config.user_agent = "MyCoolApp" end
@!attribute [rw] max_redirect
The maximum number of redirects to follow before throwing a {Namira::Errors::RedirectError} @return [Integer] Defaults: 3
@!attribute [rw] timeout
The max length of time (in seconds) Namira will wait before canceling the request and throwing a {Namira::Errors::TimeoutError} @return [Float] Defaults: 5.0
@!attribute [rw] backend
The backend Namira will use to send the request. @return [Namira::Backend] This returns a Class and not an instance. Defaults: {Namira::Backend}
@!attribute [rw] user_agent
The string to send for the "User-Agent" header. The value set here will be overriden if a user agent is specified on the request itself. @return [String] Defaults: Namira/1.0
@!attribute [r] headers
Default headers to send with each request @return [Hash]
@!attribute [rw] log_requests
Log requests using puts or Rails.logger.debug if it's defined @return (Bool) Defaults: true
@!attribute [rw] async_queue_name
The queue name that async requests should be added too. @return [Symbol] Defaults: :default
@!attribute [rw] async_adapter
The preferred async adapter to use. Possible Values: :active_job, :sidekiq @return [Symbol] Defaults: :active_job
Constants
- DEFAULT_SETTINGS
The attr_accessor :max_redirect attr_accessor :timeout attr_accessor :backend attr_accessor :user_agent
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/namira/config.rb, line 68 def initialize super(DEFAULT_SETTINGS) end