Class: SpecTracker::Configuration
- Inherits:
-
Object
- Object
- SpecTracker::Configuration
- Defined in:
- lib/spec_tracker/config/configuration.rb
Instance Attribute Summary collapse
-
#local_path ⇒ Object
readonly
Returns the value of attribute local_path.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#scenario_id_header ⇒ Object
Returns the value of attribute scenario_id_header.
-
#scenario_id_regex ⇒ Object
Returns the value of attribute scenario_id_regex.
-
#scenario_name_header ⇒ Object
Returns the value of attribute scenario_name_header.
-
#spec_path ⇒ Object
Returns the value of attribute spec_path.
-
#spec_type ⇒ Object
Returns the value of attribute spec_type.
-
#test_report_path ⇒ Object
Returns the value of attribute test_report_path.
-
#wording ⇒ Object
readonly
Returns the value of attribute wording.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/spec_tracker/config/configuration.rb', line 8 def initialize @scenario_id_header = 'Scenario ID' @scenario_name_header = 'Name/Rule' @spec_path = 'specifications' @test_report_path = 'test/reports' @scenario_id_regex = /\[([a-zA-Z\-]+)\]/ @spec_type = 'csv' @available_types = %w(csv gherkin) @locale = 'fr' @available_locales = %w(fr en) wording_path = Pathname.new(__FILE__).join("../#{locale}.yml") @wording = YAML.load_file(wording_path)[:"#{locale}"] @local_path = Pathname.new(Dir.pwd) end |
Instance Attribute Details
#local_path ⇒ Object (readonly)
Returns the value of attribute local_path.
6 7 8 |
# File 'lib/spec_tracker/config/configuration.rb', line 6 def local_path @local_path end |
#locale ⇒ Object
Returns the value of attribute locale.
3 4 5 |
# File 'lib/spec_tracker/config/configuration.rb', line 3 def locale @locale end |
#scenario_id_header ⇒ Object
Returns the value of attribute scenario_id_header.
3 4 5 |
# File 'lib/spec_tracker/config/configuration.rb', line 3 def scenario_id_header @scenario_id_header end |
#scenario_id_regex ⇒ Object
Returns the value of attribute scenario_id_regex.
3 4 5 |
# File 'lib/spec_tracker/config/configuration.rb', line 3 def scenario_id_regex @scenario_id_regex end |
#scenario_name_header ⇒ Object
Returns the value of attribute scenario_name_header.
3 4 5 |
# File 'lib/spec_tracker/config/configuration.rb', line 3 def scenario_name_header @scenario_name_header end |
#spec_path ⇒ Object
Returns the value of attribute spec_path.
3 4 5 |
# File 'lib/spec_tracker/config/configuration.rb', line 3 def spec_path @spec_path end |
#spec_type ⇒ Object
Returns the value of attribute spec_type.
3 4 5 |
# File 'lib/spec_tracker/config/configuration.rb', line 3 def spec_type @spec_type end |
#test_report_path ⇒ Object
Returns the value of attribute test_report_path.
3 4 5 |
# File 'lib/spec_tracker/config/configuration.rb', line 3 def test_report_path @test_report_path end |
#wording ⇒ Object (readonly)
Returns the value of attribute wording.
6 7 8 |
# File 'lib/spec_tracker/config/configuration.rb', line 6 def wording @wording end |