rollbar 0.10.10 → 0.10.11
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/rollbar/configuration.rb +1 -0
- data/lib/rollbar/delay/sidekiq.rb +1 -1
- data/lib/rollbar/version.rb +1 -1
- data/rollbar.gemspec +1 -0
- data/spec/delay/sidekiq_spec.rb +40 -0
- metadata +20 -2
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,7 @@ module Rollbar
|
|
6
6
|
OPTIONS = { 'queue' => 'rollbar', 'class' => self.name }.freeze
|
7
7
|
|
8
8
|
def self.handle(payload)
|
9
|
-
item =
|
9
|
+
item = Rollbar.configuration.use_sidekiq.is_a?(Hash) ? OPTIONS.merge(Rollbar.configuration.use_sidekiq) : OPTIONS
|
10
10
|
|
11
11
|
::Sidekiq::Client.push item.merge('args' => [payload])
|
12
12
|
end
|
data/lib/rollbar/version.rb
CHANGED
data/rollbar.gemspec
CHANGED
@@ -22,5 +22,6 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.add_development_dependency 'database_cleaner', '~> 1.0.0'
|
23
23
|
gem.add_development_dependency 'girl_friday', '>= 0.11.1'
|
24
24
|
gem.add_development_dependency 'sucker_punch', '>= 1.0.0' if RUBY_VERSION != '1.8.7'
|
25
|
+
gem.add_development_dependency 'sidekiq', '>= 2.13.0' if RUBY_VERSION != '1.8.7'
|
25
26
|
gem.add_development_dependency 'genspec', '>= 0.2.7'
|
26
27
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'rollbar/delay/sidekiq'
|
5
|
+
rescue LoadError
|
6
|
+
end
|
7
|
+
|
8
|
+
if defined?(Sidekiq)
|
9
|
+
describe Rollbar::Delay::Sidekiq do
|
10
|
+
before(:each) do
|
11
|
+
reset_configuration
|
12
|
+
end
|
13
|
+
|
14
|
+
describe ".handler" do
|
15
|
+
let(:payload) { anything }
|
16
|
+
|
17
|
+
context "with default options" do
|
18
|
+
before { Rollbar.configuration.use_sidekiq = true }
|
19
|
+
|
20
|
+
it "enqueues to default queue" do
|
21
|
+
::Sidekiq::Client.should_receive(:push).with(Rollbar::Delay::Sidekiq::OPTIONS.merge('args' => payload))
|
22
|
+
Rollbar::Delay::Sidekiq.handle(payload)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context "with custom options" do
|
27
|
+
let(:custom_config) { { 'queue' => 'custom_queue' } }
|
28
|
+
|
29
|
+
before { Rollbar.configuration.use_sidekiq = custom_config }
|
30
|
+
|
31
|
+
it "enqueues to custom queue" do
|
32
|
+
options = Rollbar::Delay::Sidekiq::OPTIONS.merge(custom_config.merge('args' => payload))
|
33
|
+
::Sidekiq::Client.should_receive(:push).with options
|
34
|
+
|
35
|
+
Rollbar::Delay::Sidekiq.handle(payload)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
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.
|
4
|
+
version: 0.10.11
|
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-08-
|
12
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: 1.0.0
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: sidekiq
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 2.13.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 2.13.0
|
110
126
|
- !ruby/object:Gem::Dependency
|
111
127
|
name: genspec
|
112
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,6 +186,7 @@ files:
|
|
170
186
|
- lib/rollbar/version.rb
|
171
187
|
- rollbar.gemspec
|
172
188
|
- spec/controllers/home_controller_spec.rb
|
189
|
+
- spec/delay/sidekiq_spec.rb
|
173
190
|
- spec/dummyapp/.gitignore
|
174
191
|
- spec/dummyapp/Rakefile
|
175
192
|
- spec/dummyapp/app/assets/javascripts/application.js
|
@@ -251,6 +268,7 @@ specification_version: 3
|
|
251
268
|
summary: Reports exceptions to Rollbar
|
252
269
|
test_files:
|
253
270
|
- spec/controllers/home_controller_spec.rb
|
271
|
+
- spec/delay/sidekiq_spec.rb
|
254
272
|
- spec/dummyapp/.gitignore
|
255
273
|
- spec/dummyapp/Rakefile
|
256
274
|
- spec/dummyapp/app/assets/javascripts/application.js
|