trouble 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/trouble/version.rb +1 -1
- data/lib/trouble.rb +1 -5
- data/spec/lib/trouble_spec.rb +2 -2
- metadata +5 -4
data/README.md
CHANGED
data/lib/trouble/version.rb
CHANGED
data/lib/trouble.rb
CHANGED
@@ -33,11 +33,7 @@ module Trouble
|
|
33
33
|
# Internal: Log to the current Logger.
|
34
34
|
#
|
35
35
|
def self.log(exception, metadata)
|
36
|
-
|
37
|
-
rows << " | Exception: #{exception.inspect}"
|
38
|
-
rows << " | Metadata: #{metadata.inspect}"
|
39
|
-
rows << " \\ Location: #{exception.backtrace.first}\n"
|
40
|
-
config.logger.error rows.join("\n")
|
36
|
+
config.logger.error "TROUBLE NOTIFICATION #{exception.inspect} at #{exception.backtrace.first} with metadata #{metadata.inspect}"
|
41
37
|
end
|
42
38
|
|
43
39
|
end
|
data/spec/lib/trouble_spec.rb
CHANGED
@@ -21,7 +21,7 @@ describe Trouble do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'logs the output' do
|
24
|
-
trouble.config.logger
|
24
|
+
trouble.config.logger.should_receive(:error) do |string|
|
25
25
|
string.should include('TROUBLE')
|
26
26
|
string.should include('TroubleTestException')
|
27
27
|
string.should include('big problems')
|
@@ -47,7 +47,7 @@ describe Trouble do
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
describe '.
|
50
|
+
describe '.config' do
|
51
51
|
before do
|
52
52
|
Trouble.reset!
|
53
53
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trouble
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -59,8 +59,9 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
-
description:
|
63
|
-
|
62
|
+
description: A generic abstraction layer for reporting errors and Exceptions. This
|
63
|
+
gem achieves independence of things like Bugsnag, Airbrake, etc.. If any of those
|
64
|
+
is defined, Trouble will pass on the exception to them.
|
64
65
|
email:
|
65
66
|
executables: []
|
66
67
|
extensions: []
|