allure-ruby-adaptor-api 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/allure-ruby-adaptor-api/builder.rb +5 -5
- data/lib/allure-ruby-adaptor-api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2c2d2367368419e310c2e53e236c83e50292d6b
|
4
|
+
data.tar.gz: 77795aee7f3a942606188cf7ea7502c50808f00e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 994ee58454756da1ddc4a6d32496c4c73f8209d745206730e5c2d55af787aca564fa15646d2ba05cc82a7276b54acf13c5149ec763d0792feae42fd902c04bdb
|
7
|
+
data.tar.gz: e9be07b4ef0f72f65627016c7938aa2cee01cc58681006be1249b014649840ce1a6922fad7e09db3c15e3e93542bf491881f328a601e1422b28bbc004a50848c
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ your current directory.
|
|
33
33
|
builder.add_attachment "some_suite", "some_test", :file => Tempfile.new("somefile")
|
34
34
|
builder.stop_step "some_suite", "some_test", "first step"
|
35
35
|
builder.start_step "some_suite", "some_test", "second step"
|
36
|
-
builder.add_attachment "some_suite", "some_test", :
|
36
|
+
builder.add_attachment "some_suite", "some_test", :step_id => "second step", :file => Tempfile.new("somefile")
|
37
37
|
builder.stop_step "some_suite", "some_test", "second step"
|
38
38
|
builder.start_step "some_suite", "some_test", "third step"
|
39
39
|
builder.stop_step "some_suite", "some_test", "third step", :failed
|
@@ -73,12 +73,12 @@ module AllureRubyAdaptorApi
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
def add_attachment(suite, test, opts = {:
|
76
|
+
def add_attachment(suite, test, opts = {:step_id => nil, :file => nil, :mime_type => nil})
|
77
77
|
raise "File cannot be nil!" if opts[:file].nil?
|
78
|
-
|
78
|
+
step_id = opts[:step_id]
|
79
79
|
file = opts[:file]
|
80
80
|
title = opts[:title] || File.basename(file)
|
81
|
-
LOGGER.debug "Adding attachment #{opts[:title]} to #{suite}.#{test}#{
|
81
|
+
LOGGER.debug "Adding attachment #{opts[:title]} to #{suite}.#{test}#{step_id.nil? ? "" : ".#{step_id}"}"
|
82
82
|
dir = Pathname.new(Dir.pwd).join(config.output_dir)
|
83
83
|
FileUtils.mkdir_p(dir)
|
84
84
|
file_extname = File.extname(file.path.downcase)
|
@@ -94,10 +94,10 @@ module AllureRubyAdaptorApi
|
|
94
94
|
:target => attachment.basename,
|
95
95
|
:size => File.stat(attachment).size
|
96
96
|
}
|
97
|
-
if
|
97
|
+
if step_id.nil?
|
98
98
|
self.suites[suite][:tests][test][:attachments] << attach
|
99
99
|
else
|
100
|
-
self.suites[suite][:tests][test][:steps][
|
100
|
+
self.suites[suite][:tests][test][:steps][step_id][:attachments] << attach
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-ruby-adaptor-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Sadykov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -123,5 +123,5 @@ rubyforge_project:
|
|
123
123
|
rubygems_version: 2.4.8
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
|
-
summary: allure-ruby-adaptor-api-0.7.
|
126
|
+
summary: allure-ruby-adaptor-api-0.7.2
|
127
127
|
test_files: []
|