res 1.2.16 → 1.2.17
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 -0
- data/bin/res +7 -2
- data/lib/res/reporters/testmine.rb +16 -11
- data/lib/res/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: e495d9220fa374e9c75cf6f694ada1608b8f2fbf
|
4
|
+
data.tar.gz: c6011b3ced7ae736c19486c0bd91d606dcf3252f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c1d96c99304680bc61fbb37185758459963743db25a4d90c43055245eeab8394d0f1adb1c55ba53638c02701e9f3883c68f54cc00d74144b4313ac72c515915
|
7
|
+
data.tar.gz: db38fc0d05955a148f63579a343345db7810ef0faad169951cc6b6ac1ef3d73dd537e0d0ca42fa7bdd3d70749e0d7e5d370dc94523d42efd256a38fa04dd4a8f
|
data/README.md
CHANGED
data/bin/res
CHANGED
@@ -149,13 +149,17 @@ if options.reporter
|
|
149
149
|
|
150
150
|
reporter = Res::Reporters::Testmine.new(
|
151
151
|
:config_file => options.config_file,
|
152
|
-
:
|
152
|
+
:url => options.url,
|
153
|
+
:cert => options.cert,
|
154
|
+
:cacert => options.cacert,
|
153
155
|
:target => options.target,
|
154
|
-
:
|
156
|
+
:ssl_verify_mode => options.ssl_verify_mode,
|
157
|
+
:ir => ir
|
155
158
|
)
|
156
159
|
|
157
160
|
id = reporter.submit_results(ir)
|
158
161
|
puts "Reported to testmine: #{id}"
|
162
|
+
|
159
163
|
when 'testrail'
|
160
164
|
reporter = Res::Reporters::TestRail.new(
|
161
165
|
:config_file => options.config_file,
|
@@ -166,6 +170,7 @@ if options.reporter
|
|
166
170
|
|
167
171
|
output = reporter.submit_results(ir)
|
168
172
|
puts output
|
173
|
+
|
169
174
|
when 'lion'
|
170
175
|
reporter = Res::Reporters::Lion.new(
|
171
176
|
:config_file => options.config_file,
|
@@ -8,8 +8,8 @@ module Res
|
|
8
8
|
|
9
9
|
def initialize(args)
|
10
10
|
@url = args[:url]
|
11
|
-
@config = Res::Config.new([:project, :component, :suite, :
|
12
|
-
:optional => [:hive_job_id],
|
11
|
+
@config = Res::Config.new([:project, :component, :suite, :url],
|
12
|
+
:optional => [:hive_job_id, :version, :target, :cert, :cacert, :ssl_verify_mode],
|
13
13
|
:pre_env => 'TESTMINE_')
|
14
14
|
config.process(args)
|
15
15
|
end
|
@@ -29,18 +29,23 @@ module Res
|
|
29
29
|
}
|
30
30
|
|
31
31
|
# Submit to testmine
|
32
|
+
|
32
33
|
uri = URI.parse(config.url)
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
http.
|
34
|
+
@http = Net::HTTP.new(uri.host, uri.port)
|
35
|
+
if config.cert
|
36
|
+
pem = File.read(config.cert)
|
37
|
+
@http.use_ssl = true if uri.scheme == 'https'
|
38
|
+
@http.cert = OpenSSL::X509::Certificate.new(pem)
|
39
|
+
@http.key = OpenSSL::PKey::RSA.new(pem)
|
40
|
+
@http.ca_file = config.cacert if config.cacert
|
41
|
+
@http.verify_mode = config.ssl_verify_mode if config.ssl_verify_mode
|
41
42
|
end
|
42
43
|
|
43
|
-
|
44
|
+
request = Net::HTTP::Post.new(config.url + "/api/v1/submit")
|
45
|
+
request.content_type = 'application/json'
|
46
|
+
request.set_form_data({"data" => ir.to_json})
|
47
|
+
@http.request(request)
|
48
|
+
|
44
49
|
end
|
45
50
|
|
46
51
|
end
|
data/lib/res/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: res
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-01-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.
|
131
|
+
rubygems_version: 2.5.1
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Test Result report libraries
|