Class: TM::Configuration
- Inherits:
-
Object
- Object
- TM::Configuration
- Defined in:
- lib/tm/configuration.rb
Class Attribute Summary collapse
-
.data ⇒ Object
Returns the value of attribute data.
-
.names ⇒ Object
Returns the value of attribute names.
-
.root ⇒ Object
Returns the value of attribute root.
-
.tags ⇒ Object
Returns the value of attribute tags.
Class Method Summary collapse
Class Attribute Details
.data ⇒ Object
Returns the value of attribute data.
6 7 8 |
# File 'lib/tm/configuration.rb', line 6 def data @data end |
.names ⇒ Object
Returns the value of attribute names.
6 7 8 |
# File 'lib/tm/configuration.rb', line 6 def names @names end |
.root ⇒ Object
Returns the value of attribute root.
6 7 8 |
# File 'lib/tm/configuration.rb', line 6 def root @root end |
.tags ⇒ Object
Returns the value of attribute tags.
6 7 8 |
# File 'lib/tm/configuration.rb', line 6 def @tags end |
Class Method Details
.config ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/tm/configuration.rb', line 17 def config ['config', '../config'].map do |f| config_file = File.join( root, f, 'testingmachine.yml') return YAML.load_file(config_file) if File.exist?(config_file) end return {} end |
.load_config(config) ⇒ Object
33 34 35 36 37 |
# File 'lib/tm/configuration.rb', line 33 def load_config(config) ## load configuration for Capybara = config && config['capybara'] .map { |f| Capybara.send((f[0] + '=').to_sym, f[1]) } if end |
.load_setting_for_tags(tags = []) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/tm/configuration.rb', line 25 def (=[]) = .to_a.unshift(:all) .map do |tag| config = self.config['tags'] && self.config['tags'][tag.to_s] load_config(config) end end |