Class: Flightdeck::Configuration
- Inherits:
-
Object
- Object
- Flightdeck::Configuration
- Defined in:
- lib/flightdeck/configuration.rb
Instance Attribute Summary collapse
-
#backtrace_lines ⇒ Object
Returns the value of attribute backtrace_lines.
-
#base_controller_class ⇒ Object
Returns the value of attribute base_controller_class.
-
#bulk_action_limit ⇒ Object
Returns the value of attribute bulk_action_limit.
-
#chart_cache_ttl ⇒ Object
Returns the value of attribute chart_cache_ttl.
-
#chart_poll_interval ⇒ Object
Returns the value of attribute chart_poll_interval.
-
#count_cap ⇒ Object
Returns the value of attribute count_cap.
-
#display_timezone ⇒ Object
Returns the value of attribute display_timezone.
-
#http_basic ⇒ Object
Returns the value of attribute http_basic.
-
#per_page ⇒ Object
Returns the value of attribute per_page.
-
#poll_interval ⇒ Object
Returns the value of attribute poll_interval.
-
#skip_authentication ⇒ Object
Returns the value of attribute skip_authentication.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#resolve_http_basic ⇒ Object
Resolved fresh on every call so that credentials rotated in the environment (or in Rails credentials) take effect without a restart, and so that nothing touches Rails.application.credentials at boot.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/flightdeck/configuration.rb', line 17 def initialize @base_controller_class = nil @http_basic = nil @skip_authentication = false @poll_interval = 5.seconds @chart_poll_interval = 30.seconds @per_page = 25 @count_cap = 500_000 @bulk_action_limit = 1_000 @chart_cache_ttl = 30.seconds @display_timezone = "UTC" @backtrace_lines = 50 end |
Instance Attribute Details
#backtrace_lines ⇒ Object
Returns the value of attribute backtrace_lines.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def backtrace_lines @backtrace_lines end |
#base_controller_class ⇒ Object
Returns the value of attribute base_controller_class.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def base_controller_class @base_controller_class end |
#bulk_action_limit ⇒ Object
Returns the value of attribute bulk_action_limit.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def bulk_action_limit @bulk_action_limit end |
#chart_cache_ttl ⇒ Object
Returns the value of attribute chart_cache_ttl.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def chart_cache_ttl @chart_cache_ttl end |
#chart_poll_interval ⇒ Object
Returns the value of attribute chart_poll_interval.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def chart_poll_interval @chart_poll_interval end |
#count_cap ⇒ Object
Returns the value of attribute count_cap.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def count_cap @count_cap end |
#display_timezone ⇒ Object
Returns the value of attribute display_timezone.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def display_timezone @display_timezone end |
#http_basic ⇒ Object
Returns the value of attribute http_basic.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def http_basic @http_basic end |
#per_page ⇒ Object
Returns the value of attribute per_page.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def per_page @per_page end |
#poll_interval ⇒ Object
Returns the value of attribute poll_interval.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def poll_interval @poll_interval end |
#skip_authentication ⇒ Object
Returns the value of attribute skip_authentication.
5 6 7 |
# File 'lib/flightdeck/configuration.rb', line 5 def skip_authentication @skip_authentication end |
Instance Method Details
#resolve_http_basic ⇒ Object
Resolved fresh on every call so that credentials rotated in the environment (or in Rails credentials) take effect without a restart, and so that nothing touches Rails.application.credentials at boot.
Returns a { username:, password: } hash, or nil when unconfigured.
36 37 38 |
# File 'lib/flightdeck/configuration.rb', line 36 def resolve_http_basic from_explicit || from_env || from_credentials end |