roqua-support 0.1.2 → 0.1.2.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: 5d537f6968d87c89a2c76d6eaa69317470f29207
4
- data.tar.gz: b10fe72f54f88222284c8af7b0a93327c9cac436
3
+ metadata.gz: 5630dc4eb6452f316d41227ba3b233fd0ec4446b
4
+ data.tar.gz: 3a33380768215e7f9cf6213511c512583af0946e
5
5
  SHA512:
6
- metadata.gz: b9681dd8f6c01c76aa9e2fd210dc98ea4428239e68110d07c735621384a0dba4b85ad316b849bb563afb88391968d7de6998b8ef3b084d88873afc8dcf847fcf
7
- data.tar.gz: eb6966c9414ccfd46d49bfe664396009779213131e0c706cd664a4a148e50bf4346f8e3d8fc1a453596751c1075ad0af00a0aebbcfccfdb3e56c78741b4b386c
6
+ metadata.gz: 3d3a36dc54de7db6ed108e623d947ad13e91ed93f4a4300774254fdecd773b683290282046a3f90f8453924bb291d94d6ea65911b10970fa04a2f75e11ddb05f
7
+ data.tar.gz: 54aa2724374a6f7ee746b5d254731007305540e9e405589ef8c57c1a598ee2820519f71a49ef0cbe87d2c6fee99dd6ac05ad69334e6499547b6269c84550e64c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.2.1
2
+
3
+ * Bugfixes for Errors.
4
+
1
5
  ## 0.1.2
2
6
 
3
7
  * Added `Roqua::Support::Errors.report(exception, extra_info = {})` which sends exception to all configured exception notifiers
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- roqua-support (0.1.2)
4
+ roqua-support (0.1.2.1)
5
5
  activesupport (>= 3.2, < 5.0)
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.2.1"
4
4
  end
5
5
  end
data/lib/roqua/support.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'logger'
2
2
  require 'roqua/support/logging'
3
+ require 'roqua/support/errors'
3
4
 
4
5
  module Roqua
5
6
  class << self
@@ -1,21 +1,6 @@
1
1
  module Roqua
2
2
  module Support
3
3
  module Errors
4
- if const_defined?(:Appsignal)
5
- module Appsignal
6
- # TODO: If and when https://github.com/appsignal/appsignal/pull/9 is merged,
7
- # this functionality should be supported directly by Appsignal.send_exception.
8
- def send_exception_with_tags(exception, tags = {})
9
- return if is_ignored_exception?(exception)
10
- transaction = Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)
11
- transaction.set_tags(tags)
12
- transaction.add_exception(exception)
13
- transaction.complete!
14
- Appsignal.agent.send_queue
15
- end
16
- end
17
- end
18
-
19
4
  def self.extra_parameters
20
5
  @extra_parameters || {}
21
6
  end
@@ -25,6 +10,7 @@ module Roqua
25
10
  end
26
11
 
27
12
  def self.report(exception, extra_params = {})
13
+ return if const_defined?(:Rails) and Rails.env.test?
28
14
  parameters = extra_parameters.merge(extra_params)
29
15
 
30
16
  # Notify Roqua logging
@@ -42,8 +28,17 @@ module Roqua
42
28
  end
43
29
 
44
30
  # Notify AppSignal
45
- if const_defined?(:Appsignal)
46
- Appsignal.send_exception_with_tags(exception, parameters: parameters)
31
+ if const_defined?(:Appsignal) and
32
+ not Appsignal.is_ignored_exception?(exception)
33
+ # TODO: If and when https://github.com/appsignal/appsignal/pull/9 is merged,
34
+ # this functionality should be supported directly by Appsignal.send_exception.
35
+ # Appsignal.send_exception(exception, parameters: parameters)
36
+
37
+ transaction = Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)
38
+ transaction.set_tags(parameters)
39
+ transaction.add_exception(exception)
40
+ transaction.complete!
41
+ Appsignal.agent.send_queue
47
42
  end
48
43
  end
49
44
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis