safely_block 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: 39809689c7a5c7570d0fd1703d0211a4b677fb8c84bcad78659677eb9077b4ba
4
- data.tar.gz: c575e5971423655a45aaf7977e00ea71c5f172e33dd27004dd8d00da21507570
3
+ metadata.gz: 6f5740153a2f9f0229fdd5cede2b3944d35af16915785d66b57aa2aaa3b904a1
4
+ data.tar.gz: d5d01f34bf00ddb1a83ead7cc8b8e7f54bc5d0c91e2885928bfc68268eaea08b
5
5
  SHA512:
6
- metadata.gz: 5dc08f81d8ebd8246577f9d01cd25a4685d7b005fc54186847f137e34af1bca21aaa73dc020bd94127ed018e6cb9cba49580ce29397e40b4f5fcf1be028491ce
7
- data.tar.gz: f7eb244c765e0fec4f1c4f2f1d4771258cbc6969c15e00596602a8cfa00bf8f9e4911b80ca72cb333c8d3df05dde1fa2ddc8757729389268202b5c14f0ff283e
6
+ metadata.gz: 5ce8c85904830e4602aab2d69f0cb029eca3252c01670a614f311cf1697979bef3ec22de2f3b95832a138347127126d7215ef06be3e3a2ee2ac1e323e65be07f
7
+ data.tar.gz: aeb6b97f81efc9d526923c3d05d87201a9a4ddde99222d1dab31f6a3e9d9183ccf32c3b9f2f4de874541140cc2dc206e42b446973859ee7c26a863f4697916d1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.5.0 (2025-05-26)
2
+
3
+ - Dropped support for Ruby < 3.2
4
+
5
+ ## 0.4.1 (2024-09-04)
6
+
7
+ - Added support for Datadog
8
+
1
9
  ## 0.4.0 (2023-05-07)
2
10
 
3
11
  - Added exception reporting from [Errbase](https://github.com/ankane/errbase)
@@ -32,3 +40,20 @@
32
40
  - Added `tag` option and tag exception message by default
33
41
  - Added `except` option
34
42
  - Added `silence` option
43
+
44
+ ## 0.0.4 (2015-03-11)
45
+
46
+ - Added fail-safe
47
+
48
+ ## 0.0.3 (2014-08-13)
49
+
50
+ - Added `safely` method
51
+
52
+ ## 0.0.2 (2014-08-12)
53
+
54
+ - Added `default` option
55
+ - Added `only` option
56
+
57
+ ## 0.0.1 (2014-08-12)
58
+
59
+ - First release
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2023 Andrew Kane
1
+ Copyright (c) 2014-2025 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -12,7 +12,7 @@ In development and test environments, exceptions are raised so you can fix them.
12
12
 
13
13
  [Read more](https://ankane.org/safely-pattern)
14
14
 
15
- [![Build Status](https://github.com/ankane/safely/workflows/build/badge.svg?branch=master)](https://github.com/ankane/safely/actions)
15
+ [![Build Status](https://github.com/ankane/safely/actions/workflows/build.yml/badge.svg)](https://github.com/ankane/safely/actions)
16
16
 
17
17
  ## Installation
18
18
 
@@ -99,7 +99,8 @@ Reports exceptions to a variety of services out of the box.
99
99
  - [Airbrake](https://airbrake.io/)
100
100
  - [Appsignal](https://appsignal.com/)
101
101
  - [Bugsnag](https://bugsnag.com/)
102
- - [Exception Notification](https://github.com/smartinez87/exception_notification)
102
+ - [Datadog](https://www.datadoghq.com/product/error-tracking/)
103
+ - [Exception Notification](https://github.com/kmcphillips/exception_notification)
103
104
  - [Google Stackdriver](https://cloud.google.com/stackdriver/)
104
105
  - [Honeybadger](https://www.honeybadger.io/)
105
106
  - [New Relic](https://newrelic.com/)
@@ -124,6 +125,12 @@ By default, exception messages are prefixed with `[safely]`. This makes it easie
124
125
  Safely.tag = false
125
126
  ```
126
127
 
128
+ By default, exceptions are raised in the development and test environments. Change this with:
129
+
130
+ ```ruby
131
+ Safely.raise_envs += ["staging"]
132
+ ```
133
+
127
134
  To report exceptions manually:
128
135
 
129
136
  ```ruby
@@ -19,6 +19,11 @@ module Safely
19
19
  end
20
20
  end
21
21
 
22
+ if defined?(Datadog::Tracing)
23
+ Datadog::Tracing.active_span&.set_tags(info)
24
+ Datadog::Tracing.active_span&.set_error(e)
25
+ end
26
+
22
27
  ExceptionNotifier.notify_exception(e, data: info) if defined?(ExceptionNotifier)
23
28
 
24
29
  # TODO add info
@@ -1,3 +1,3 @@
1
1
  module Safely
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,16 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safely_block
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-05-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description:
14
12
  email: andrew@ankane.org
15
13
  executables: []
16
14
  extensions: []
@@ -27,7 +25,6 @@ homepage: https://github.com/ankane/safely
27
25
  licenses:
28
26
  - MIT
29
27
  metadata: {}
30
- post_install_message:
31
28
  rdoc_options: []
32
29
  require_paths:
33
30
  - lib
@@ -35,15 +32,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
35
32
  requirements:
36
33
  - - ">="
37
34
  - !ruby/object:Gem::Version
38
- version: '3'
35
+ version: '3.2'
39
36
  required_rubygems_version: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
40
  version: '0'
44
41
  requirements: []
45
- rubygems_version: 3.4.10
46
- signing_key:
42
+ rubygems_version: 3.6.7
47
43
  specification_version: 4
48
44
  summary: Rescue and report exceptions in non-critical code
49
45
  test_files: []