resque-rollbar 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d42e55fb54188844e7c6278bcd7728f1dbb30ab5
4
- data.tar.gz: cd09e85b423ea665987019f71b2cbb7b490681f4
3
+ metadata.gz: ea1c5d272a6a3d0d12488fa231d843e213695f3d
4
+ data.tar.gz: 6aaf7a6291af7de4e42afdb92e8b81ee01409403
5
5
  SHA512:
6
- metadata.gz: ad1c6b0b53114fbc7f1da98fd46f5302eb41f2dad4869feb518b8181d93e9cd61862fd66498670eeb772c4119992fd636410595a493e5a9d011c06e5a815435d
7
- data.tar.gz: 600b9f04a759d0ff42bba7f746eba7be62d874eb67587cdcdd52becb4d54d3687ec586d3ab0aca2e5a3c6b22be4327e8c2619e2bf19cdf56bea922ecb4309608
6
+ metadata.gz: 69fc791dad9870c35314304070922652eb80f7510e00040b103eba88a9a13f5fe37bd78304a5177e669d1ce3aae740f87b9ccdcd8453ab1bf18d1766eb1ceb2d
7
+ data.tar.gz: d189aa0578572150b3ebe1c725f1bd8f272b34038faaf0b45630a7f5cfb1e00953716f0cf6fc1dd7b91290e2562a933a11b5090678dfd307b70d33342cf99215
@@ -1,15 +1,25 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
4
  - 1.8.7
4
5
  - 1.9.3
5
6
  - 2.0.0
6
- - 2.1.0
7
+ - 2.1.8
8
+ - 2.2.4
9
+ - 2.3.0
7
10
  - jruby-18mode
8
11
  - jruby-19mode
12
+ - jruby-head
9
13
  - rbx
14
+ - rbx-2
10
15
  gemfile:
11
- - gemfiles/rollbar-1.2.x.gemfile
16
+ - gemfiles/rollbar-1.x.gemfile
17
+ - gemfiles/rollbar-2.x.gemfile
12
18
  matrix:
13
19
  allow_failures:
14
20
  - rvm: rbx
21
+ - rvm: rbx-2
15
22
  fast_finish: true
23
+ before_install:
24
+ - gem install bundler
25
+ sudo: false
@@ -0,0 +1,3 @@
1
+ ### 0.4.0 / 2016-03-03
2
+
3
+ * Drop support of Rollbar older than 1.4
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Dimko
1
+ Copyright (c) 2013-2016 DM
2
2
 
3
3
  MIT License
4
4
 
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rollbar', '~> 1.2.0'
3
+ gem 'rollbar', '~> 1.4'
4
4
  gemspec :path => '../'
5
5
 
6
6
  platforms :rbx do
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rollbar', '~> 2.0'
4
+ gemspec :path => '../'
5
+
6
+ platforms :rbx do
7
+ gem 'racc'
8
+ gem 'rubysl', '~> 2.0'
9
+ gem 'psych'
10
+ end
11
+
12
+ platforms :jruby do
13
+ gem 'jruby-openssl'
14
+ end
@@ -9,19 +9,7 @@ module Resque
9
9
  end
10
10
 
11
11
  def rollbar_payload
12
- if use_exception_level_filters?
13
- payload.merge(:use_exception_level_filters => true)
14
- else
15
- payload
16
- end
17
- end
18
-
19
- def use_exception_level_filters?
20
- rollbar_version.split('.')[1].to_i > 3
21
- end
22
-
23
- def rollbar_version
24
- ::Rollbar::VERSION
12
+ payload.merge(:use_exception_level_filters => true)
25
13
  end
26
14
  end
27
15
  end
@@ -1,9 +1,6 @@
1
1
  require 'resque/failure/rollbar'
2
2
 
3
3
  Resque.before_first_fork do
4
- # Force synchronous reporting
5
- ::Rollbar.configure do |config|
6
- config.use_async = false
7
- end
4
+ ::Rollbar.configure { |c| c.use_async = false } # Force synchronous reporting
8
5
  ::Rollbar.reset_notifier!
9
6
  end
@@ -1,5 +1,5 @@
1
1
  module Resque
2
2
  module Rollbar
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ['lib']
18
18
 
19
19
  gem.add_dependency 'resque'
20
- gem.add_dependency 'rollbar', '>= 1.2'
20
+ gem.add_dependency 'rollbar', '>= 1.4'
21
21
 
22
22
  gem.add_development_dependency 'rake'
23
23
  gem.add_development_dependency 'json'
@@ -9,21 +9,16 @@ describe Resque::Failure::Rollbar do
9
9
  Resque::Failure::Rollbar.new(exception, worker, queue, payload)
10
10
  end
11
11
 
12
- it 'should be notified of an error' do
13
- expect(Rollbar.notifier).to receive(:log).with('error', exception, payload)
14
- backend.save
15
- end
16
-
17
- context 'with Rollbar version > 1.3' do
18
- let(:rollbar_payload) { payload.merge(:use_exception_level_filters => true) }
19
-
20
- before do
21
- allow(backend).to receive(:rollbar_version).and_return('1.4.0')
12
+ describe '#save' do
13
+ it 'notifies Rollbar about the error' do
14
+ expect(Rollbar.notifier).to receive(:error).with(exception, backend.rollbar_payload)
15
+ backend.save
22
16
  end
17
+ end
23
18
 
24
- it 'sends the :use_exception_level_filters option' do
25
- expect(Rollbar.notifier).to receive(:error).with(exception, rollbar_payload)
26
- backend.save
19
+ describe '#rollbar_payload' do
20
+ it 'returns the payload with use_exception_level_filters set to true' do
21
+ expect(backend.rollbar_payload).to eq payload.merge(:use_exception_level_filters => true)
27
22
  end
28
23
  end
29
24
  end
@@ -13,8 +13,8 @@ describe 'resque-rollbar' do
13
13
  end
14
14
  end
15
15
 
16
- it 'disables asyc reporting from the resque process' do
17
- expect(Rollbar.configuration.use_async).to be_falsey
16
+ it 'disables async reporting from the resque process' do
17
+ expect(Rollbar.configuration.use_async).to be false
18
18
  end
19
19
  end
20
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2016-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: resque
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.2'
33
+ version: '1.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.2'
40
+ version: '1.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -104,11 +104,13 @@ files:
104
104
  - ".gitignore"
105
105
  - ".rspec"
106
106
  - ".travis.yml"
107
+ - CHANGELOG.md
107
108
  - Gemfile
108
109
  - LICENSE.txt
109
110
  - README.md
110
111
  - Rakefile
111
- - gemfiles/rollbar-1.2.x.gemfile
112
+ - gemfiles/rollbar-1.x.gemfile
113
+ - gemfiles/rollbar-2.x.gemfile
112
114
  - lib/resque/failure/rollbar.rb
113
115
  - lib/resque/rollbar.rb
114
116
  - lib/resque/rollbar/version.rb
@@ -135,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
137
  version: '0'
136
138
  requirements: []
137
139
  rubyforge_project:
138
- rubygems_version: 2.2.2
140
+ rubygems_version: 2.4.8
139
141
  signing_key:
140
142
  specification_version: 4
141
143
  summary: Resque failure backend for Rollbar