rollbar 2.8.0 → 2.8.1

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: 02b1f207b7667f4649a6c2805f73d8df71ba24ec
4
- data.tar.gz: fe08097d60766f76e75baa4ebe133dc36d49fc3b
3
+ metadata.gz: f919b4aa0a21d8051cb1c7bb0dd0e016e262ab49
4
+ data.tar.gz: 0ba1643f05092333d1b6c8d4999f05c2145408b7
5
5
  SHA512:
6
- metadata.gz: 028215d0b1b0bbafc92b75b078618833a5e2c263c50333834d3c32c934fae9e97e412e9272dd3a4aaaf9b862c128f9857633e7d26e6d76714e9e7f6c4f919da4
7
- data.tar.gz: 44b5505e3ac14dcaabce4b5ec2db7226c392e2991f1ea6e30500fb66c5feffdc60c5d439a262259747f0e59ef68ed865002369c46220eb9bf5d55904bd472919
6
+ metadata.gz: 3b88701401c5146985d081d7a8064e7bd73550a5d1419a47cdff8d41af0d619fb5ef202ca24014f098d83901554cb287734ee1d08fe9f5169cb5184916460e54
7
+ data.tar.gz: 5bdd0ca265bb6a1f68aa9d8c0d4738a2f1529e5232d6d6ffccaf7c83b9ea780700d65cfdbe4ef5687f91b4620fb538d0b2967ccaae528163c08c143579e2f36f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.8.1
4
+
5
+ New features:
6
+
7
+ - Fix support for SuckerPunch v2. See [#393](https://github.com/rollbar/rollbar-gem/pull/393)
8
+
3
9
  ## 2.8.0
4
10
 
5
11
  New features:
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=v2.8.0)](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=v2.8.1)](https://travis-ci.org/rollbar/rollbar-gem/branches)
2
2
 
3
3
  <!-- RemoveNext -->
4
4
  [Rollbar](https://rollbar.com) is an error tracking service for Ruby and other languages. The Rollbar service will alert you of problems with your code and help you understand them in a ways never possible before. We love it and we hope you will too.
@@ -12,7 +12,7 @@ This is the Ruby library for Rollbar. It will instrument many kinds of Ruby appl
12
12
  Add this line to your application's Gemfile:
13
13
 
14
14
  ```ruby
15
- gem 'rollbar', '~> 2.8.0'
15
+ gem 'rollbar', '~> 2.8.1'
16
16
  ```
17
17
 
18
18
  And then execute:
@@ -434,8 +434,8 @@ If you'd like to customize this list, modify the example code in ```config/initi
434
434
 
435
435
  ```ruby
436
436
  config.exception_level_filters.merge!({
437
- 'ActiveRecord::RecordNotFound': 'ignore'
438
- 'NoMethodError': 'critical'
437
+ 'ActiveRecord::RecordNotFound' => 'ignore',
438
+ 'NoMethodError' => 'critical'
439
439
  })
440
440
  ```
441
441
 
@@ -467,7 +467,7 @@ Rollbar.configure do |config|
467
467
  end
468
468
  ```
469
469
 
470
- ## [Transform hook](#transform-hook]
470
+ ## [Transform hook](#transform-hook)
471
471
 
472
472
  After the payload is built but before it it sent to our API, the gem will call the handlers defined in `configuration.transform`. This handlers should be `Proc` objects or objects responding to `#call` method. The received argument is a `Hash` object with these keys:
473
473
 
@@ -832,8 +832,8 @@ Some users have reported problems with Zeus when ```rake``` was not explicitly i
832
832
 
833
833
  ## Configuration options
834
834
 
835
- For a listing of all configuration options available see
836
- [configuration options](https://www.rollbar.com/docs/notifier/rollbar-gem/configuration).
835
+ For a listing of all configuration options available, see
836
+ [configuration](https://rollbar.com/docs/notifier/rollbar-gem/configuration).
837
837
 
838
838
  ## Backwards Compatibility
839
839
 
File without changes
data/lib/rollbar.rb CHANGED
@@ -17,7 +17,7 @@ require 'rollbar/encoding'
17
17
  require 'rollbar/logger_proxy'
18
18
  require 'rollbar/exception_reporter'
19
19
  require 'rollbar/util'
20
- require 'rollbar/railtie' if defined?(Rails::VERSION)
20
+ require 'rollbar/railtie' if defined?(Rails::VERSION) && Rails::VERSION::MAJOR >= 3
21
21
  require 'rollbar/delay/girl_friday' if defined?(GirlFriday)
22
22
  require 'rollbar/delay/thread'
23
23
  require 'rollbar/truncation'
@@ -872,7 +872,11 @@ module Rollbar
872
872
  return if configuration.disable_monkey_patch
873
873
  wrap_delayed_worker
874
874
 
875
- require 'rollbar/active_record_extension' if defined?(ActiveRecord)
875
+ if defined?(ActiveRecord)
876
+ require 'active_record/version'
877
+ require 'rollbar/active_record_extension' if ActiveRecord::VERSION::MAJOR >= 3
878
+ end
879
+
876
880
  require 'rollbar/sidekiq' if defined?(Sidekiq)
877
881
  require 'rollbar/active_job' if defined?(ActiveJob)
878
882
  require 'rollbar/goalie' if defined?(Goalie)
@@ -1,4 +1,5 @@
1
1
  require 'sucker_punch'
2
+ require 'sucker_punch/version'
2
3
 
3
4
  module Rollbar
4
5
  module Delay
@@ -6,8 +7,29 @@ module Rollbar
6
7
 
7
8
  include ::SuckerPunch::Job
8
9
 
10
+ class << self
11
+ attr_accessor :perform_proc
12
+ attr_accessor :ready
13
+ end
14
+
15
+ self.ready = false
16
+
17
+ def self.setup
18
+ major_version = ::SuckerPunch::VERSION.split.first.to_i
19
+
20
+ if major_version > 1
21
+ self.perform_proc = proc { |payload| perform_async(payload) }
22
+ else
23
+ self.perform_proc = proc { |payload| new.async.perform(payload) }
24
+ end
25
+
26
+ self.ready = true
27
+ end
28
+
9
29
  def self.call(payload)
10
- new.async.perform payload
30
+ setup unless ready
31
+
32
+ perform_proc.call(payload)
11
33
  end
12
34
 
13
35
  def perform(*args)
@@ -1,3 +1,3 @@
1
1
  module Rollbar
2
- VERSION = "2.8.0"
2
+ VERSION = "2.8.1"
3
3
  end
data/rollbar.gemspec CHANGED
@@ -23,7 +23,13 @@ Gem::Specification.new do |gem|
23
23
  gem.add_development_dependency 'rspec-rails', '>= 2.14.0'
24
24
  gem.add_development_dependency 'database_cleaner', '~> 1.0.0'
25
25
  gem.add_development_dependency 'girl_friday', '>= 0.11.1'
26
- gem.add_development_dependency 'sucker_punch', '~> 1.0.0' if RUBY_VERSION != '1.8.7'
26
+
27
+ if RUBY_VERSION.start_with?('1.9')
28
+ gem.add_development_dependency 'sucker_punch', '~> 1.0'
29
+ elsif RUBY_VERSION.start_with?('2')
30
+ gem.add_development_dependency 'sucker_punch', '~> 2.0'
31
+ end
32
+
27
33
  gem.add_development_dependency 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'
28
34
  gem.add_development_dependency 'genspec', '>= 0.2.8'
29
35
  gem.add_development_dependency 'sinatra'
@@ -13,13 +13,13 @@ rescue LoadError
13
13
  end
14
14
 
15
15
  describe Rollbar::Delay::SuckerPunch, :if => RUBY_VERSION != '1.8.7' do
16
- describe ".call" do
17
- let(:payload) { "anything" }
16
+ describe '.call' do
17
+ let(:payload) { 'anything' }
18
18
 
19
- it "performs the task asynchronously" do
19
+ it 'performs the task asynchronously' do
20
20
  Rollbar.should_receive(:process_from_async_handler)
21
21
 
22
- Rollbar::Delay::SuckerPunch.call payload
22
+ Rollbar::Delay::SuckerPunch.call(payload)
23
23
  end
24
24
  end
25
25
  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: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rollbar, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-15 00:00:00.000000000 Z
11
+ date: 2016-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 1.0.0
75
+ version: '2.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 1.0.0
82
+ version: '2.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: sidekiq
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -229,7 +229,7 @@ files:
229
229
  - UPGRADING.md
230
230
  - bin/rollbar-rails-runner
231
231
  - data/rollbar.snippet.js
232
- - docs/configuration_options.md
232
+ - docs/configuration.md
233
233
  - gemfiles/rails30.gemfile
234
234
  - gemfiles/rails31.gemfile
235
235
  - gemfiles/rails32.gemfile