rollbar 0.8.3 → 0.9.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Change Log
2
2
 
3
+ **0.9.0**
4
+ - Behavior change: start configuration as `@enabled = false`, and set to true when `configure` is called. This addresses an issue using Rollbar without the environment initialized. Such reports would always fail (since there would be no access token), but now they won't be attempted.
5
+
3
6
  **0.8.3**
4
7
  - Relax multi_json dependency to 1.5.0
5
8
 
data/lib/rollbar.rb CHANGED
@@ -34,14 +34,20 @@ module Rollbar
34
34
  # config.access_token = 'abcdefg'
35
35
  # end
36
36
  def configure
37
+ configuration.enabled = true
37
38
  yield(configuration)
38
39
  end
39
40
 
40
41
  def reconfigure
41
42
  @configuration = Configuration.new
43
+ @configuration.enabled = true
42
44
  yield(configuration)
43
45
  end
44
46
 
47
+ def unconfigure
48
+ @configuration = nil
49
+ end
50
+
45
51
  # Returns the configuration object.
46
52
  #
47
53
  # @return [Rollbar::Configuration] The configuration object
@@ -31,7 +31,7 @@ module Rollbar
31
31
  def initialize
32
32
  @async_handler = nil
33
33
  @default_logger = lambda { Logger.new(STDERR) }
34
- @enabled = true
34
+ @enabled = false # set to true when configure is called
35
35
  @endpoint = DEFAULT_ENDPOINT
36
36
  @exception_level_filters = {
37
37
  'ActiveRecord::RecordNotFound' => 'warning',
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "0.8.3"
2
+ VERSION = "0.9.0"
3
3
  end
data/rollbar.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.require_paths = ["lib"]
15
15
  gem.version = Rollbar::VERSION
16
16
 
17
- gem.add_runtime_dependency 'multi_json', '>= 1.5.0'
17
+ gem.add_runtime_dependency 'multi_json', '~> 1.5'
18
18
 
19
19
  gem.add_development_dependency 'rails', '~> 3.2.12'
20
20
  gem.add_development_dependency 'devise', '>= 2.1.2'
data/spec/rollbar_spec.rb CHANGED
@@ -38,6 +38,13 @@ describe Rollbar do
38
38
  end
39
39
  end
40
40
 
41
+ it 'should not be enabled when not configured' do
42
+ Rollbar.unconfigure
43
+
44
+ Rollbar.configuration.enabled.should == false
45
+ Rollbar.report_exception(@exception).should == 'disabled'
46
+ end
47
+
41
48
  it 'should report exceptions with request and person data' do
42
49
  logger_mock.should_receive(:info).with('[Rollbar] Success')
43
50
  request_data = {
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.8.3
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,24 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-28 00:00:00.000000000 Z
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 1.5.0
21
+ version: '1.5'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
- - - ! '>='
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 1.5.0
29
+ version: '1.5'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rails
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -280,4 +280,3 @@ test_files:
280
280
  - spec/rollbar_spec.rb
281
281
  - spec/spec_helper.rb
282
282
  - spec/support/devise.rb
283
- has_rdoc: