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 =
:tms
DEFAULT_ISSUE_TAG =
:issue
DEFAULT_SEVERITY_TAG =
:severity
DEFAULT_EPIC_TAG =
:epic
DEFAULT_FEATURE_TAG =
:feature
DEFAULT_STORY_TAG =
:story

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRspecConfig



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



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
   = :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 || 
  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



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
   = :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 || 
  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



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

def epic_tag
  @epic_tag || DEFAULT_EPIC_TAG
end

#feature_tagSymbol



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

def feature_tag
  @feature_tag || DEFAULT_FEATURE_TAG
end

#ignored_tagsArray



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

def ignored_tags
  @ignored_tags || []
end

#issue_tagSymbol



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

def issue_tag
  @issue_tag || DEFAULT_ISSUE_TAG
end


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
   = :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 || 
  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


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
   = :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 || 
  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)



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
   = :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 || 
  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



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
   = :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 || 
  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



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
   = :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 || 
  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



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

def severity_tag
  @severity_tag || DEFAULT_SEVERITY_TAG
end

#story_tagSymbol



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

def 
  @story_tag || 
end

#tms_tagSymbol



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



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