reviewed_braai 0.2.2 → 0.2.3

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,15 +1,20 @@
1
1
  module ReviewedBraai
2
2
 
3
3
  module Notifications
4
+
4
5
  def self.notify error
5
6
  if error.opts[:airbrake] && defined?(Airbrake)
6
7
  Airbrake.notify(error, error.opts)
7
8
  end
8
9
  end
9
10
 
10
- def self.log error_message
11
- Rails.logger.warn(error_message) if defined?(Rails) && defined?(Rails.logger)
11
+ def self.log error
12
+ if defined?(Rails) && defined?(Rails.logger)
13
+ msg = "#{error.opts[:error_class]}: #{error.opts[:error_message]} key=#{error.opts[:key]}"
14
+ Rails.logger.warn(msg)
15
+ end
12
16
  end
17
+
13
18
  end
14
19
 
15
20
  class TagRenderError < StandardError
@@ -26,7 +31,7 @@ module ReviewedBraai
26
31
 
27
32
  @key = @opts[:key]
28
33
 
29
- Notifications.notify(self) || Notifications.log(@opts.to_s)
34
+ Notifications.notify(self) || Notifications.log(self)
30
35
 
31
36
  super(@opts[:error_message])
32
37
  end
@@ -1,3 +1,3 @@
1
1
  module ReviewedBraai
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reviewed_braai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
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 00:00:00.000000000 Z
12
+ date: 2013-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: braai
@@ -85,18 +85,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
- segments:
89
- - 0
90
- hash: -3173167499254061246
91
88
  required_rubygems_version: !ruby/object:Gem::Requirement
92
89
  none: false
93
90
  requirements:
94
91
  - - ! '>='
95
92
  - !ruby/object:Gem::Version
96
93
  version: '0'
97
- segments:
98
- - 0
99
- hash: -3173167499254061246
100
94
  requirements: []
101
95
  rubyforge_project:
102
96
  rubygems_version: 1.8.25