traces 0.12.0 → 0.13.1

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: 03abc75dfa0aa9ed43d8c647da5aa54f49a2afb017f257085dff5195a539a631
4
- data.tar.gz: dac96f346207c2b91921fda1b3e4845f171e34fba0f6e190d2342eec7ef30e18
3
+ metadata.gz: 9e413f837413b357d84594db5b48e6be8d5033db0896c042a0806ec1f6b6e493
4
+ data.tar.gz: fa2aed0ec28362aaf84983d13da4ae1e55738728b7f86045cf919b93599c23bc
5
5
  SHA512:
6
- metadata.gz: 5c48758b54dd032a4aa428f14ede3b0a87fb3022d4b6561ab8973172f587ca6242b81941f493ce0de8d96d46d0676d309644aec0f98859fcd8ced1231101c613
7
- data.tar.gz: 58ffcb739f739f9c203c4d52c49e1b96ec3fea8ba2dd2c26f8b82a754189a7ab44a0e0aad16641fecfdbd4f784c850a29ebfd40220e7d12acacbf0b45e001139
6
+ metadata.gz: 85f20fe132bf1a07bb0d9633ce2793776ab1e7fe56cc3320b0db3b400b9f6723faf9a4a6c7b781e0dc4d5b210af8bcd24cfa4846ef02ce285edb93b2ed25bf94
7
+ data.tar.gz: 360152f3404776023b846b42dbced2ed16e533add3072d57e21c6c49cb590f3b2fcffb66daf313c09984760b9f64e87e495b888c166cb43a9968a7e55076548c
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1 @@
1
- JR�K�&��v�ƃ/q~�M��O�Y�S@N~�����V)T~��y�H�S��l�}�kJ2����M�T��:��nP����
2
- /����X8}I4���6�����/��JU��VMxV�r}E��{���h�Xa�V<|D>�&��r�U����X��m�(��6�h��>7���-ie��;�^}A�$��厧[����*W����Z�Ɂ-04�}۬����N�랭�e�7(�<�a4UZ��r��-�.w�$�~�)�����m�!�Bt:���|�+M� ����J ׸n�p�B ��pd4�ؿ.�v��jq��1Eq�̝$ҵ��m��#�-#WYTE9��"��5�K���Lͥ�3f�@ܶݻU}���
1
+ Ix˲z^����m�d���*Tح�GR,�O� �*�����.�ر��N[2.3-��}Rp���OґO�T��!���
@@ -6,18 +6,24 @@
6
6
  require 'console/event/failure'
7
7
 
8
8
  module Traces
9
- # Require a specific trace backend.
10
- def self.require_backend(env = ENV)
11
- if backend = env['TRACES_BACKEND']
12
- begin
13
- require(backend)
14
- rescue LoadError => error
15
- ::Console::Event::Failure.for(error).emit(self, "Unable to load traces backend!", backend: backend, severity: :warn)
9
+ module Backend
10
+ # Require a specific trace backend.
11
+ def self.require_backend(env = ENV)
12
+ if backend = env['TRACES_BACKEND']
13
+ begin
14
+ require(backend)
15
+ rescue LoadError => error
16
+ ::Console::Event::Failure.for(error).emit(self, "Unable to load traces backend!", backend: backend, severity: :warn)
17
+
18
+ return false
19
+ end
20
+
21
+ Traces.extend(Backend::Interface)
22
+
23
+ return true
16
24
  end
17
-
18
- Traces.extend(Backend::Interface)
19
25
  end
20
26
  end
21
27
  end
22
28
 
23
- Traces.require_backend
29
+ Traces::Backend.require_backend
@@ -8,7 +8,7 @@ require_relative 'backend'
8
8
  module Traces
9
9
  # @returns [Boolean] Whether there is an active backend.
10
10
  def self.enabled?
11
- self.const_defined?(:Backend)
11
+ Backend.const_defined?(:Interface)
12
12
  end
13
13
 
14
14
  module Provider
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2023, by Samuel Williams.
5
5
 
6
6
  module Traces
7
- VERSION = "0.12.0"
7
+ VERSION = "0.13.1"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traces
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file