redis-prescription 2.4.0 → 2.5.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: 354a94422396fda6136797808b779601e496bd65820569745c5394e6ae3da356
4
- data.tar.gz: 19991740730012d7667f792e9c4324ae115fbe3e616d4295616b579cf2f8b7b5
3
+ metadata.gz: 102d72bbeaeed7fb1280168260f9f0f93db29aa4629975fef16738cb34d6a412
4
+ data.tar.gz: 8012996f4f92d95d082df58df434844a31e8423d066e71b57adcad6b23917aa3
5
5
  SHA512:
6
- metadata.gz: 3c10f0ee851f6e1b026d3d64b9903f140093b236e1964155bcef5e7c72417e5b68ae79cfc9b647a03c1ebd425d16772022ad2bb8175292e0a83c5231dd2a54e7
7
- data.tar.gz: a605ed2d14492a8e638c16a38bafab2afc37d5cc731c59df65ed3cae067cfeb75d9848115d434a302d7852df78678faccd5646a82568c91d04d8c7be9c19b533
6
+ metadata.gz: 6387dd02ae632d8eb0f7e0dbbf2c769bb0349b390c869f0b0f94bfc35123a825bdb0eb529ec06913ac57d23c8fac0513f993aa01db988dab4b3aea5e97f23e5c
7
+ data.tar.gz: cabe06b0ec13367f176ea56071547e9881e5fa764398953417e5e4da9e705109d7136d176e3b964a92530cef1d9c7ca2e75334603b3a45c461fc31c6dc3b7e2a
data/README.adoc CHANGED
@@ -41,6 +41,7 @@ This library aims to support and is tested against:
41
41
  ** MRI 3.1.x
42
42
  ** MRI 3.2.x
43
43
  * https://redis.io[Redis Server]
44
+ ** 6.0.x
44
45
  ** 6.2.x
45
46
  ** 7.0.x
46
47
  * https://github.com/redis/redis-rb[redis-rb]
@@ -3,10 +3,13 @@
3
3
  require_relative "../redis_prescription"
4
4
 
5
5
  class Redis
6
- # @deprecated
7
- # @see RedisPrescription
6
+ # @deprecated Use ::RedisPrescription
8
7
  class Prescription < RedisPrescription
9
8
  class << self
9
+ # Controls if deprecation warnings should be silenced or not.
10
+ # Defaults to `false`.
11
+ #
12
+ # @return [Boolean]
10
13
  attr_accessor :silence_deprecation_warning
11
14
  end
12
15
 
@@ -14,10 +14,6 @@ class RedisPrescription
14
14
  @redis = redis
15
15
  end
16
16
 
17
- def adapter_name
18
- "redis"
19
- end
20
-
21
17
  def eval(script, keys, argv)
22
18
  @redis.eval(script, keys, argv)
23
19
  rescue ::Redis::CommandError => e
@@ -29,11 +25,6 @@ class RedisPrescription
29
25
  rescue ::Redis::CommandError => e
30
26
  raise CommandError, e.message
31
27
  end
32
-
33
- def purge!
34
- @redis.script("flush")
35
- @redis.flushdb
36
- end
37
28
  end
38
29
  end
39
30
  end
@@ -17,10 +17,6 @@ class RedisPrescription
17
17
  @redis = redis
18
18
  end
19
19
 
20
- def adapter_name
21
- "redis-client"
22
- end
23
-
24
20
  def eval(script, keys, argv)
25
21
  @redis.call("EVAL", script, keys.size, *keys, *argv)
26
22
  rescue ::RedisClient::CommandError => e
@@ -32,11 +28,6 @@ class RedisPrescription
32
28
  rescue ::RedisClient::CommandError => e
33
29
  raise CommandError, e.message
34
30
  end
35
-
36
- def purge!
37
- @redis.call("SCRIPT", "FLUSH")
38
- @redis.call("FLUSHDB")
39
- end
40
31
  end
41
32
  end
42
33
  end
@@ -14,10 +14,6 @@ class RedisPrescription
14
14
  @redis = redis
15
15
  end
16
16
 
17
- def adapter_name
18
- "redis-namespace"
19
- end
20
-
21
17
  def eval(script, keys, argv)
22
18
  @redis.eval(script, keys, argv)
23
19
  rescue ::Redis::CommandError => e
@@ -29,11 +25,6 @@ class RedisPrescription
29
25
  rescue ::Redis::CommandError => e
30
26
  raise CommandError, e.message
31
27
  end
32
-
33
- def purge!
34
- @redis.redis.script("flush")
35
- @redis.redis.flushdb
36
- end
37
28
  end
38
29
  end
39
30
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  class RedisPrescription
4
4
  # Gem version.
5
- VERSION = "2.4.0"
5
+ VERSION = "2.5.0"
6
6
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "digest/sha1"
4
+
3
5
  require_relative "./redis_prescription/adapters"
4
6
  require_relative "./redis_prescription/errors"
5
7
  require_relative "./redis_prescription/version"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-prescription
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Zapparov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-07 00:00:00.000000000 Z
11
+ date: 2023-04-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Preloads (and reloads when needed, e.g. when scripts were flushed away)
@@ -37,7 +37,7 @@ metadata:
37
37
  homepage_uri: https://gitlab.com/ixti/redis-prescription
38
38
  source_code_uri: https://gitlab.com/ixti/redis-prescription
39
39
  bug_tracker_uri: https://gitlab.com/ixti/redis-prescription/issues
40
- changelog_uri: https://gitlab.com/ixti/redis-prescription/blob/v2.4.0/CHANGES.md
40
+ changelog_uri: https://gitlab.com/ixti/redis-prescription/blob/v2.5.0/CHANGES.md
41
41
  rubygems_mfa_required: 'true'
42
42
  post_install_message:
43
43
  rdoc_options: []