tobox 0.3.0 → 0.3.2

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
  SHA256:
3
- metadata.gz: 33a40c07b2d7f36933540d390287aeeb7d4e0aa39a7d19a439eaca6a2f8fc23f
4
- data.tar.gz: 939699d801afdb03ed85c0048eee3b00c50a786a345b0731c6dba910fafb51ad
3
+ metadata.gz: cb81b3eab97621080f2cf55ba787943d26a11a38c0e807313a810adc8c0d8136
4
+ data.tar.gz: 0556f5ba59e7b2feb8a47b04d53e00869d041e747a6789c7f4fe4067f17ad795
5
5
  SHA512:
6
- metadata.gz: 5f5567a9f8e43fbc0f22e10465a0026a4984932183ae7d70c6fa95cdcb092995cbedd44422fa8a65b6c2d321be3ae15a0b72e905edd43c96427fbaac7cc73e34
7
- data.tar.gz: f7823d88490ab6edc02ed6a8fd846f7e6cf40ce042fb046e502e3024c26f24ced5ee143de80669ffad49d5077dc97e338c363eda1e0ea1d3196479447c6aa7f6
6
+ metadata.gz: d109a8b77dafed4066d60cff257541e3eb1a7a6950efa7e94ec75e6e68fb1cf60e5684edc46b9ec99f0f56573807f354b16b7ee5c188b94a848cc52423528c30
7
+ data.tar.gz: f8d87bd79921b774326e7db4afd532696814c2b38d5e45deae582eaacdd7e7f161c92b81d627ab2b1c17c51bad0a8a0a1be000839cd675da885a78107e0f4d16
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  ## [Unreleased]
2
2
 
3
+
4
+ ## [0.3.2] - 2022-03-06
5
+
6
+ ### Bugfixes
7
+
8
+ * allow sentry error capture if `report_after_retries` option is turned off.
9
+
10
+ ## [0.3.1] - 2022-03-03
11
+
12
+ ### Bugfixes
13
+
14
+ In Sentry plugin, exception capturing is no longer dependent on transaction monitoring being enabled (if `traces_sampling_rate` would be set to 0, exceptions wouldn't be capture; now they are).
15
+
3
16
  ## [0.3.0] - 2022-12-12
4
17
 
5
18
  ### Features
@@ -124,7 +124,7 @@ module Tobox
124
124
  def method_missing(meth, *args, &block)
125
125
  if DEFAULT_CONFIGURATION.key?(meth) && args.size == 1
126
126
  @config[meth] = args.first
127
- elsif /\Aon_(.*)\z/.match(meth) && args.size.zero?
127
+ elsif /\Aon_(.*)\z/.match(meth) && args.empty?
128
128
  on(Regexp.last_match(1).to_sym, &block)
129
129
  else
130
130
  super
@@ -74,12 +74,12 @@ module Tobox
74
74
  def on_error(event, error)
75
75
  return unless ::Sentry.initialized?
76
76
 
77
+ capture_exception(event, error)
78
+
77
79
  transaction = retrieve_transaction(event)
78
80
 
79
81
  return unless transaction
80
82
 
81
- capture_exception(event, error)
82
-
83
83
  finish_transaction(transaction, 500)
84
84
  end
85
85
 
@@ -109,7 +109,9 @@ module Tobox
109
109
  end
110
110
 
111
111
  def capture_exception(event, error)
112
- return unless ::Sentry.configuration.tobox.report_after_retries && event[:attempts] >= @max_attempts
112
+ if ::Sentry.configuration.tobox.report_after_retries && event[:attempts] && event[:attempts] < @max_attempts
113
+ return
114
+ end
113
115
 
114
116
  ::Sentry.capture_exception(
115
117
  error,
data/lib/tobox/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tobox
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - HoneyryderChuck
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2023-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel