traces 0.15.1 → 0.15.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: 93acb7b30f76a09112b22bbf51760750b7c80bb45573dd73355a2e6a8a3bbd23
4
- data.tar.gz: d63543fd0cf41f4b39307d77294a280081341023df8963b6480cfb573e6776f2
3
+ metadata.gz: 6cba8b363fbd6a0df7f971924f3b8d3f358bc5b91ea2eb57045716285081fc35
4
+ data.tar.gz: 612777384a90dbc375f1a349e8291cabd7bb8ebf77830075d29703e54d5f4d60
5
5
  SHA512:
6
- metadata.gz: 39ffc15426bc835660f9935ef7255757664e175b08100ad342e25289fbd1206a82233058fde5efc2fa09058fd9f1cf7054165a962e78f985dbd5814d13509771
7
- data.tar.gz: a1be8f1ee62e09913f6ca16990943dd1a1cb9f4e1e93aabdaa9067c1b9fc9d4c2d3af0daac3aca228a6660ee45543d0d1f4fe57c9de485ead3f72427ec47b3dc
6
+ metadata.gz: 162910bc810cdb69c55e6bb59354dd7b0859237a4cc47c5d1a4ce4ccb6cafee24913680d9f1d815540b4524941eb9fd8bcda7cd49bebcd3fbdac534708cb828e
7
+ data.tar.gz: 4e5432869b0470ae85fbee9d6efbc57130b07944f5960eb7ee4832a848068caf56445b5846434075206111262f17b12ce92564417ff56d90c3162ee5338f0bbc
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2023, by Samuel Williams.
4
+ # Copyright, 2021-2025, by Samuel Williams.
5
5
 
6
6
  require_relative 'config'
7
7
 
@@ -10,6 +10,12 @@ module Traces
10
10
  module Backend
11
11
  end
12
12
 
13
+ # This is a default implementation, which can be replaced by the backend.
14
+ # @returns [Object] The current trace context.
15
+ def self.trace_context
16
+ nil
17
+ end
18
+
13
19
  # This is a default implementation, which can be replaced by the backend.
14
20
  # @returns [Boolean] Whether there is an active trace.
15
21
  def self.active?
data/lib/traces/config.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2024, by Samuel Williams.
4
+ # Copyright, 2024-2025, by Samuel Williams.
5
5
 
6
6
  module Traces
7
7
  # Represents a configuration for the traces library.
@@ -36,7 +36,8 @@ module Traces
36
36
  if backend = env['TRACES_BACKEND']
37
37
  begin
38
38
  if require(backend)
39
- Traces.extend(Backend::Interface)
39
+ # We ensure that the interface methods replace any existing methods by prepending the module:
40
+ Traces.singleton_class.prepend(Backend::Interface)
40
41
 
41
42
  return true
42
43
  end
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2023, by Samuel Williams.
5
5
 
6
6
  module Traces
7
- VERSION = "0.15.1"
7
+ VERSION = "0.15.2"
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.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -37,7 +37,7 @@ cert_chain:
37
37
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
38
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
39
  -----END CERTIFICATE-----
40
- date: 2025-01-31 00:00:00.000000000 Z
40
+ date: 2025-02-01 00:00:00.000000000 Z
41
41
  dependencies: []
42
42
  executables: []
43
43
  extensions: []
metadata.gz.sig CHANGED
Binary file