Class: Dashing::Configuration
- Inherits:
-
Object
- Object
- Dashing::Configuration
- Defined in:
- lib/dashing/configuration.rb
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#dashboard_layout_path ⇒ Object
Returns the value of attribute dashboard_layout_path.
-
#dashboards_views_path ⇒ Object
Returns the value of attribute dashboards_views_path.
-
#default_dashboard ⇒ Object
Returns the value of attribute default_dashboard.
-
#devise_allowed_models ⇒ Object
Returns the value of attribute devise_allowed_models.
-
#engine_path ⇒ Object
Returns the value of attribute engine_path.
-
#jobs_path ⇒ Object
Returns the value of attribute jobs_path.
-
#redis ⇒ Object
readonly
Returns the value of attribute redis.
-
#redis_host ⇒ Object
Returns the value of attribute redis_host.
-
#redis_namespace ⇒ Object
Returns the value of attribute redis_namespace.
-
#redis_password ⇒ Object
Returns the value of attribute redis_password.
-
#redis_port ⇒ Object
Returns the value of attribute redis_port.
-
#redis_timeout ⇒ Object
Returns the value of attribute redis_timeout.
-
#scheduler ⇒ Object
Returns the value of attribute scheduler.
-
#widgets_css_path ⇒ Object
Returns the value of attribute widgets_css_path.
-
#widgets_js_path ⇒ Object
Returns the value of attribute widgets_js_path.
-
#widgets_views_path ⇒ Object
Returns the value of attribute widgets_views_path.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #new_redis_connection ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/dashing/configuration.rb', line 16 def initialize @engine_path = '/dashing' @scheduler = ::Rufus::Scheduler.new # Redis @redis_host = '127.0.0.1' @redis_port = '6379' @redis_password = nil @redis_namespace = 'dashing_events' @redis_timeout = 3 # Authorization @auth_token = nil @devise_allowed_models = [] # Jobs @jobs_path = Rails.root.join('app', 'jobs') # Dashboards @default_dashboard = nil @dashboards_views_path = Rails.root.join('app', 'views', 'dashing', 'dashboards') @dashboard_layout_path = 'dashing/dashboard' # Widgets @widgets_views_path = Rails.root.join('app', 'views', 'dashing', 'widgets') @widgets_js_path = Rails.root.join('app', 'assets', 'javascripts', 'dashing') @widgets_css_path = Rails.root.join('app', 'assets', 'stylesheets', 'dashing') end |
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
10 11 12 |
# File 'lib/dashing/configuration.rb', line 10 def auth_token @auth_token end |
#dashboard_layout_path ⇒ Object
Returns the value of attribute dashboard_layout_path.
12 13 14 |
# File 'lib/dashing/configuration.rb', line 12 def dashboard_layout_path @dashboard_layout_path end |
#dashboards_views_path ⇒ Object
Returns the value of attribute dashboards_views_path.
12 13 14 |
# File 'lib/dashing/configuration.rb', line 12 def dashboards_views_path @dashboards_views_path end |
#default_dashboard ⇒ Object
Returns the value of attribute default_dashboard.
12 13 14 |
# File 'lib/dashing/configuration.rb', line 12 def default_dashboard @default_dashboard end |
#devise_allowed_models ⇒ Object
Returns the value of attribute devise_allowed_models.
10 11 12 |
# File 'lib/dashing/configuration.rb', line 10 def devise_allowed_models @devise_allowed_models end |
#engine_path ⇒ Object
Returns the value of attribute engine_path.
14 15 16 |
# File 'lib/dashing/configuration.rb', line 14 def engine_path @engine_path end |
#jobs_path ⇒ Object
Returns the value of attribute jobs_path.
11 12 13 |
# File 'lib/dashing/configuration.rb', line 11 def jobs_path @jobs_path end |
#redis ⇒ Object (readonly)
Returns the value of attribute redis.
8 9 10 |
# File 'lib/dashing/configuration.rb', line 8 def redis @redis end |
#redis_host ⇒ Object
Returns the value of attribute redis_host.
9 10 11 |
# File 'lib/dashing/configuration.rb', line 9 def redis_host @redis_host end |
#redis_namespace ⇒ Object
Returns the value of attribute redis_namespace.
9 10 11 |
# File 'lib/dashing/configuration.rb', line 9 def redis_namespace @redis_namespace end |
#redis_password ⇒ Object
Returns the value of attribute redis_password.
9 10 11 |
# File 'lib/dashing/configuration.rb', line 9 def redis_password @redis_password end |
#redis_port ⇒ Object
Returns the value of attribute redis_port.
9 10 11 |
# File 'lib/dashing/configuration.rb', line 9 def redis_port @redis_port end |
#redis_timeout ⇒ Object
Returns the value of attribute redis_timeout.
9 10 11 |
# File 'lib/dashing/configuration.rb', line 9 def redis_timeout @redis_timeout end |
#scheduler ⇒ Object
Returns the value of attribute scheduler.
14 15 16 |
# File 'lib/dashing/configuration.rb', line 14 def scheduler @scheduler end |
#widgets_css_path ⇒ Object
Returns the value of attribute widgets_css_path.
13 14 15 |
# File 'lib/dashing/configuration.rb', line 13 def @widgets_css_path end |
#widgets_js_path ⇒ Object
Returns the value of attribute widgets_js_path.
13 14 15 |
# File 'lib/dashing/configuration.rb', line 13 def @widgets_js_path end |
#widgets_views_path ⇒ Object
Returns the value of attribute widgets_views_path.
13 14 15 |
# File 'lib/dashing/configuration.rb', line 13 def @widgets_views_path end |
Instance Method Details
#new_redis_connection ⇒ Object
49 50 51 |
# File 'lib/dashing/configuration.rb', line 49 def new_redis_connection ::Redis.new(host: redis_host, port: redis_port, password: redis_password) end |