roqua-support 0.1.12 → 0.1.13

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: 04157f293aa088264645c6571535bbff47532f96
4
- data.tar.gz: a77b44d28bc6c0604aacbff2d9f3f6d983a0e03e
3
+ metadata.gz: 803305fe155529f0da3dfa1ab3e12ac47b94f111
4
+ data.tar.gz: 61f3227e70ac8bf18a145d07e726ef8743ff2d85
5
5
  SHA512:
6
- metadata.gz: a4afb549cb7124a21623c25144917a4ddf8d1f771da44aa10bf61b1fb342205f1ee34663c9124191b164a9071d9293afb956fd10c5ca40168756f7f34105571c
7
- data.tar.gz: 2316b715438c76b82f7a9e8820eb029122c16d749396c4545df2611705587de49f69e18476eab21d0a242d604112f089feefeff5c6ae58285da8e6bbbb0615ee
6
+ metadata.gz: 693863caf7baa5a55fda02d6c75f8fe3b9d5e7fbd144270f704dc1aac1ac881ac6d4ff3ce5ca22a594bf69f19efa491910a071fb2b3153c23f46f742cfeab8c2
7
+ data.tar.gz: 2f09d28afd8b73299c5754a739e66001af653000c649616c6ce1a4721410d45ed8d436ac738a745e5d90522a32f99acf58386ba893eb0d39e021f0da7313df77
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.13 / 2014-11-12
2
+
3
+ * Add support for reporting request data to Airbrake
4
+
1
5
  ## 0.1.12 / 2014-11-10
2
6
 
3
7
  * Added roqua/core_ext/active_interaction/filters/date_time_as_unix_extension that allows date_times attributes to be set by a unix timestamp.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- roqua-support (0.1.12)
4
+ roqua-support (0.1.13)
5
5
  activesupport (>= 3.2, < 5.0)
6
6
 
7
7
  GEM
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = '0.1.12'
3
+ VERSION = '0.1.13'
4
4
  end
5
5
  end
@@ -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/healthy"
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
- it 'sends notifications to airbrake' do
30
- stub_const("Airbrake", double("Airbrake", is_ignored_exception?: false))
31
- Airbrake.should_receive(:notify_or_ignore).with(exception, parameters: {})
32
- Roqua::Support::Errors.report exception
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.12
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-10 00:00:00.000000000 Z
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/healthy
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.3.0
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: