allure-rspec 2.24.0 → 2.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f346f21d48e9abe574153fd5bbed15ca5c81ed665d00a54bf0684b3b23e36a88
4
- data.tar.gz: cfb72d3e4255dbe83ec27723c6bdd65ccadd2705c56cec204b0b9bec73faaa6c
3
+ metadata.gz: 2e00eb260413e397e7f12592307cb60f752d7e913b30c17ce8d2606f47290b2e
4
+ data.tar.gz: c15473a3ffb07c9706258695f142be47225ca878eb0b9dc935904cbf35eedfe9
5
5
  SHA512:
6
- metadata.gz: c00028d58aa1075cb5a00f1c14910efb5791c55b29254a1ec4db56895008415440912376ff1e100247a65540b88441e782a1305eae48b44b489ef15aaea2f741
7
- data.tar.gz: ab909d433ae503ca994a9584278ddc6abaa25f94b8a97f4de6462d3510665a1037bfc9e831d72828f1b0d16c31228820ca2502b90b34711bb0d331a9c4d07213
6
+ metadata.gz: a6fe13cdc2af401240787dfa6770a64e881f90eb89fe11bd7b9b86e8834b040bda6c2b2fbc4d67feaf404f5c50e9ec521ce26872d16d372dd017b3103d3d3e20
7
+ data.tar.gz: 0b37ad1191095dbe7b0a5fa2f953ee8c48584787930ae792ac7e4e85997344e873c1e765d5c6b534899aebf5da2d2e216b3f84314380317d1961828fb7ec2d83
@@ -21,7 +21,6 @@ module AllureRspec
21
21
  # @return [String]
22
22
  class RspecConfig
23
23
  include Singleton
24
- extend Forwardable
25
24
 
26
25
  # @return [Symbol] default tms tag
27
26
  DEFAULT_TMS_TAG = :tms
@@ -36,26 +35,6 @@ module AllureRspec
36
35
  # @return [Symbol] default story tag
37
36
  DEFAULT_STORY_TAG = :story
38
37
 
39
- def_delegators :@allure_config,
40
- :clean_results_directory,
41
- :clean_results_directory=,
42
- :link_issue_pattern,
43
- :link_issue_pattern=,
44
- :link_tms_pattern,
45
- :link_tms_pattern=,
46
- :logging_level,
47
- :logging_level=,
48
- :logger,
49
- :logger=,
50
- :results_directory,
51
- :results_directory=,
52
- :environment,
53
- :environment=,
54
- :environment_properties,
55
- :environment_properties=,
56
- :categories,
57
- :categories=
58
-
59
38
  def initialize
60
39
  @allure_config = Allure.configuration
61
40
  end
@@ -102,5 +81,13 @@ module AllureRspec
102
81
  def ignored_tags
103
82
  @ignored_tags || []
104
83
  end
84
+
85
+ def method_missing(method, ...)
86
+ @allure_config.respond_to?(method) ? @allure_config.send(method, ...) : super
87
+ end
88
+
89
+ def respond_to_missing?(method, include_private = false)
90
+ @allure_config.respond_to?(method, include_private) || super
91
+ end
105
92
  end
106
93
  end
@@ -104,8 +104,8 @@ module AllureRspec
104
104
 
105
105
  Allure::TestResult.new(
106
106
  name: example.description,
107
- description: "Location - #{strip_relative(example.location)}",
108
- description_html: "Location - #{strip_relative(example.location)}",
107
+ description: "Location - #{strip_relative(parser.location)}",
108
+ description_html: "Location - #{strip_relative(parser.location)}",
109
109
  history_id: example.id,
110
110
  full_name: example.full_description,
111
111
  labels: parser.labels,
@@ -31,7 +31,7 @@ module AllureRspec
31
31
  # Metadata parser instance
32
32
  #
33
33
  # @param [RSpec::Core::Example] example
34
- # @param [AllureRspec::RspecConfig] config <description>
34
+ # @param [AllureRspec::RspecConfig] config
35
35
  def initialize(example, config)
36
36
  @example = example
37
37
  @config = config
@@ -67,6 +67,21 @@ module AllureRspec
67
67
  )
68
68
  end
69
69
 
70
+ # Example location
71
+ #
72
+ # @return [String]
73
+ def location
74
+ file = example
75
+ .metadata
76
+ .fetch(:shared_group_inclusion_backtrace)
77
+ .last
78
+ &.formatted_inclusion_location
79
+
80
+ return example.location unless file
81
+
82
+ file
83
+ end
84
+
70
85
  private
71
86
 
72
87
  # @return [RSpec::Core::Example]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allure-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.24.0
4
+ version: 2.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrejs Cunskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-17 00:00:00.000000000 Z
11
+ date: 2024-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: allure-ruby-commons
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.24.0
19
+ version: 2.24.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.24.0
26
+ version: 2.24.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-core
29
29
  requirement: !ruby/object:Gem::Requirement