allure-rspec 0.6.7 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/allure-rspec.gemspec +1 -1
- data/lib/allure-rspec/formatter.rb +26 -3
- data/lib/allure-rspec/version.rb +1 -1
- data/spec/nometavalue_spec.rb +11 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f8f7bec6b49c04903d8562724627fd7fcdc02e2
|
4
|
+
data.tar.gz: e6206e6c334bacb9ca863cbfc893b52cd964edc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5150e93eecca7f35af59d145f7710607a38069a26282b1e8e25e9d9ff6106c9feb6ecfaa0225915ffcfe8160feb9907bcd1ce3991933ddd869a3b767800c553e
|
7
|
+
data.tar.gz: 9a5c4867d4f6d8afb64974740e19be21f5e9183f8b227779bf411e3e3063a9c7bf5c4bfff001b57aeea5db2dcb514b3cdbb0ceadf283379ceb05bcd50b8e80e1
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
allure-rspec (0.6.
|
5
|
-
allure-ruby-adaptor-api (= 0.6.
|
4
|
+
allure-rspec (0.6.8)
|
5
|
+
allure-ruby-adaptor-api (= 0.6.5)
|
6
6
|
rspec (~> 3.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
allure-ruby-adaptor-api (0.6.
|
11
|
+
allure-ruby-adaptor-api (0.6.5)
|
12
12
|
mimemagic
|
13
13
|
nokogiri (~> 1.6.0)
|
14
14
|
uuid
|
@@ -16,9 +16,9 @@ GEM
|
|
16
16
|
macaddr (1.7.1)
|
17
17
|
systemu (~> 2.6.2)
|
18
18
|
mimemagic (0.2.1)
|
19
|
-
mini_portile (0.6.
|
20
|
-
nokogiri (1.6.
|
21
|
-
mini_portile (
|
19
|
+
mini_portile (0.6.2)
|
20
|
+
nokogiri (1.6.5)
|
21
|
+
mini_portile (~> 0.6.0)
|
22
22
|
rake (10.3.2)
|
23
23
|
rspec (3.1.0)
|
24
24
|
rspec-core (~> 3.1.0)
|
data/allure-rspec.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.require_paths = ['lib']
|
20
20
|
|
21
21
|
s.add_dependency 'rspec', '~> 3.0'
|
22
|
-
s.add_dependency 'allure-ruby-adaptor-api', '0.6.
|
22
|
+
s.add_dependency 'allure-ruby-adaptor-api', '0.6.5'
|
23
23
|
|
24
24
|
s.add_development_dependency 'bundler'
|
25
25
|
s.add_development_dependency 'rake'
|
@@ -72,16 +72,39 @@ module AllureRSpec
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def metadata(example_or_group)
|
75
|
-
(example_or_group
|
75
|
+
group?(example_or_group) ?
|
76
76
|
example_or_group.group.metadata :
|
77
77
|
example_or_group.example.metadata
|
78
78
|
end
|
79
79
|
|
80
|
+
def group?(example_or_group)
|
81
|
+
(example_or_group.respond_to? :group)
|
82
|
+
end
|
83
|
+
|
80
84
|
def labels(example_or_group)
|
81
|
-
ALLOWED_LABELS.
|
82
|
-
map { |label| [label, metadata(example_or_group)[label]] }.
|
85
|
+
labels = ALLOWED_LABELS.map { |label| [label, metadata(example_or_group)[label]] }.
|
83
86
|
find_all { |value| !value[1].nil? }.
|
84
87
|
inject({}) { |res, value| res.merge(value[0] => value[1]) }
|
88
|
+
detect_feature_story(labels, example_or_group)
|
89
|
+
labels
|
90
|
+
end
|
91
|
+
|
92
|
+
def detect_feature_story(labels, example_or_group)
|
93
|
+
metadata = metadata(example_or_group)
|
94
|
+
is_group = group?(example_or_group)
|
95
|
+
parent = metadata[:parent_example_group] || metadata[:example_group]
|
96
|
+
if labels[:feature] === true
|
97
|
+
description = (!is_group && parent) ? parent[:description] : metadata[:description]
|
98
|
+
labels[:feature] = description
|
99
|
+
if labels[:story] === true
|
100
|
+
if parent
|
101
|
+
grandparent = parent && parent[:parent_example_group]
|
102
|
+
labels[:feature] = (!is_group && grandparent) ? grandparent[:description] : parent[:description]
|
103
|
+
end
|
104
|
+
labels[:story] = description
|
105
|
+
end
|
106
|
+
end
|
107
|
+
labels
|
85
108
|
end
|
86
109
|
|
87
110
|
end
|
data/lib/allure-rspec/version.rb
CHANGED
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: 0.6.
|
4
|
+
version: 0.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Sadykov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.6.
|
33
|
+
version: 0.6.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.6.
|
40
|
+
version: 0.6.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- logo.png
|
88
88
|
- spec/another_spec.rb
|
89
89
|
- spec/extend_steps_spec.rb
|
90
|
+
- spec/nometavalue_spec.rb
|
90
91
|
- spec/shared_example_spec.rb
|
91
92
|
- spec/spec_helper.rb
|
92
93
|
homepage: http://allure.qatools.ru
|
@@ -112,6 +113,6 @@ rubyforge_project:
|
|
112
113
|
rubygems_version: 2.0.3
|
113
114
|
signing_key:
|
114
115
|
specification_version: 4
|
115
|
-
summary: allure-rspec-0.6.
|
116
|
+
summary: allure-rspec-0.6.8
|
116
117
|
test_files: []
|
117
118
|
has_rdoc:
|