redis-namespace 1.10.0 → 1.11.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: 8c4fe7070f484a694ce41f97a0297e03d92cfa67746903d9fb74fa8439410494
4
- data.tar.gz: 0cbfe04c2ca7b2d42ee603f0d67ba21c13cb938832cc99f89a2323842bb828a3
3
+ metadata.gz: e003f4015162bfd465e79dd90e54b44ae46f0ec269118e10c08215d639166296
4
+ data.tar.gz: 16078b51e1bdab24977aa2b6fb7d0cd4761a7c41c340fcdacfb96dd32216c061
5
5
  SHA512:
6
- metadata.gz: ec085b7e9fba5241cb2e2ad4ccf22d4282001a0ee37731e408a2135ea5e5439747441046cc6c48a2a372afe99f2fb6a67401867a20c8605e41206954eca72078
7
- data.tar.gz: 0eff5c268bba88cb8bd5e0ab8115a404fed3180e82ebc4297ab8675da6c73e13b3bb943e77ec0392de4460683488589bbc227d95515aa5dc70cdb4236b58801d
6
+ metadata.gz: fb965b575fe3ec2f2f45b99a71839f569f647681939b16576c053ab3e25bf85db1db030941bbe6eaeecc624eeeaf8c0497c58c53c4231440896e9e116bc189e3
7
+ data.tar.gz: 07b2b2e20c4a152b3e3a4cfbf6abad773f335e098067a9b213e29dd80cfc4519f3d27c43febe6cf8261ffe95e73184e23a1b9ff557007eb7a8308e43a398bbb1
@@ -2,6 +2,6 @@
2
2
 
3
3
  class Redis
4
4
  class Namespace
5
- VERSION = '1.10.0'
5
+ VERSION = '1.11.0'
6
6
  end
7
7
  end
@@ -72,6 +72,7 @@ class Redis
72
72
  "exists?" => [ :all ],
73
73
  "expire" => [ :first ],
74
74
  "expireat" => [ :first ],
75
+ "expiretime" => [ :first ],
75
76
  "eval" => [ :eval_style ],
76
77
  "evalsha" => [ :eval_style ],
77
78
  "get" => [ :first ],
@@ -122,6 +123,7 @@ class Redis
122
123
  "persist" => [ :first ],
123
124
  "pexpire" => [ :first ],
124
125
  "pexpireat" => [ :first ],
126
+ "pexpiretime" => [ :first ],
125
127
  "pfadd" => [ :first ],
126
128
  "pfcount" => [ :all ],
127
129
  "pfmerge" => [ :all ],
@@ -138,7 +140,7 @@ class Redis
138
140
  "rpush" => [ :first ],
139
141
  "rpushx" => [ :first ],
140
142
  "sadd" => [ :first ],
141
- "sadd?" => [ :first ],
143
+ "sadd?" => [ :first ],
142
144
  "scard" => [ :first ],
143
145
  "scan" => [ :scan_style, :second ],
144
146
  "scan_each" => [ :scan_style, :all ],
@@ -159,6 +161,7 @@ class Redis
159
161
  "spop" => [ :first ],
160
162
  "srandmember" => [ :first ],
161
163
  "srem" => [ :first ],
164
+ "srem?" => [ :first ],
162
165
  "sscan" => [ :first ],
163
166
  "sscan_each" => [ :first ],
164
167
  "strlen" => [ :first ],
@@ -243,8 +246,11 @@ class Redis
243
246
  # This is used by the Redis gem to determine whether or not to display that deprecation message.
244
247
  @sadd_returns_boolean = true
245
248
 
249
+ # This is used by the Redis gem to determine whether or not to display that deprecation message.
250
+ @srem_returns_boolean = true
251
+
246
252
  class << self
247
- attr_accessor :sadd_returns_boolean
253
+ attr_accessor :sadd_returns_boolean, :srem_returns_boolean
248
254
  end
249
255
 
250
256
  attr_writer :namespace
data/spec/redis_spec.rb CHANGED
@@ -363,6 +363,12 @@ describe "redis" do
363
363
  expect(@namespaced.sadd?('foo', 1)).to eq(false)
364
364
  end
365
365
 
366
+ it "should remove members" do
367
+ @namespaced.sadd('foo', 1)
368
+ expect(@namespaced.srem?('foo', 1)).to eq(true)
369
+ expect(@namespaced.srem?('foo', 1)).to eq(false)
370
+ end
371
+
366
372
  it "should add namespace to sort" do
367
373
  @namespaced.sadd('foo', 1)
368
374
  @namespaced.sadd('foo', 2)
@@ -660,6 +666,12 @@ describe "redis" do
660
666
  expect(@redis.ttl("ns:foo")).to satisfy {|v| (0..1).include?(v) }
661
667
  end
662
668
 
669
+ it "should namespace expiretime" do
670
+ @namespaced.set('mykey', 'Hello')
671
+ @namespaced.expireat('mykey', 2000000000)
672
+ expect(@namespaced.expiretime('mykey')).to eq(2000000000)
673
+ end
674
+
663
675
  it "should namespace hincrbyfloat" do
664
676
  @namespaced.hset('mykey', 'field', 10.50)
665
677
  expect(@namespaced.hincrbyfloat('mykey', 'field', 0.1)).to eq(10.6)
@@ -692,6 +704,12 @@ describe "redis" do
692
704
  expect(@namespaced.pexpire('mykey', 1555555555005)).to eq(true)
693
705
  end
694
706
 
707
+ it "should namespace pexpiretime" do
708
+ @namespaced.set('mykey', 'Hello')
709
+ @namespaced.pexpireat('mykey', 2000000000000)
710
+ expect(@namespaced.pexpiretime('mykey')).to eq(2000000000000)
711
+ end
712
+
695
713
  it "should namespace psetex" do
696
714
  expect(@namespaced.psetex('mykey', 10000, 'Hello')).to eq('OK')
697
715
  expect(@namespaced.get('mykey')).to eq('Hello')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-namespace
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2022-12-20 00:00:00.000000000 Z
15
+ date: 2023-06-08 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: redis
@@ -113,7 +113,7 @@ licenses:
113
113
  metadata:
114
114
  bug_tracker_uri: https://github.com/resque/redis-namespace/issues
115
115
  changelog_uri: https://github.com/resque/redis-namespace/blob/master/CHANGELOG.md
116
- documentation_uri: https://www.rubydoc.info/gems/redis-namespace/1.10.0
116
+ documentation_uri: https://www.rubydoc.info/gems/redis-namespace/1.11.0
117
117
  rubygems_mfa_required: 'true'
118
118
  post_install_message:
119
119
  rdoc_options: []
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.3.15
133
+ rubygems_version: 3.4.1
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Namespaces Redis commands.