Class: Kobana::Configuration
- Inherits:
-
Object
- Object
- Kobana::Configuration
- Defined in:
- lib/kobana/configuration.rb
Instance Attribute Summary collapse
-
#api_token ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds).
-
#api_version ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds).
-
#custom_headers ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds).
-
#debug ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds).
-
#environment ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds).
-
#open_timeout ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds).
-
#timeout ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds).
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #inspect ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 |
# File 'lib/kobana/configuration.rb', line 11 def initialize @custom_headers = {} @environment = :sandbox # nil means "no global override" — each resource uses its own declared # api_version (see Resources::Base). Set this to force a version globally. @api_version = nil end |
Instance Attribute Details
#api_token ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds). Both default to nil (no timeout) to preserve historical behavior; set them to fail fast instead of blocking the caller when the API is slow/hanging.
8 9 10 |
# File 'lib/kobana/configuration.rb', line 8 def api_token @api_token end |
#api_version ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds). Both default to nil (no timeout) to preserve historical behavior; set them to fail fast instead of blocking the caller when the API is slow/hanging.
8 9 10 |
# File 'lib/kobana/configuration.rb', line 8 def api_version @api_version end |
#custom_headers ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds). Both default to nil (no timeout) to preserve historical behavior; set them to fail fast instead of blocking the caller when the API is slow/hanging.
8 9 10 |
# File 'lib/kobana/configuration.rb', line 8 def custom_headers @custom_headers end |
#debug ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds). Both default to nil (no timeout) to preserve historical behavior; set them to fail fast instead of blocking the caller when the API is slow/hanging.
8 9 10 |
# File 'lib/kobana/configuration.rb', line 8 def debug @debug end |
#environment ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds). Both default to nil (no timeout) to preserve historical behavior; set them to fail fast instead of blocking the caller when the API is slow/hanging.
8 9 10 |
# File 'lib/kobana/configuration.rb', line 8 def environment @environment end |
#open_timeout ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds). Both default to nil (no timeout) to preserve historical behavior; set them to fail fast instead of blocking the caller when the API is slow/hanging.
8 9 10 |
# File 'lib/kobana/configuration.rb', line 8 def open_timeout @open_timeout end |
#timeout ⇒ Object
‘open_timeout` and `timeout` are passed straight to Faraday (in seconds). Both default to nil (no timeout) to preserve historical behavior; set them to fail fast instead of blocking the caller when the API is slow/hanging.
8 9 10 |
# File 'lib/kobana/configuration.rb', line 8 def timeout @timeout end |
Instance Method Details
#inspect ⇒ Object
19 20 21 22 |
# File 'lib/kobana/configuration.rb', line 19 def inspect default_inspect = super default_inspect.gsub(/api_token="(.*)"/, "api_token=\"[REDACTED]\"") end |