cacheflow 0.3.0 → 0.3.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: dc96e1e878dacf8275f2113b546cfab2d64baa98df3187c6b828c6f5397e9d6a
4
- data.tar.gz: 181f8cd6e5c6c0f1abd5a349d5ebef1892c31e609148577c6a262b1c4ba2c9f7
3
+ metadata.gz: '0860f01c1abf80c54762bfdf0c80c191fa2ea956144958ffe4352a6fe0ad523c'
4
+ data.tar.gz: 519476b589957dc270569af29f7e57334f9ac7dff2cfa8d54771f531901a0d88
5
5
  SHA512:
6
- metadata.gz: f174f62627d4c487ca492cf416cefa2369f713bfaefcac323ab6d0db8eae60aa29730af6d999db188f7a41c8413a4162fe6f4ed5a63aa773d72e9bfa1c1c17be
7
- data.tar.gz: 1a58a047b78cc91760e7336bd3b014d716d01c7ccc8312ef5c8a045fdeaf5ebb1647a7b97b7e8136475a624215c4ba5e5dca8e13fba13333517d878203ab25df
6
+ metadata.gz: 2639a41bda572120361f2f8f13e5924478aa1a410931b2256679bc97e37869fb7439c57ab48ab577f8a0f82a1fc2c705df7d198b66d8ec7e19ce8ed9b081facd
7
+ data.tar.gz: 368024e42b9d7a838847ba671f9ce91079bbd0ea0f879b70702dd00c2cf84df61f0ef30b32c67c54a86d397a008f508f5373e39a16360c87471f2cfb75d6fcd3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.1 (2023-02-15)
2
+
3
+ - Fixed error with `redis-client`
4
+
1
5
  ## 0.3.0 (2022-09-05)
2
6
 
3
7
  - Added support for `redis` 5 and `redis-client` gems
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2022 Andrew Kane
1
+ Copyright (c) 2017-2023 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
@@ -52,9 +52,8 @@ end
52
52
 
53
53
  if defined?(RedisClient)
54
54
  RedisClient.register(Cacheflow::Redis::ClientNotifications)
55
- end
56
-
57
- if Redis::VERSION.to_i < 5
55
+ elsif defined?(Redis)
56
+ # redis < 5
58
57
  Redis::Client.prepend(Cacheflow::Redis::Notifications)
59
58
  end
60
59
 
@@ -0,0 +1,24 @@
1
+ module Cacheflow
2
+ module Sidekiq
3
+ module ClassMethods
4
+ def redis(*_)
5
+ Cacheflow.silence do
6
+ super
7
+ end
8
+ end
9
+ end
10
+
11
+ module Client
12
+ module InstanceMethods
13
+ def push(*_)
14
+ Cacheflow.silence do
15
+ super
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ ::Sidekiq.singleton_class.prepend(Cacheflow::Sidekiq::ClassMethods)
24
+ ::Sidekiq::Client.prepend(Cacheflow::Sidekiq::Client::InstanceMethods)
@@ -1,3 +1,3 @@
1
1
  module Cacheflow
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/cacheflow.rb CHANGED
@@ -2,12 +2,12 @@
2
2
  require "active_support"
3
3
 
4
4
  # modules
5
- require "cacheflow/version"
5
+ require_relative "cacheflow/version"
6
6
 
7
7
  module Cacheflow
8
8
  def self.activate
9
- require "cacheflow/memcached" if defined?(Dalli)
10
- require "cacheflow/redis" if defined?(Redis) || defined?(RedisClient)
9
+ require_relative "cacheflow/memcached" if defined?(Dalli)
10
+ require_relative "cacheflow/redis" if defined?(Redis) || defined?(RedisClient)
11
11
  end
12
12
 
13
13
  def self.silenced?
@@ -25,33 +25,12 @@ module Cacheflow
25
25
  end
26
26
 
27
27
  def self.silence_sidekiq!
28
- ::Sidekiq.singleton_class.prepend(Cacheflow::Sidekiq::ClassMethods)
29
- ::Sidekiq::Client.prepend(Cacheflow::Sidekiq::Client::InstanceMethods)
30
- end
31
-
32
- module Sidekiq
33
- module ClassMethods
34
- def redis(*_)
35
- Cacheflow.silence do
36
- super
37
- end
38
- end
39
- end
40
-
41
- module Client
42
- module InstanceMethods
43
- def push(*_)
44
- Cacheflow.silence do
45
- super
46
- end
47
- end
48
- end
49
- end
28
+ require_relative "cacheflow/sidekiq"
50
29
  end
51
30
  end
52
31
 
53
32
  if defined?(Rails)
54
- require "cacheflow/railtie"
33
+ require_relative "cacheflow/railtie"
55
34
  else
56
35
  Cacheflow.activate
57
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cacheflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-05 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -37,6 +37,7 @@ files:
37
37
  - lib/cacheflow/memcached.rb
38
38
  - lib/cacheflow/railtie.rb
39
39
  - lib/cacheflow/redis.rb
40
+ - lib/cacheflow/sidekiq.rb
40
41
  - lib/cacheflow/version.rb
41
42
  homepage: https://github.com/ankane/cacheflow
42
43
  licenses:
@@ -57,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
58
  - !ruby/object:Gem::Version
58
59
  version: '0'
59
60
  requirements: []
60
- rubygems_version: 3.3.7
61
+ rubygems_version: 3.4.6
61
62
  signing_key:
62
63
  specification_version: 4
63
64
  summary: Colorized logging for Memcached and Redis