blinka-reporter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blinka_client.rb +7 -1
- data/lib/minitest/blinka_plugin.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56e193271a3f7ffc8d089ac8e4484edb68e7a8783a1b138ceee55ba667b720e2
|
4
|
+
data.tar.gz: 70dfd466a32dba39ea0d0d28713ed979d56cdbc2cc5451cf35b54464c3ecf42e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1bd80ac40f5d2b68a6a72ff166d490835c4c58996d2019d4309cc0806ca19c7588f26f0930c8dbf25f099f7c195c06f191eb2852c4f025e266896356c9c049
|
7
|
+
data.tar.gz: 55abf722700a5a475d1e24fd93a7885c57a6b6272cc383c975b33e7707ae4df415f6560e3a00d9387da7d1dcd60830ec6589b4fee6439e713477e344b1aef501
|
data/lib/blinka_client.rb
CHANGED
@@ -40,7 +40,7 @@ class BlinkaClient
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def report(filepath: './blinka_results.json')
|
43
|
-
unless File.
|
43
|
+
unless File.exist?(filepath)
|
44
44
|
raise(
|
45
45
|
BlinkaError,
|
46
46
|
'Could not find blinka_results.json, did tests run with environment variable BLINKA_JSON=true set?'
|
@@ -94,6 +94,12 @@ class BlinkaClient
|
|
94
94
|
else
|
95
95
|
raise(BlinkaError, "Could not report, got response code #{response.code}")
|
96
96
|
end
|
97
|
+
rescue => error
|
98
|
+
raise(BlinkaError, <<-EOS)
|
99
|
+
BLINKA:
|
100
|
+
Failed to create report because of #{error.class} with message:
|
101
|
+
#{error.message}
|
102
|
+
EOS
|
97
103
|
end
|
98
104
|
|
99
105
|
def self.upload_image(filepath:)
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'minitest'
|
2
2
|
require 'json'
|
3
3
|
require 'blinka_minitest'
|
4
|
+
require 'blinka_client'
|
4
5
|
|
5
6
|
module Minitest
|
6
7
|
def self.plugin_blinka_init(options)
|
@@ -25,9 +26,12 @@ module Minitest
|
|
25
26
|
end
|
26
27
|
|
27
28
|
def report
|
28
|
-
tap_report
|
29
|
-
json_report
|
30
|
-
|
29
|
+
tap_report if ENV['BLINKA_TAP']
|
30
|
+
json_report if ENV['BLINKA_JSON'] || ENV['BLINKA_REPORT']
|
31
|
+
BlinkaClient.new.report if ENV['BLINKA_REPORT']
|
32
|
+
rescue BlinkaClient::BlinkaError => error
|
33
|
+
puts(error)
|
34
|
+
ensure
|
31
35
|
super
|
32
36
|
end
|
33
37
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blinka-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Wessman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|