gurke 2.0.3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gurke/reporters/default_reporter.rb +25 -4
- data/lib/gurke/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c12df541b21f5f76f5956d731764ec23b85e4ac
|
4
|
+
data.tar.gz: 8397ac6205619fc8667afc0f0694beb0ce395a99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e54e0281307bf79d2bea76bf7c0a9b3d84f677669810be1fc0e65a6a6c537700a2869a4969d0ab19fc6e34c5d3c3d3368a97f25136948884bc26a5f5a2aab8d7
|
7
|
+
data.tar.gz: 490ad37a6ad2a9f3d15db99ec35eabf2694fd82ab5256578d4d1351d63ff9d6241e626dafead371309512b8633f080fdae5edf66604a108399488b846b1c84e6
|
@@ -85,11 +85,32 @@ module Gurke::Reporters
|
|
85
85
|
def print_failed(step)
|
86
86
|
print_braces red('failure')
|
87
87
|
io.puts
|
88
|
-
msg = step.exception.message.split("\n").join("\n ")
|
89
88
|
|
90
|
-
|
91
|
-
io.puts red(" #{
|
92
|
-
|
89
|
+
exout = format_exception(step.exception)
|
90
|
+
io.puts exout.map{|s| red(" #{s}\n") }.join
|
91
|
+
end
|
92
|
+
|
93
|
+
def format_exception(ex)
|
94
|
+
s = [ex.message.strip]
|
95
|
+
if ex.backtrace.nil?
|
96
|
+
s << ' <no backtrace available>'
|
97
|
+
elsif ex.backtrace.empty?
|
98
|
+
s << ' <backtrace empty>'
|
99
|
+
else
|
100
|
+
ex.backtrace.each do |bt|
|
101
|
+
s << ' ' + bt.strip
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
if ex.respond_to?(:cause) && ex.cause &&
|
106
|
+
ex.cause.respond_to?(:message) && ex.cause.respond_to?(:backtrace)
|
107
|
+
|
108
|
+
cause = format_exception(ex.cause)
|
109
|
+
s << 'caused by: ' + cause.shift
|
110
|
+
s += cause
|
111
|
+
end
|
112
|
+
|
113
|
+
s
|
93
114
|
end
|
94
115
|
|
95
116
|
[:black, :red, :green, :yellow, :blue,
|
data/lib/gurke/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gurke
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Graichen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trollop
|