deprecation_collector 0.7.1 → 0.7.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: 7d5a792b37d7fef7db54b766c8486202f0058019c3fbe668dc62a3b0845cdd18
4
- data.tar.gz: e9bf64acfd1113253f65b24d85927e4a1c8ccb6252d2286d8589f09ac6ed0d25
3
+ metadata.gz: 81d6dd372292acd1a8e2fcddc6ed4ca2f8f2d4ab73f9894318ba26067e96a8a0
4
+ data.tar.gz: c4884163cbc574b1ce86d4a799c51507b88e2dbaa2f1c720c1d7362e1e39e7c0
5
5
  SHA512:
6
- metadata.gz: f8a04a651d8ba60c16c88c1c9e094929567b7bfae8a0f15884aeb0c673cfff8ec351dd444a7daa28b3431e08a9ed29ebe22d4bb64406d8e8fec6dc39f2bcd5b3
7
- data.tar.gz: 5619c9376153423a2573a18cc16bfa37ea5c1053eab7c79d782c66a44bdaea97cf6d2ecac5e7f0f3a6ba2ed74eec3fd6fd594289ed1d228010c7b29dec5fa4e5
6
+ metadata.gz: 9d17b36f5eee269337f20ca2901db6fb12f59d4fedc6a440be878e05956b742c69da0169ada8f89cd86e9d003e8a58421b00b18a767f23ce43ab0f17071aa0c4
7
+ data.tar.gz: a9902de9301144e6ed222eb786d32f1a13c3f504598d0dcc9d7479876c8fe0df566df1d6dc22af5695027c09231e360b72fbf9230632aacc9bd83656e08918e3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.7.2
2
+ - fix error `undefined method instance_of? for Redis::Future` for redis < 5
3
+
1
4
  == 0.7.1
2
5
  - fix ruby 2.7 on rails 7.1
3
6
 
@@ -109,6 +109,8 @@ class DeprecationCollector
109
109
 
110
110
  def flush(force: false)
111
111
  return unless force || (current_time > @last_write_time + @write_interval)
112
+ # do not disturb existing redis connection if already in pipeline, hope that will be flushed some other time
113
+ return if in_redis_pipeline?
112
114
 
113
115
  deprecations_to_flush = nil
114
116
  @deprecations_mutex.synchronize do
@@ -182,6 +184,11 @@ class DeprecationCollector
182
184
  end
183
185
 
184
186
  protected
187
+ def in_redis_pipeline?
188
+ return false if Gem::Version.new(::Redis::VERSION) >= Gem::Version.new("5.0")
189
+
190
+ redis.instance_variable_get(:@client) != redis.instance_variable_get(:@original_client)
191
+ end
185
192
 
186
193
  def enabled_flag_key
187
194
  @enabled_flag_key ||= "#{@key_prefix}:enabled" # usually deprecations:enabled
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class DeprecationCollector
4
- VERSION = "0.7.1"
4
+ VERSION = "0.7.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deprecation_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasily Fedoseyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-30 00:00:00.000000000 Z
11
+ date: 2024-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis