rollbar 1.2.5 → 1.2.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76e11bf57c6ee70f276c3434d3e28c529db808cb
4
- data.tar.gz: 676d76874780fc5656d1648c7ae156592308d50d
3
+ metadata.gz: 351948d24ee5ac0337e6634714c7ea4d7e249ba8
4
+ data.tar.gz: 955b414770c864582161de98a11b1058f6e64e60
5
5
  SHA512:
6
- metadata.gz: 049de0ce6da8c17708748cde99eb4c183caa8614eff619400ea019be2b1531edfd34a50fdb842f67063d71cd12c05c4e5b2b9ce8db5ad93d53726cc0d8758b79
7
- data.tar.gz: 85d20e995d647bef3ec5eb4996de93147c7562a33ed03874f3e60ed5157c1d297f8ab82d8597e30bae6a8733cdd7b02beb900e2b2ade04d99df52b1b7f52f829
6
+ metadata.gz: 2363a7f139ec3b1dec85d257991b2bbc3723a7e57b4685aa348e6f374ce0611741cdb84caab134dbb46a65980d50d3a9fd9b8714a2e073780d12e3ce9ae6bc6c
7
+ data.tar.gz: 4f239f26138c594cb162d5b185f3210dcaf07ee0fa6a3f1159bf1bd46290a6fef9e049df144a7c70ceac1e4e39e107a497330c613072998fb7848fd92e9bef43
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ **1.2.6**
4
+ - Fix bug in non-Rails environments. See [#155](https://github.com/rollbar/rollbar-gem/pull/155)
5
+ - Fix intermittent test failures
6
+
3
7
  **1.2.5**
4
8
  - Fix issues handling hashes, arrays, and other values as the raw POST body. See [#153](https://github.com/rollbar/rollbar-gem/pull/153)
5
9
 
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rollbar notifier for Ruby [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v1.2.5)](https://travis-ci.org/rollbar/rollbar-gem/branches)
1
+ # Rollbar notifier for Ruby [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=v1.2.6)](https://travis-ci.org/rollbar/rollbar-gem/branches)
2
2
 
3
3
  <!-- RemoveNext -->
4
4
  Ruby gem for reporting exceptions, errors, and log messages to [Rollbar](https://rollbar.com).
@@ -9,7 +9,7 @@ Ruby gem for reporting exceptions, errors, and log messages to [Rollbar](https:/
9
9
 
10
10
  Add this line to your application's Gemfile:
11
11
 
12
- gem 'rollbar', '~> 1.2.5'
12
+ gem 'rollbar', '~> 1.2.6'
13
13
 
14
14
  And then execute:
15
15
 
data/lib/rollbar.rb CHANGED
@@ -3,6 +3,7 @@ require 'socket'
3
3
  require 'thread'
4
4
  require 'uri'
5
5
  require 'multi_json'
6
+ require 'forwardable'
6
7
 
7
8
  begin
8
9
  require 'securerandom'
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "1.2.5"
2
+ VERSION = "1.2.6"
3
3
  end
@@ -5,14 +5,7 @@ describe HomeController do
5
5
 
6
6
  before(:each) do
7
7
  reset_configuration
8
- Rollbar.configure do |config|
9
- config.access_token = 'bfec94a1ede64984b862880224edd0ed'
10
- config.environment = ::Rails.env
11
- config.root = ::Rails.root
12
- config.framework = "Rails: #{::Rails::VERSION::STRING}"
13
- config.logger = logger_mock
14
- config.request_timeout = 60
15
- end
8
+ reconfigure_notifier
16
9
  end
17
10
 
18
11
  context "with broken request" do
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'delayed_job'
3
3
  require 'rollbar/delayed_job'
4
4
 
5
- describe Rollbar::Delayed do
5
+ describe Rollbar::Delayed, :reconfigure_notifier => true do
6
6
  class FailingJob
7
7
  class TestException < Exception; end
8
8
 
@@ -5,7 +5,7 @@ require 'rack/mock'
5
5
  require 'rollbar/middleware/rack/builder'
6
6
 
7
7
 
8
- describe Rollbar::Middleware::Rack::Builder do
8
+ describe Rollbar::Middleware::Rack::Builder, :reconfigure_notifier => true do
9
9
  class RackMockError < Exception; end
10
10
 
11
11
  let(:action) do
@@ -21,7 +21,7 @@ class SinatraDummy < Sinatra::Base
21
21
  end
22
22
  end
23
23
 
24
- describe Rollbar::Middleware::Sinatra do
24
+ describe Rollbar::Middleware::Sinatra, :reconfigure_notifier => true do
25
25
  include Rack::Test::Methods
26
26
 
27
27
  def app
@@ -372,17 +372,6 @@ describe Rollbar do
372
372
 
373
373
  # configure with some basic params
374
374
  def configure
375
- Rollbar.reconfigure do |config|
376
- # special test access token
377
- config.access_token = test_access_token
378
- config.logger = ::Rails.logger
379
- config.root = ::Rails.root
380
- config.framework = "Rails: #{::Rails::VERSION::STRING}"
381
- config.request_timeout = 60
382
- end
383
- end
384
-
385
- def test_access_token
386
- 'aaaabbbbccccddddeeeeffff00001111'
375
+ reconfigure_notifier
387
376
  end
388
377
  end
data/spec/rollbar_spec.rb CHANGED
@@ -1415,7 +1415,7 @@ describe Rollbar do
1415
1415
  end
1416
1416
  end
1417
1417
 
1418
- context "report_internal_error" do
1418
+ context 'report_internal_error', :reconfigure_notifier => true do
1419
1419
  it "should not crash when given an exception object" do
1420
1420
  begin
1421
1421
  1 / 0
@@ -1522,18 +1522,6 @@ describe Rollbar do
1522
1522
 
1523
1523
  # configure with some basic params
1524
1524
  def configure
1525
- Rollbar.reconfigure do |config|
1526
- # special test access token
1527
- config.access_token = test_access_token
1528
- config.logger = ::Rails.logger
1529
- config.root = ::Rails.root
1530
- config.framework = "Rails: #{::Rails::VERSION::STRING}"
1531
- config.request_timeout = 60
1532
- end
1533
- end
1534
-
1535
- def test_access_token
1536
- 'aaaabbbbccccddddeeeeffff00001111'
1525
+ reconfigure_notifier
1537
1526
  end
1538
-
1539
1527
  end
data/spec/spec_helper.rb CHANGED
@@ -15,6 +15,8 @@ Rake::Task['dummy:db:setup'].invoke
15
15
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
16
16
 
17
17
  RSpec.configure do |config|
18
+ config.include(NotifierHelpers)
19
+
18
20
  config.color_enabled = true
19
21
  config.formatter = 'documentation'
20
22
 
@@ -37,11 +39,6 @@ RSpec.configure do |config|
37
39
  config.backtrace_exclusion_patterns = [/gems\/rspec-.*/]
38
40
  end
39
41
 
40
- def reset_configuration
41
- Rollbar.reconfigure do |config|
42
- end
43
- end
44
-
45
42
  def local?
46
43
  ENV['LOCAL'] == '1'
47
44
  end
@@ -0,0 +1,21 @@
1
+ module NotifierHelpers
2
+ def reconfigure_notifier
3
+ Rollbar.reconfigure do |config|
4
+ # special test access token
5
+ config.access_token = test_access_token
6
+ config.logger = ::Rails.logger
7
+ config.root = ::Rails.root
8
+ config.framework = "Rails: #{::Rails::VERSION::STRING}"
9
+ config.request_timeout = 60
10
+ end
11
+ end
12
+
13
+ def test_access_token
14
+ 'bfec94a1ede64984b862880224edd0ed'
15
+ end
16
+
17
+ def reset_configuration
18
+ Rollbar.reconfigure do |config|
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,3 @@
1
+ shared_context 'reconfigure notifier', :reconfigure_notifier => true do
2
+ before { reconfigure_notifier }
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rollbar, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-27 00:00:00.000000000 Z
11
+ date: 2014-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -289,6 +289,8 @@ files:
289
289
  - spec/rollbar_spec.rb
290
290
  - spec/spec_helper.rb
291
291
  - spec/support/cause_exception.rb
292
+ - spec/support/notifier_helpers.rb
293
+ - spec/support/shared_contexts.rb
292
294
  homepage: https://github.com/rollbar/rollbar-gem
293
295
  licenses:
294
296
  - MIT
@@ -381,3 +383,5 @@ test_files:
381
383
  - spec/rollbar_spec.rb
382
384
  - spec/spec_helper.rb
383
385
  - spec/support/cause_exception.rb
386
+ - spec/support/notifier_helpers.rb
387
+ - spec/support/shared_contexts.rb