rollbar 0.10.3 → 0.10.4

Sign up to get free protection for your applications and to get access to all the features.
data/Appraisals CHANGED
@@ -11,6 +11,6 @@ appraise "rails32" do
11
11
  end
12
12
 
13
13
  appraise "rails40" do
14
- gem "rails", "4.0.0.rc2"
14
+ gem "rails", "4.0.0"
15
15
  gem "protected_attributes"
16
16
  end
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ **0.10.4**
4
+ - Fix exception in the exception catcher when Rollbar is disabled
5
+
3
6
  **0.10.3**
4
7
  - Rework how request params are extracted so that json params are properly extracted in rails 4.0
5
8
  - Fix rollbar:test rake task
@@ -4,7 +4,7 @@
4
4
 
5
5
  Add this line to your application's Gemfile:
6
6
 
7
- gem 'rollbar', '~> 0.8.2'
7
+ gem 'rollbar', '~> 0.10.3'
8
8
 
9
9
  And remove:
10
10
 
@@ -7,7 +7,7 @@ gem "jruby-openssl", :platform=>:jruby
7
7
  gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
8
8
  gem "girl_friday"
9
9
  gem "appraisal"
10
- gem "rails", "4.0.0.rc2"
10
+ gem "rails", "4.0.0"
11
11
  gem "protected_attributes"
12
12
 
13
13
  gemspec :path=>"../"
@@ -22,12 +22,13 @@ module BetterErrors
22
22
 
23
23
  # if an exception was reported, save uuid in the env
24
24
  # so it can be displayed to the user on the error page
25
- if exception_data
26
- begin
27
- env['rollbar.exception_uuid'] = exception_data[:uuid]
28
- rescue => e
29
- puts "[Rollbar] Exception saving uuid in env: #{e}"
30
- end
25
+ if exception_data.is_a?(Hash)
26
+ env['rollbar.exception_uuid'] = exception_data[:uuid]
27
+ puts "[Rollbar] Exception uuid saved in env: #{exception_data[:uuid]}"
28
+ elsif exception_data == 'disabled'
29
+ puts "[Rollbar] Exception not reported because Rollbar is disabled"
30
+ elsif exception_data == 'ignored'
31
+ puts "[Rollbar] Exception not reported because it was ignored"
31
32
  end
32
33
 
33
34
  # now continue as normal
@@ -7,8 +7,15 @@ module Rollbar
7
7
  request_data = extract_request_data_from_rack(env)
8
8
  person_data = extract_person_data_from_controller(env)
9
9
  exception_data = Rollbar.report_exception(exception, request_data, person_data)
10
- env['rollbar.exception_uuid'] = exception_data[:uuid]
11
- rollbar_debug "[Rollbar] Exception uuid saved in env: #{exception_data[:uuid]}"
10
+
11
+ if exception_data.is_a?(Hash)
12
+ env['rollbar.exception_uuid'] = exception_data[:uuid]
13
+ rollbar_debug "[Rollbar] Exception uuid saved in env: #{exception_data[:uuid]}"
14
+ elsif exception_data == 'disabled'
15
+ rollbar_debug "[Rollbar] Exception not reported because Rollbar is disabled"
16
+ elsif exception_data == 'ignored'
17
+ rollbar_debug "[Rollbar] Exception not reported because it was ignored"
18
+ end
12
19
  rescue => e
13
20
  rollbar_debug "[Rollbar] Exception while reporting exception to Rollbar: #{e.try(:message)}"
14
21
  end
@@ -18,12 +18,13 @@ module Goalie
18
18
 
19
19
  # if an exception was reported, save uuid in the env
20
20
  # so it can be displayed to the user on the error page
21
- if exception_data
22
- begin
23
- env['rollbar.exception_uuid'] = exception_data[:uuid]
24
- rescue => e
25
- puts "[Rollbar] Exception saving uuid in env: #{e}"
26
- end
21
+ if exception_data.is_a?(Hash)
22
+ env['rollbar.exception_uuid'] = exception_data[:uuid]
23
+ puts "[Rollbar] Exception uuid saved in env: #{exception_data[:uuid]}"
24
+ elsif exception_data == 'disabled'
25
+ puts "[Rollbar] Exception not reported because Rollbar is disabled"
26
+ elsif exception_data == 'ignored'
27
+ puts "[Rollbar] Exception not reported because it was ignored"
27
28
  end
28
29
 
29
30
  # now continue as normal
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "0.10.3"
2
+ VERSION = "0.10.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.3
4
+ version: 0.10.4
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-06-25 00:00:00.000000000 Z
12
+ date: 2013-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json