Class: SpecTracker::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_pathObject (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

#localeObject

Returns the value of attribute locale.



3
4
5
# File 'lib/spec_tracker/config/configuration.rb', line 3

def locale
  @locale
end

#scenario_id_headerObject

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_regexObject

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_headerObject

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_pathObject

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_typeObject

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_pathObject

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

#wordingObject (readonly)

Returns the value of attribute wording.



6
7
8
# File 'lib/spec_tracker/config/configuration.rb', line 6

def wording
  @wording
end