mrhenry-failtale-reporter 0.0.4 → 0.0.5
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.
- data/lib/failtale_reporter/adapters/rails.rb +6 -4
- metadata +1 -1
|
@@ -13,7 +13,7 @@ module FailtaleReporter
|
|
|
13
13
|
IGNORED_EXCEPTIONS.freeze
|
|
14
14
|
|
|
15
15
|
def self.included(target)
|
|
16
|
-
target.send :alias_method_chain, :rescue_action_in_public, :
|
|
16
|
+
target.send :alias_method_chain, :rescue_action_in_public, :failtale
|
|
17
17
|
|
|
18
18
|
FailtaleReporter.configure do |config|
|
|
19
19
|
config.ignored_exceptions IGNORED_EXCEPTIONS
|
|
@@ -21,15 +21,17 @@ module FailtaleReporter
|
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
-
def
|
|
24
|
+
def rescue_action_in_public_with_failtale(exception)
|
|
25
25
|
FailtaleReporter.report(exception) unless is_private?
|
|
26
|
-
|
|
26
|
+
rescue_action_in_public_without_failtale(exception)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
protected
|
|
30
30
|
|
|
31
31
|
def is_private? #nodoc:
|
|
32
|
-
defined?(RAILS_ENV)
|
|
32
|
+
if defined?(RAILS_ENV)
|
|
33
|
+
['development', 'test'].include?(RAILS_ENV)
|
|
34
|
+
end
|
|
33
35
|
end
|
|
34
36
|
|
|
35
37
|
end
|