Class: AllureRspec::RspecConfig

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/allure_rspec/config.rb

Overview

Allure RSpec configuration class

Constant Summary collapse

DEFAULT_TMS_TAG =

Returns default tms tag.

Returns:

  • (Symbol)

    default tms tag

:tms
DEFAULT_ISSUE_TAG =

Returns default issue tag.

Returns:

  • (Symbol)

    default issue tag

:issue
DEFAULT_SEVERITY_TAG =

Returns default severity tag.

Returns:

  • (Symbol)

    default severity tag

:severity
DEFAULT_EPIC_TAG =

Returns default epic tag.

Returns:

  • (Symbol)

    default epic tag

:epic
DEFAULT_FEATURE_TAG =

Returns default feature tag.

Returns:

  • (Symbol)

    default feature tag

:feature
DEFAULT_STORY_TAG =

Returns default story tag.

Returns:

  • (Symbol)

    default story tag

:story

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRspecConfig

Returns a new instance of RspecConfig.



38
39
40
# File 'lib/allure_rspec/config.rb', line 38

def initialize
  @allure_config = Allure.configuration
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



85
86
87
# File 'lib/allure_rspec/config.rb', line 85

def method_missing(method, ...)
  @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
end

Instance Attribute Details

#clean_results_directoryBoolean

Returns:

  • (Boolean)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/allure_rspec/config.rb', line 22

class RspecConfig
  include Singleton

  # @return [Symbol] default tms tag
  DEFAULT_TMS_TAG = :tms
  # @return [Symbol] default issue tag
  DEFAULT_ISSUE_TAG = :issue
  # @return [Symbol] default severity tag
  DEFAULT_SEVERITY_TAG = :severity
  # @return [Symbol] default epic tag
  DEFAULT_EPIC_TAG = :epic
  # @return [Symbol] default feature tag
  DEFAULT_FEATURE_TAG = :feature
  # @return [Symbol] default story tag
  DEFAULT_STORY_TAG = :story

  def initialize
    @allure_config = Allure.configuration
  end

  attr_writer :tms_tag,
              :issue_tag,
              :severity_tag,
              :epic_tag,
              :feature_tag,
              :story_tag,
              :ignored_tags

  # @return [Symbol]
  def tms_tag
    @tms_tag || DEFAULT_TMS_TAG
  end

  # @return [Symbol]
  def issue_tag
    @issue_tag || DEFAULT_ISSUE_TAG
  end

  # @return [Symbol]
  def severity_tag
    @severity_tag || DEFAULT_SEVERITY_TAG
  end

  # @return [Symbol]
  def epic_tag
    @epic_tag || DEFAULT_EPIC_TAG
  end

  # @return [Symbol]
  def feature_tag
    @feature_tag || DEFAULT_FEATURE_TAG
  end

  # @return [Symbol]
  def 
    @story_tag || DEFAULT_STORY_TAG
  end

  # @return [Array]
  def ignored_tags
    @ignored_tags || []
  end

  def method_missing(method, ...)
    @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
  end

  def respond_to_missing?(method, include_private = false)
    @allure_config.respond_to?(method, include_private) || super
  end
end

#environmentString

Returns:

  • (String)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/allure_rspec/config.rb', line 22

