chatterbox 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.markdown
CHANGED
data/chatterbox.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{chatterbox}
|
8
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Rob Sanheim"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-17}
|
13
13
|
s.description = %q{Send notifications and messages. However you want.}
|
14
14
|
s.email = %q{rsanheim@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -27,6 +27,18 @@ describe Chatterbox::ExceptionNotification do
|
|
27
27
|
Chatterbox::ExceptionNotification.handle(:exception => RuntimeError.new).should be_nil
|
28
28
|
end
|
29
29
|
|
30
|
+
it "logs the ignore" do
|
31
|
+
Chatterbox::ExceptionNotification.configure { |c| c.ignore << RuntimeError }
|
32
|
+
Chatterbox.logger.expects(:debug).once
|
33
|
+
Chatterbox::ExceptionNotification.handle(RuntimeError.new)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "when not on ignore list" do
|
38
|
+
it "logs nothing" do
|
39
|
+
Chatterbox.logger.expects(:debug).never
|
40
|
+
Chatterbox::ExceptionNotification.handle(:exception => Exception.new)
|
41
|
+
end
|
30
42
|
end
|
31
43
|
end
|
32
44
|
|
@@ -27,8 +27,14 @@ module Chatterbox
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def on_ignore_list?(exception)
|
30
|
-
configuration.ignore.include?(exception.class) ||
|
31
|
-
|
30
|
+
ignored = configuration.ignore.include?(exception.class) ||
|
31
|
+
configuration.ignore.include?(exception.class.to_s)
|
32
|
+
log_ignored_exception(exception) if ignored
|
33
|
+
ignored
|
34
|
+
end
|
35
|
+
|
36
|
+
def log_ignored_exception(exception)
|
37
|
+
Chatterbox.logger.debug { %[Chatterbox::ExceptionNotification ignoring exception: "#{exception}" as its on the ignore list] }
|
32
38
|
end
|
33
39
|
|
34
40
|
def configuration
|
data/lib/chatterbox/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chatterbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Sanheim
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-17 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|