chatterbox 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.8.4
4
+ - Log ignored exceptions
5
+
3
6
  ### 0.8.3
4
7
  - Include Chatterbox version at the bottom of exception notifications
5
8
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{chatterbox}
8
- s.version = "0.8.3"
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-07}
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
- configuration.ignore.include?(exception.class.to_s)
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
@@ -3,7 +3,7 @@ module Chatterbox # :nodoc:
3
3
  unless defined?(MAJOR)
4
4
  MAJOR = 0
5
5
  MINOR = 8
6
- TINY = 3
6
+ TINY = 4
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
9
9
 
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.3
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-07 00:00:00 -05:00
12
+ date: 2009-12-17 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency