res 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/res +3 -0
- data/lib/res/reporters/lion.rb +17 -10
- 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: 397c8eaa87c2580e7614f5cffbecb68002b49918
|
4
|
+
data.tar.gz: bf6cbb9371ce3a37f97ad4f312343024723bf602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2da6b94daacf555737a09118713510f2335095f2b5cad63f09e57149ee93939ffdcf70da43cb8b0d7cc11a80f11150d57723f31e396032907c4db04125891f3
|
7
|
+
data.tar.gz: 2e1d7b1350423779a1e8210483d65922747cc58bb249f5f7a6d9315b6503797d0e6206993b9f336a7685caa6d728be1ec22f1a94ecc819825b629cabe077ff40
|
data/bin/res
CHANGED
@@ -170,6 +170,9 @@ if options.reporter
|
|
170
170
|
reporter = Res::Reporters::Lion.new(
|
171
171
|
:config_file => options.config_file,
|
172
172
|
:url => options.url,
|
173
|
+
:cert => options.cert,
|
174
|
+
:cacert => options.cacert,
|
175
|
+
:ssl_verify_mode => options.ssl_verify_mode,
|
173
176
|
:ir => ir
|
174
177
|
)
|
175
178
|
|
data/lib/res/reporters/lion.rb
CHANGED
@@ -9,7 +9,7 @@ module Res
|
|
9
9
|
def initialize(args)
|
10
10
|
@url = args[:url]
|
11
11
|
@config = Res::Config.new([:url, :tag, :description, :app_name],
|
12
|
-
:optional => [:hive_job_id, :queue],
|
12
|
+
:optional => [:hive_job_id, :queue, :cert, :cacert, :ssl_verify_mode],
|
13
13
|
:pre_env => 'LION_')
|
14
14
|
config.process(args)
|
15
15
|
end
|
@@ -37,17 +37,24 @@ module Res
|
|
37
37
|
:status => status,
|
38
38
|
:perf_values => values.compact!
|
39
39
|
}
|
40
|
+
|
41
|
+
|
40
42
|
uri = URI.parse(config.url)
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
http.request(request)
|
43
|
+
@http = Net::HTTP.new(uri.host, uri.port)
|
44
|
+
if config.cert
|
45
|
+
pem = File.read(config.cert)
|
46
|
+
@http.use_ssl = true if uri.scheme == 'https'
|
47
|
+
@http.cert = OpenSSL::X509::Certificate.new(pem)
|
48
|
+
@http.key = OpenSSL::PKey::RSA.new(pem)
|
49
|
+
@http.ca_file = config.cacert if config.cacert
|
50
|
+
@http.verify_mode = config.ssl_verify_mode if config.ssl_verify_mode
|
50
51
|
end
|
52
|
+
|
53
|
+
request = Net::HTTP::Post.new(config.url + "/import")
|
54
|
+
request.content_type = 'application/json'
|
55
|
+
request.body = lion_data.to_json
|
56
|
+
|
57
|
+
@http.request(request)
|
51
58
|
end
|
52
59
|
|
53
60
|
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.5
|
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: 2016-
|
13
|
+
date: 2016-05-12 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.4.
|
131
|
+
rubygems_version: 2.4.5.1
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Test Result report libraries
|