kredis 1.3.0.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kredis/log_subscriber.rb +1 -1
- data/lib/kredis/type/datetime.rb +2 -2
- data/lib/kredis/types/list.rb +4 -0
- data/lib/kredis/types/set.rb +10 -2
- data/lib/kredis/version.rb +1 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdd8725b73c1bac9541b7b48ee62ebb46a8c51eaf78abe367fda75a12ee8c425
|
4
|
+
data.tar.gz: fcee76b43f62b3bd0a99fe7d258cb1b5edab0a8d7f408f15f7e11be01a40b219
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bd30168c4efb0e23f65f15eb0e0b34c0b3a62a6c871da6be82192187482f0fddc55405ffb52c12f8dad4397246b55f7d292aa3bbbd8d3dc75a4fdd2e94e009e
|
7
|
+
data.tar.gz: 7dc32845d42347bcabe655447174d9cfb8b5e1d738fdf59af96557a455dc55ca52fced20fd76e514a21628dd725312120cbb6f0577e7925d6a6da585e77ffbf8
|
@@ -15,7 +15,7 @@ class Kredis::LogSubscriber < ActiveSupport::LogSubscriber
|
|
15
15
|
|
16
16
|
private
|
17
17
|
def formatted_in(color, event, type: nil)
|
18
|
-
color " Kredis #{type} (#{event.duration.round(1)}ms) #{event.payload[:message]}", color, true
|
18
|
+
color " Kredis #{type} (#{event.duration.round(1)}ms) #{event.payload[:message]}", color, bold: true
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
data/lib/kredis/type/datetime.rb
CHANGED
data/lib/kredis/types/list.rb
CHANGED
data/lib/kredis/types/set.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Kredis::Types::Set < Kredis::Types::Proxying
|
2
|
-
proxying :smembers, :sadd, :srem, :multi, :del, :sismember, :scard, :spop, :exists
|
2
|
+
proxying :smembers, :sadd, :srem, :multi, :del, :sismember, :scard, :spop, :exists?, :srandmember
|
3
3
|
|
4
4
|
attr_accessor :typed
|
5
5
|
|
@@ -33,10 +33,18 @@ class Kredis::Types::Set < Kredis::Types::Proxying
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def take
|
36
|
-
spop
|
36
|
+
string_to_type(spop, typed)
|
37
37
|
end
|
38
38
|
|
39
39
|
def clear
|
40
40
|
del
|
41
41
|
end
|
42
|
+
|
43
|
+
def sample(count = nil)
|
44
|
+
if count.nil?
|
45
|
+
string_to_type(srandmember(count), typed)
|
46
|
+
else
|
47
|
+
strings_to_types(srandmember(count), typed)
|
48
|
+
end
|
49
|
+
end
|
42
50
|
end
|
data/lib/kredis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kredis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kasper Timm Hansen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 6.0.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: activemodel
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 6.0.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 6.0.0
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: redis
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
129
|
- !ruby/object:Gem::Version
|
116
130
|
version: '0'
|
117
131
|
requirements: []
|
118
|
-
rubygems_version: 3.4.
|
132
|
+
rubygems_version: 3.4.10
|
119
133
|
signing_key:
|
120
134
|
specification_version: 4
|
121
135
|
summary: Higher-level data structures built on Redis.
|