class RspecConfig
  include Singleton

  # @return [Symbol] default tms tag
  DEFAULT_TMS_TAG = :tms
  # @return [Symbol] default issue tag
  DEFAULT_ISSUE_TAG = :issue
  # @return [Symbol] default severity tag
  DEFAULT_SEVERITY_TAG = :severity
  # @return [Symbol] default epic tag
  DEFAULT_EPIC_TAG = :epic
  # @return [Symbol] default feature tag
  DEFAULT_FEATURE_TAG = :feature
  # @return [Symbol] default story tag
  DEFAULT_STORY_TAG = :story

  def initialize
    @allure_config = Allure.configuration
  end

  attr_writer :tms_tag,
              :issue_tag,
              :severity_tag,
              :epic_tag,
              :feature_tag,
              :story_tag,
              :ignored_tags

  # @return [Symbol]
  def tms_tag
    @tms_tag || DEFAULT_TMS_TAG
  end

  # @return [Symbol]
  def issue_tag
    @issue_tag || DEFAULT_ISSUE_TAG
  end

  # @return [Symbol]
  def severity_tag
    @severity_tag || DEFAULT_SEVERITY_TAG
  end

  # @return [Symbol]
  def epic_tag
    @epic_tag || DEFAULT_EPIC_TAG
  end

  # @return [Symbol]
  def feature_tag
    @feature_tag || DEFAULT_FEATURE_TAG
  end

  # @return [Symbol]
  def 
    @story_tag || DEFAULT_STORY_TAG
  end

  # @return [Array]
  def ignored_tags
    @ignored_tags || []
  end

  def method_missing(method, ...)
    @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
  end

  def respond_to_missing?(method, include_private = false)
    @allure_config.respond_to?(method, include_private) || super
  end
end

#epic_tagSymbol

Returns:

  • (Symbol)


66
67
68
# File 'lib/allure_rspec/config.rb', line 66

def epic_tag
  @epic_tag || DEFAULT_EPIC_TAG
end

#feature_tagSymbol

Returns:

  • (Symbol)


71
72
73
# File 'lib/allure_rspec/config.rb', line 71

def feature_tag
  @feature_tag || DEFAULT_FEATURE_TAG
end

#ignored_tagsArray

Returns:

  • (Array)


81
82
83
# File 'lib/allure_rspec/config.rb', line 81

def ignored_tags
  @ignored_tags || []
end

#issue_tagSymbol

Returns:

  • (Symbol)


56
57
58
# File 'lib/allure_rspec/config.rb', line 56

def issue_tag
  @issue_tag || DEFAULT_ISSUE_TAG
end

Returns:

  • (String)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/allure_rspec/config.rb', line 22

class RspecConfig
  include Singleton

  # @return [Symbol] default tms tag
  DEFAULT_TMS_TAG = :tms
  # @return [Symbol] default issue tag
  DEFAULT_ISSUE_TAG = :issue
  # @return [Symbol] default severity tag
  DEFAULT_SEVERITY_TAG = :severity
  # @return [Symbol] default epic tag
  DEFAULT_EPIC_TAG = :epic
  # @return [Symbol] default feature tag
  DEFAULT_FEATURE_TAG = :feature
  # @return [Symbol] default story tag
  DEFAULT_STORY_TAG = :story

  def initialize
    @allure_config = Allure.configuration
  end

  attr_writer :tms_tag,
              :issue_tag,
              :severity_tag,
              :epic_tag,
              :feature_tag,
              :story_tag,
              :ignored_tags

  # @return [Symbol]
  def tms_tag
    @tms_tag || DEFAULT_TMS_TAG
  end

  # @return [Symbol]
  def issue_tag
    @issue_tag || DEFAULT_ISSUE_TAG
  end

  # @return [Symbol]
  def severity_tag
    @severity_tag || DEFAULT_SEVERITY_TAG
  end

  # @return [Symbol]
  def epic_tag
    @epic_tag || DEFAULT_EPIC_TAG
  end

  # @return [Symbol]
  def feature_tag
    @feature_tag || DEFAULT_FEATURE_TAG
  end

  # @return [Symbol]
  def 
    @story_tag || DEFAULT_STORY_TAG
  end

  # @return [Array]
  def ignored_tags
    @ignored_tags || []
  end

  def method_missing(method, ...)
    @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
  end

  def respond_to_missing?(method, include_private = false)
    @allure_config.respond_to?(method, include_private) || super
  end
end

Returns:

  • (String)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/allure_rspec/config.rb', line 22

class RspecConfig
  include Singleton

  # @return [Symbol] default tms tag
  DEFAULT_TMS_TAG = :tms
  # @return [Symbol] default issue tag
  DEFAULT_ISSUE_TAG = :issue
  # @return [Symbol] default severity tag
  DEFAULT_SEVERITY_TAG = :severity
  # @return [Symbol] default epic tag
  DEFAULT_EPIC_TAG = :epic
  # @return [Symbol] default feature tag
  DEFAULT_FEATURE_TAG = :feature
  # @return [Symbol] default story tag
  DEFAULT_STORY_TAG = :story

  def initialize
    @allure_config = Allure.configuration
  end

  attr_writer :tms_tag,
              :issue_tag,
              :severity_tag,
              :epic_tag,
              :feature_tag,
              :story_tag,
              :ignored_tags

  # @return [Symbol]
  def tms_tag
    @tms_tag || DEFAULT_TMS_TAG
  end

  # @return [Symbol]
  def issue_tag
    @issue_tag || DEFAULT_ISSUE_TAG
  end

  # @return [Symbol]
  def severity_tag
    @severity_tag || DEFAULT_SEVERITY_TAG
  end

  # @return [Symbol]
  def epic_tag
    @epic_tag || DEFAULT_EPIC_TAG
  end

  # @return [Symbol]
  def feature_tag
    @feature_tag || DEFAULT_FEATURE_TAG
  end

  # @return [Symbol]
  def 
    @story_tag || DEFAULT_STORY_TAG
  end

  # @return [Array]
  def ignored_tags
    @ignored_tags || []
  end

  def method_missing(method, ...)
    @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
  end

  def respond_to_missing?(method, include_private = false)
    @allure_config.respond_to?(method, include_private) || super
  end
end

#loggerLogger (readonly)

Returns:

  • (Logger)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/allure_rspec/config.rb', line 22

class RspecConfig
  include Singleton

  # @return [Symbol] default tms tag
  DEFAULT_TMS_TAG = :tms
  # @return [Symbol] default issue tag
  DEFAULT_ISSUE_TAG = :issue
  # @return [Symbol] default severity tag
  DEFAULT_SEVERITY_TAG = :severity
  # @return [Symbol] default epic tag
  DEFAULT_EPIC_TAG = :epic
  # @return [Symbol] default feature tag
  DEFAULT_FEATURE_TAG = :feature
  # @return [Symbol] default story tag
  DEFAULT_STORY_TAG = :story

  def initialize
    @allure_config = Allure.configuration
  end

  attr_writer :tms_tag,
              :issue_tag,
              :severity_tag,
              :epic_tag,
              :feature_tag,
              :story_tag,
              :ignored_tags

  # @return [Symbol]
  def tms_tag
    @tms_tag || DEFAULT_TMS_TAG
  end

  # @return [Symbol]
  def issue_tag
    @issue_tag || DEFAULT_ISSUE_TAG
  end

  # @return [Symbol]
  def severity_tag
    @severity_tag || DEFAULT_SEVERITY_TAG
  end

  # @return [Symbol]
  def epic_tag
    @epic_tag || DEFAULT_EPIC_TAG
  end

  # @return [Symbol]
  def feature_tag
    @feature_tag || DEFAULT_FEATURE_TAG
  end

  # @return [Symbol]
  def 
    @story_tag || DEFAULT_STORY_TAG
  end

  # @return [Array]
  def ignored_tags
    @ignored_tags || []
  end

  def method_missing(method, ...)
    @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
  end

  def respond_to_missing?(method, include_private = false)
    @allure_config.respond_to?(method, include_private) || super
  end
end

#logging_levelInteger

Returns:

  • (Integer)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/allure_rspec/config.rb', line 22

class RspecConfig
  include Singleton

  # @return [Symbol] default tms tag
  DEFAULT_TMS_TAG = :tms
  # @return [Symbol] default issue tag
  DEFAULT_ISSUE_TAG = :issue
  # @return [Symbol] default severity tag
  DEFAULT_SEVERITY_TAG = :severity
  # @return [Symbol] default epic tag
  DEFAULT_EPIC_TAG = :epic
  # @return [Symbol] default feature tag
  DEFAULT_FEATURE_TAG = :feature
  # @return [Symbol] default story tag
  DEFAULT_STORY_TAG = :story

  def initialize
    @allure_config = Allure.configuration
  end

  attr_writer :tms_tag,
              :issue_tag,
              :severity_tag,
              :epic_tag,
              :feature_tag,
              :story_tag,
              :ignored_tags

  # @return [Symbol]
  def tms_tag
    @tms_tag || DEFAULT_TMS_TAG
  end

  # @return [Symbol]
  def issue_tag
    @issue_tag || DEFAULT_ISSUE_TAG
  end

  # @return [Symbol]
  def severity_tag
    @severity_tag || DEFAULT_SEVERITY_TAG
  end

  # @return [Symbol]
  def epic_tag
    @epic_tag || DEFAULT_EPIC_TAG
  end

  # @return [Symbol]
  def feature_tag
    @feature_tag || DEFAULT_FEATURE_TAG
  end

  # @return [Symbol]
  def 
    @story_tag || DEFAULT_STORY_TAG
  end

  # @return [Array]
  def ignored_tags
    @ignored_tags || []
  end

  def method_missing(method, ...)
    @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
  end

  def respond_to_missing?(method, include_private = false)
    @allure_config.respond_to?(method, include_private) || super
  end
end

#results_directoryString

Returns:

  • (String)


22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/allure_rspec/config.rb', line 22

class RspecConfig
  include Singleton

  # @return [Symbol] default tms tag
  DEFAULT_TMS_TAG = :tms
  # @return [Symbol] default issue tag
  DEFAULT_ISSUE_TAG = :issue
  # @return [Symbol] default severity tag
  DEFAULT_SEVERITY_TAG = :severity
  # @return [Symbol] default epic tag
  DEFAULT_EPIC_TAG = :epic
  # @return [Symbol] default feature tag
  DEFAULT_FEATURE_TAG = :feature
  # @return [Symbol] default story tag
  DEFAULT_STORY_TAG = :story

  def initialize
    @allure_config = Allure.configuration
  end

  attr_writer :tms_tag,
              :issue_tag,
              :severity_tag,
              :epic_tag,
              :feature_tag,
              :story_tag,
              :ignored_tags

  # @return [Symbol]
  def tms_tag
    @tms_tag || DEFAULT_TMS_TAG
  end

  # @return [Symbol]
  def issue_tag
    @issue_tag || DEFAULT_ISSUE_TAG
  end

  # @return [Symbol]
  def severity_tag
    @severity_tag || DEFAULT_SEVERITY_TAG
  end

  # @return [Symbol]
  def epic_tag
    @epic_tag || DEFAULT_EPIC_TAG
  end

  # @return [Symbol]
  def feature_tag
    @feature_tag || DEFAULT_FEATURE_TAG
  end

  # @return [Symbol]
  def 
    @story_tag || DEFAULT_STORY_TAG
  end

  # @return [Array]
  def ignored_tags
    @ignored_tags || []
  end

  def method_missing(method, ...)
    @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
  end

  def respond_to_missing?(method, include_private = false)
    @allure_config.respond_to?(method, include_private) || super
  end
end

#severity_tagSymbol

Returns:

  • (Symbol)


61
62
63
# File 'lib/allure_rspec/config.rb', line 61

def severity_tag
  @severity_tag || DEFAULT_SEVERITY_TAG
end

#story_tagSymbol

Returns:

  • (Symbol)


76
77
78
# File 'lib/allure_rspec/config.rb', line 76

def 
  @story_tag || DEFAULT_STORY_TAG
end

#tms_tagSymbol

Returns:

  • (Symbol)


51
52
53
# File 'lib/allure_rspec/config.rb', line 51

def tms_tag
  @tms_tag || DEFAULT_TMS_TAG
end

Instance Method Details

#respond_to_missing?(method, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/allure_rspec/config.rb', line 89

def respond_to_missing?(method, include_private = false)
  @allure_config.respond_to?(method, include_private) || super
end