metrics 0.9.0 → 0.10.0

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: 1b477758de3efc0c6e9f8413e7ae7f518387bbc9bb55164f4cceaf1d049e0274
4
- data.tar.gz: c326efa64964828683525a305ae5cd8dabe87b471315cf1ff090a4d77f3ac540
3
+ metadata.gz: 3f7c56a260417ead9df57c9c0a9a8df189c0c9c08979146a93d2b38507030caf
4
+ data.tar.gz: '069dfa17fb3966439fff730ea1579bf9a182294993a0ad8321451259ee5dfc7d'
5
5
  SHA512:
6
- metadata.gz: edbc02219eb5edfb389e5cbc7124d3a7f6bd0654d7af82d7ab17d0eb52f3b1b4085bb41bffcca536ecd53e32c683a67fa19d2dd957076785b54595a5aad4b401
7
- data.tar.gz: 864f4b88279171df6fc0e5e34ceda481cd6da3385aa486cfaf19685c65b3a787a737718772b4bd6d32a93cd2a99894601d698920dcc3e72b11498bb57c43568c
6
+ metadata.gz: 59e4da736136537d4fbea77dcd80d357a3314dc0356ccda4651fc717bdd1fbb9c9af2ea7a20dcc3eaa7bd24f30040f54a3d301312f03152367b868e3b27208a9
7
+ data.tar.gz: 11ae1f1e129a2863fb9d1ee79517d37d4cf0e3fe1cc529e8b0a712b39f5fab56f00fbd8b292b198b8f8a6d962ceca8fd1994d6819ac9facb369e96673c74e192
checksums.yaml.gz.sig CHANGED
Binary file
@@ -6,18 +6,20 @@
6
6
  require 'console/event/failure'
7
7
 
8
8
  module Metrics
9
- # Require a specific trace backend.
10
- def self.require_backend(env = ENV)
11
- if backend = env['METRICS_BACKEND']
12
- begin
13
- require(backend)
14
- rescue LoadError => error
15
- ::Console::Event::Failure.for(error).emit(self, "Unable to load metrics 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['METRICS_BACKEND']
13
+ begin
14
+ require(backend)
15
+ rescue LoadError => error
16
+ ::Console::Event::Failure.for(error).emit(self, "Unable to load metrics backend!", backend: backend, severity: :warn)
17
+ end
18
+
19
+ Metrics.extend(Backend::Interface)
16
20
  end
17
-
18
- Metrics.extend(Backend::Interface)
19
21
  end
20
22
  end
21
23
  end
22
24
 
23
- Metrics.require_backend
25
+ Metrics::Backend.require_backend
@@ -8,7 +8,7 @@ require_relative 'backend'
8
8
  module Metrics
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 Metrics
7
- VERSION = "0.9.0"
7
+ VERSION = "0.10.0"
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: metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file