failtale-reporter 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,12 +19,12 @@ module FailtaleReporter::Adapters::Rails
19
19
  IGNORED_EXCEPTIONS.freeze
20
20
 
21
21
  def self.included(target)
22
- target.send :alias_method_chain, :rescue_action_in_public, :failtale
22
+ target.send :alias_method_chain, :rescue_action, :failtale
23
23
 
24
24
  FailtaleReporter.configure do |config|
25
25
  config.ignored_exceptions IGNORED_EXCEPTIONS
26
26
  config.default_reporter "rails"
27
- config.application_root RAILS_ROOT
27
+ config.application_root Rails.root
28
28
  config.information_collector do |error, controller|
29
29
  env = error.environment
30
30
  env = env.merge(controller.request.env)
@@ -36,16 +36,15 @@ module FailtaleReporter::Adapters::Rails
36
36
  end
37
37
  end
38
38
 
39
- def rescue_action_in_public_with_failtale(exception)
39
+ def rescue_action_with_failtale(exception)
40
40
  FailtaleReporter.report(exception, self) unless is_private?
41
- rescue_action_in_public_without_failtale(exception)
41
+ rescue_action_without_failtale(exception)
42
42
  end
43
43
 
44
44
  protected
45
45
 
46
46
  def is_private?
47
- FailtaleReporter.force_public or (
48
- defined?(Rails) and ['development', 'test'].include?(Rails.env))
47
+ !FailtaleReporter.force_public and %w(development test).include?(Rails.env)
49
48
  end
50
49
 
51
50
  end
@@ -1,3 +1,3 @@
1
1
  module FailtaleReporter
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Simon Menke