Class: RailsOpsDashboard::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_ops_dashboard/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



11
12
13
14
15
16
17
18
19
20
# File 'lib/rails_ops_dashboard/configuration.rb', line 11

def initialize
  @username = 'admin'
  @password = 'password'
  @blocked_environments = %w[production]
  @seeds_path = 'app/services/database_update'
  @seeds_base_class = 'DatabaseUpdate'
  @seeds_executor = ->(klass) { klass.new.call }
  @rake_tasks_path = 'lib/tasks'
  @plugins = {}
end

Instance Attribute Details

#blocked_environmentsObject

Returns the value of attribute blocked_environments.



5
6
7
# File 'lib/rails_ops_dashboard/configuration.rb', line 5

def blocked_environments
  @blocked_environments
end

#passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/rails_ops_dashboard/configuration.rb', line 5

def password
  @password
end

#pluginsObject (readonly)

Returns the value of attribute plugins.



9
10
11
# File 'lib/rails_ops_dashboard/configuration.rb', line 9

def plugins
  @plugins
end

#rake_tasks_pathObject

Returns the value of attribute rake_tasks_path.



5
6
7
# File 'lib/rails_ops_dashboard/configuration.rb', line 5

def rake_tasks_path
  @rake_tasks_path
end

#seeds_base_classObject

Returns the value of attribute seeds_base_class.



5
6
7
# File 'lib/rails_ops_dashboard/configuration.rb', line 5

def seeds_base_class
  @seeds_base_class
end

#seeds_executorObject

Returns the value of attribute seeds_executor.



5
6
7
# File 'lib/rails_ops_dashboard/configuration.rb', line 5

def seeds_executor
  @seeds_executor
end

#seeds_pathObject

Returns the value of attribute seeds_path.



5
6
7
# File 'lib/rails_ops_dashboard/configuration.rb', line 5

def seeds_path
  @seeds_path
end

#usernameObject

Returns the value of attribute username.



5
6
7
# File 'lib/rails_ops_dashboard/configuration.rb', line 5

def username
  @username
end

Instance Method Details

#plugin(name, **options) ⇒ Object



22
23
24
# File 'lib/rails_ops_dashboard/configuration.rb', line 22

def plugin(name, **options)
  @plugins[name] = options
end