redis-client 0.7.4 → 0.8.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: e6fbe9260e43212ff9c501d95cf262f0c34e4db3cbc4dc6bebef3e8d2f98fc52
4
- data.tar.gz: d8356c2d342ae51f70e33b28f5e5679bea021ed31240b35c055ea5ad5625e9a4
3
+ metadata.gz: e7e7b7923ecb86353521db31036b3c5678683fcb6ed8ec5799c1ca6c6b5fcd44
4
+ data.tar.gz: 9e782f9884b2f12eb0c58ca701da62e8945a14a1eca27c3052adbb0a1e4fe428
5
5
  SHA512:
6
- metadata.gz: 7ad5fdf44a060e90f3d9a4b350733d208a745e625fa95764c7288047bfa4138e9e882a6608634374c66b3fa595037d8603eb902f431603c8c94048bacfbf8184
7
- data.tar.gz: c09bea07473c08a6d67b0615811484e50199da37ceb25a977129f616595fc7692d24aa46851272129b4a41c735f83a22dae0922a09bc74f6be72fe28dda2576d
6
+ metadata.gz: c77d09a8330bbcc4e8b2329a1ff9e660bb2c5ddf35cccafcf89f0b37ef9d89f579fa32b9ec7a7f64eecff12941ac835e4424dcf7ab9fdef12fc01ae73250959f
7
+ data.tar.gz: 4c16639282ca539e04d07d363c28e663a5e409f6c6d9deef856158fe8d46a1e20669b44c025e978dc04965106148e1fd7fcd82cc1d50abc8c27fb4694b825e2e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 0.8.0
4
+
5
+ - Add a `connect` interface to the instrumentation API.
6
+
3
7
  # 0.7.4
4
8
 
5
9
  - Properly parse script errors on pre 7.0 redis server.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redis-client (0.7.4)
4
+ redis-client (0.8.0)
5
5
  connection_pool
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -349,6 +349,10 @@ end
349
349
 
350
350
  ```ruby
351
351
  module MyRedisInstrumentation
352
+ def connect(redis_config)
353
+ MyMonitoringService.instrument("redis.connect") { super }
354
+ end
355
+
352
356
  def call(command, redis_config)
353
357
  MyMonitoringService.instrument("redis.query") { super }
354
358
  end
@@ -4,6 +4,10 @@ class RedisClient
4
4
  module Middlewares
5
5
  extend self
6
6
 
7
+ def connect(_config)
8
+ yield
9
+ end
10
+
7
11
  def call(command, _config)
8
12
  yield command
9
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class RedisClient
4
- VERSION = "0.7.4"
4
+ VERSION = "0.8.0"
5
5
  end
data/lib/redis_client.rb CHANGED
@@ -645,12 +645,14 @@ class RedisClient
645
645
  end
646
646
 
647
647
  def connect
648
- connection = config.driver.new(
649
- config,
650
- connect_timeout: connect_timeout,
651
- read_timeout: read_timeout,
652
- write_timeout: write_timeout,
653
- )
648
+ connection = Middlewares.connect(config) do
649
+ config.driver.new(
650
+ config,
651
+ connect_timeout: connect_timeout,
652
+ read_timeout: read_timeout,
653
+ write_timeout: write_timeout,
654
+ )
655
+ end
654
656
 
655
657
  prelude = config.connection_prelude.dup
656
658
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-06 00:00:00.000000000 Z
11
+ date: 2022-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool