wait 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/loggers/base.rb +0 -4
- data/lib/rescuers/base.rb +6 -1
- data/lib/testers/base.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +1 -1
data/lib/loggers/base.rb
CHANGED
data/lib/rescuers/base.rb
CHANGED
@@ -15,9 +15,14 @@ class Wait
|
|
15
15
|
# We can omit the message if it's identical to the class name.
|
16
16
|
message = exception.message unless exception.message == klass
|
17
17
|
# Indent the exception so it stands apart from the rest of the messages.
|
18
|
-
backtrace =
|
18
|
+
backtrace = indent(exception.backtrace)
|
19
19
|
|
20
20
|
@logger.debug("Rescuer") { "rescued: #{klass}#{": #{message}" if message}\n#{backtrace}" }
|
21
21
|
end
|
22
|
+
|
23
|
+
# Indents text a given number of spaces.
|
24
|
+
def indent(lines, spaces = 25)
|
25
|
+
lines.map { |line| (" " * spaces) + line }.join("\n")
|
26
|
+
end
|
22
27
|
end # BaseRescuer
|
23
28
|
end # Wait
|
data/lib/testers/base.rb
CHANGED
data/lib/version.rb
CHANGED