startback 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 929e1ab2d7ab916eadc828ecf2d1695c14c9a43d117198457e03c70c8b479ba4
|
4
|
+
data.tar.gz: 2f3d212acd31e00b1910aca3c3c1154a5e8a130962aeb002c184c6a70da17ab2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90d448f505406727db9cd5c1db1d2fdb14b5df6ed546566ae9f3db4e573dbe43e43968f5885c9602c5ca198ceb8a7801aca769e499ef4d10acaaf2be318f779f
|
7
|
+
data.tar.gz: 01b21d439cc5b7d1c8ff218620b7eec13a8496919c941863df25d8d01f4d2c6d11b727a6c4269015ef61d1d8063ebe1487909c3b238c84c06c5211eccc568423
|
@@ -67,6 +67,8 @@ module Startback
|
|
67
67
|
log_msg.dup
|
68
68
|
elsif log_msg.is_a?(String)
|
69
69
|
log_msg = { op: "#{log_msg}#{method.nil? ? '' : '#'+method.to_s}" }
|
70
|
+
elsif log_msg.is_a?(Exception)
|
71
|
+
log_msg = { error: log_msg }
|
70
72
|
else
|
71
73
|
log_msg = log_msg.class unless log_msg.is_a?(Module)
|
72
74
|
log_msg = { op: "#{log_msg.name}##{method}" }
|
data/lib/startback/version.rb
CHANGED
@@ -135,6 +135,16 @@ module Startback
|
|
135
135
|
expect(logger).to be_a(::Logger)
|
136
136
|
end
|
137
137
|
|
138
|
+
it 'works fine with a Exception only' do
|
139
|
+
exception = StandardError.new('hello')
|
140
|
+
expected = {
|
141
|
+
error: exception
|
142
|
+
}
|
143
|
+
log_msg, logger = parse_args(exception)
|
144
|
+
expect(log_msg).to eql(expected)
|
145
|
+
expect(logger).to be_a(::Logger)
|
146
|
+
end
|
147
|
+
|
138
148
|
it 'works fine with a string and a context with logger' do
|
139
149
|
expected = {
|
140
150
|
op: "a message"
|
@@ -216,4 +226,4 @@ module Startback
|
|
216
226
|
|
217
227
|
end
|
218
228
|
end
|
219
|
-
end
|
229
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: startback
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Lambeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|