allure-cucumber 2.13.3 → 2.13.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/allure_cucumber/tag_parser.rb +18 -14
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d8e51c721ebb6ab689c0b0a4d0403f0985ce78dcfed3c7636ab373d6a022d01
|
4
|
+
data.tar.gz: 38e5d9e0f65921e12e16b097c6cbbbe7525f7ced18d64f9d107f05be3eb309e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcce7431269029e6193e1465c1b42daaed2cb0890034654a0310fc7e63dbcd6000f30c6e2782ed4d86828858de50a665b80e15423a566a4fa7194782ac9548e5
|
7
|
+
data.tar.gz: 0a66d830ccb8db25ac1a843ee18ca286ec2a951f671064d100d7deab67d7b1cf97615ab5caec171018ebe1c6603d7b33bc11c318ace76eb5bc0a80f408a4d5cd
|
@@ -5,7 +5,7 @@ require_relative "config"
|
|
5
5
|
module AllureCucumber
|
6
6
|
# Cucumber tag parser helper methods
|
7
7
|
module TagParser
|
8
|
-
# @param [Cucumber::Core::Ast::Tag] tags
|
8
|
+
# @param [Array<Cucumber::Core::Ast::Tag>] tags
|
9
9
|
# @return [Array<Allure::Label>]
|
10
10
|
def tag_labels(tags)
|
11
11
|
tags
|
@@ -13,29 +13,23 @@ module AllureCucumber
|
|
13
13
|
.map { |tag| Allure::ResultUtils.tag_label(tag.name.delete_prefix("@")) }
|
14
14
|
end
|
15
15
|
|
16
|
-
# @param [Cucumber::Core::Ast::Tag] tags
|
16
|
+
# @param [Array<Cucumber::Core::Ast::Tag>] tags
|
17
17
|
# @return [Array<Allure::Link>]
|
18
18
|
def tms_links(tags)
|
19
19
|
return [] unless Allure::Config.link_tms_pattern
|
20
20
|
|
21
|
-
|
22
|
-
tags
|
23
|
-
.select { |tag| tag.name.match?(tms_pattern) }
|
24
|
-
.map { |tag| tag.name.match(tms_pattern) { |match| Allure::ResultUtils.tms_link(match[:tms]) } }
|
21
|
+
matching_links(tags, :tms)
|
25
22
|
end
|
26
23
|
|
27
|
-
# @param [Cucumber::Core::Ast::Tag] tags
|
24
|
+
# @param [Array<Cucumber::Core::Ast::Tag>] tags
|
28
25
|
# @return [Array<Allure::Link>]
|
29
26
|
def issue_links(tags)
|
30
27
|
return [] unless Allure::Config.link_issue_pattern
|
31
28
|
|
32
|
-
|
33
|
-
tags
|
34
|
-
.select { |tag| tag.name.match?(issue_pattern) }
|
35
|
-
.map { |tag| tag.name.match(issue_pattern) { |match| Allure::ResultUtils.issue_link(match[:issue]) } }
|
29
|
+
matching_links(tags, :issue)
|
36
30
|
end
|
37
31
|
|
38
|
-
# @param [Cucumber::Core::Ast::Tag] tags
|
32
|
+
# @param [Array<Cucumber::Core::Ast::Tag>] tags
|
39
33
|
# @return [Allure::Label]
|
40
34
|
def severity(tags)
|
41
35
|
severity_pattern = reserved_patterns[:severity]
|
@@ -46,7 +40,7 @@ module AllureCucumber
|
|
46
40
|
Allure::ResultUtils.severity_label(severity)
|
47
41
|
end
|
48
42
|
|
49
|
-
# @param [Cucumber::Core::Ast::Tag] tags
|
43
|
+
# @param [Array<Cucumber::Core::Ast::Tag>] tags
|
50
44
|
# @return [Hash<Symbol, Boolean>]
|
51
45
|
def status_detail_tags(tags)
|
52
46
|
{
|
@@ -58,7 +52,17 @@ module AllureCucumber
|
|
58
52
|
|
59
53
|
private
|
60
54
|
|
61
|
-
# @
|
55
|
+
# @param [Array<Cucumber::Core::Ast::Tag>] tags
|
56
|
+
# @param [Symbol] type
|
57
|
+
# @return [Array<Allure::Link>]
|
58
|
+
def matching_links(tags, type)
|
59
|
+
pattern = reserved_patterns[type]
|
60
|
+
tags
|
61
|
+
.select { |tag| tag.name.match?(pattern) }
|
62
|
+
.map { |tag| tag.name.match(pattern) { |match| Allure::ResultUtils.public_send("#{type}_link", match[type]) } }
|
63
|
+
end
|
64
|
+
|
65
|
+
# @return [Hash<Symbol, Regexp>]
|
62
66
|
def reserved_patterns
|
63
67
|
@reserved_patterns ||= {
|
64
68
|
tms: /@#{CucumberConfig.tms_prefix}(?<tms>\S+)/,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.13.
|
4
|
+
version: 2.13.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-25 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.13.
|
19
|
+
version: 2.13.4
|
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.13.
|
26
|
+
version: 2.13.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cucumber
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.1.2
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Allure cucumber ruby adaptor
|