roqua-support 0.1.12 → 0.1.13
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/roqua/support/errors.rb +2 -0
- data/lib/roqua-support/version.rb +1 -1
- data/roqua-support.gemspec +1 -1
- data/spec/roqua/support/errors_spec.rb +15 -4
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 803305fe155529f0da3dfa1ab3e12ac47b94f111
|
4
|
+
data.tar.gz: 61f3227e70ac8bf18a145d07e726ef8743ff2d85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 693863caf7baa5a55fda02d6c75f8fe3b9d5e7fbd144270f704dc1aac1ac881ac6d4ff3ce5ca22a594bf69f19efa491910a071fb2b3153c23f46f742cfeab8c2
|
7
|
+
data.tar.gz: 2f09d28afd8b73299c5754a739e66001af653000c649616c6ce1a4721410d45ed8d436ac738a745e5d90522a32f99acf58386ba893eb0d39e021f0da7313df77
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/roqua/support/errors.rb
CHANGED
@@ -11,6 +11,7 @@ module Roqua
|
|
11
11
|
|
12
12
|
def self.report(exception, extra_params = {})
|
13
13
|
return if const_defined?(:Rails) and Rails.env.test?
|
14
|
+
controller = extra_params.delete :controller
|
14
15
|
parameters = extra_parameters.merge(extra_params)
|
15
16
|
|
16
17
|
# Notify Roqua logging
|
@@ -24,6 +25,7 @@ module Roqua
|
|
24
25
|
|
25
26
|
# Notify Airbrake
|
26
27
|
if const_defined?(:Airbrake)
|
28
|
+
parameters = parameters.merge controller.airbrake_request_data if controller
|
27
29
|
Airbrake.notify_or_ignore(exception, parameters: parameters)
|
28
30
|
end
|
29
31
|
|
data/roqua-support.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.license = "MIT"
|
12
12
|
gem.authors = ["Marten Veldthuis"]
|
13
13
|
gem.email = "marten@roqua.nl"
|
14
|
-
gem.homepage = "https://github.com/roqua/
|
14
|
+
gem.homepage = "https://github.com/roqua/roqua-support"
|
15
15
|
|
16
16
|
gem.files = `git ls-files`.split($/)
|
17
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -26,10 +26,21 @@ describe 'Error reporting' do
|
|
26
26
|
Roqua::Support::Errors.report exception
|
27
27
|
end
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
29
|
+
context 'when Airbrake is defined' do
|
30
|
+
before do
|
31
|
+
stub_const('Airbrake', double('Airbrake', is_ignored_exception?: false))
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'sends notifications to airbrake' do
|
35
|
+
Airbrake.should_receive(:notify_or_ignore).with(exception, parameters: {})
|
36
|
+
Roqua::Support::Errors.report exception
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'adds request data when a controller is passed in' do
|
40
|
+
controller = double(airbrake_request_data: {request: 'data'})
|
41
|
+
Airbrake.should_receive(:notify_or_ignore).with(exception, parameters: {request: 'data'})
|
42
|
+
Roqua::Support::Errors.report exception, controller: controller
|
43
|
+
end
|
33
44
|
end
|
34
45
|
|
35
46
|
context 'when Appsignal is loaded' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roqua-support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Veldthuis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -127,7 +127,7 @@ files:
|
|
127
127
|
- spec/roqua/support/request_logger_spec.rb
|
128
128
|
- spec/roqua/support_spec.rb
|
129
129
|
- spec/spec_helper.rb
|
130
|
-
homepage: https://github.com/roqua/
|
130
|
+
homepage: https://github.com/roqua/roqua-support
|
131
131
|
licenses:
|
132
132
|
- MIT
|
133
133
|
metadata: {}
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project:
|
150
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.2.2
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: Helper objects and proxies used by a lot of RoQua applications
|
@@ -166,4 +166,3 @@ test_files:
|
|
166
166
|
- spec/roqua/support/request_logger_spec.rb
|
167
167
|
- spec/roqua/support_spec.rb
|
168
168
|
- spec/spec_helper.rb
|
169
|
-
has_rdoc:
|