protocol-redis 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +1 -2
  3. data/context/getting-started.md +55 -0
  4. data/context/index.yaml +13 -0
  5. data/lib/protocol/redis/cluster/methods/generic.rb +94 -0
  6. data/lib/protocol/redis/cluster/methods/pubsub.rb +27 -0
  7. data/lib/protocol/redis/cluster/methods/scripting.rb +93 -0
  8. data/lib/protocol/redis/cluster/methods/streams.rb +204 -0
  9. data/lib/protocol/redis/cluster/methods/strings.rb +304 -0
  10. data/lib/protocol/redis/cluster/methods.rb +27 -0
  11. data/lib/protocol/redis/connection.rb +41 -12
  12. data/lib/protocol/redis/error.rb +6 -0
  13. data/lib/protocol/redis/methods/cluster.rb +9 -7
  14. data/lib/protocol/redis/methods/connection.rb +9 -8
  15. data/lib/protocol/redis/methods/counting.rb +9 -8
  16. data/lib/protocol/redis/methods/generic.rb +100 -99
  17. data/lib/protocol/redis/methods/geospatial.rb +42 -49
  18. data/lib/protocol/redis/methods/hashes.rb +84 -83
  19. data/lib/protocol/redis/methods/lists.rb +75 -74
  20. data/lib/protocol/redis/methods/pubsub.rb +5 -4
  21. data/lib/protocol/redis/methods/scripting.rb +19 -20
  22. data/lib/protocol/redis/methods/server.rb +13 -9
  23. data/lib/protocol/redis/methods/sets.rb +42 -41
  24. data/lib/protocol/redis/methods/sorted_sets.rb +110 -109
  25. data/lib/protocol/redis/methods/streams.rb +48 -47
  26. data/lib/protocol/redis/methods/strings.rb +112 -109
  27. data/lib/protocol/redis/methods.rb +16 -14
  28. data/lib/protocol/redis/version.rb +1 -1
  29. data/lib/protocol/redis.rb +9 -2
  30. data/readme.md +49 -21
  31. data/releases.md +98 -0
  32. data.tar.gz.sig +0 -0
  33. metadata +13 -9
  34. metadata.gz.sig +0 -0
@@ -6,115 +6,116 @@
6
6
  module Protocol
7
7
  module Redis
8
8
  module Methods
9
+ # Methods for managing Redis streams.
9
10
  module Streams
10
11
  # Get information on streams and consumer groups. O(N) with N being the number of returned items for the subcommands CONSUMERS and GROUPS. The STREAM subcommand is O(log N) with N being the number of items in the stream.
11
- # @see https://redis.io/commands/xinfo
12
- # @param help [Enum]
12
+ # See <https://redis.io/commands/xinfo> for more details.
13
+ # @parameter help [Enum]
13
14
  def xinfo(*arguments)
14
15
  call("XINFO", *arguments)
15
16
  end
16
17
 
17
18
  # Appends a new entry to a stream. O(1).
18
- # @see https://redis.io/commands/xadd
19
- # @param key [Key]
20
- # @param ID [String]
19
+ # See <https://redis.io/commands/xadd> for more details.
20
+ # @parameter key [Key]
21
+ # @parameter ID [String]
21
22
  def xadd(*arguments)
22
23
  call("XADD", *arguments)
23
24
  end
24
25
 
25
26
  # Trims the stream to (approximately if '~' is passed) a certain size. O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation.
26
- # @see https://redis.io/commands/xtrim
27
- # @param key [Key]
28
- # @param strategy [Enum]
29
- # @param approx [Enum]
30
- # @param count [Integer]
27
+ # See <https://redis.io/commands/xtrim> for more details.
28
+ # @parameter key [Key]
29
+ # @parameter strategy [Enum]
30
+ # @parameter approx [Enum]
31
+ # @parameter count [Integer]
31
32
  def xtrim(*arguments)
32
33
  call("XTRIM", *arguments)
33
34
  end
34
35
 
35
36
  # Removes the specified entries from the stream. Returns the number of items actually deleted, that may be different from the number of IDs passed in case certain IDs do not exist. O(1) for each single item to delete in the stream, regardless of the stream size.
36
- # @see https://redis.io/commands/xdel
37
- # @param key [Key]
38
- # @param ID [String]
37
+ # See <https://redis.io/commands/xdel> for more details.
38
+ # @parameter key [Key]
39
+ # @parameter ID [String]
39
40
  def xdel(*arguments)
40
41
  call("XDEL", *arguments)
41
42
  end
42
43
 
43
44
  # Return a range of elements in a stream, with IDs matching the specified IDs interval. O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).
44
- # @see https://redis.io/commands/xrange
45
- # @param key [Key]
46
- # @param start [String]
47
- # @param end [String]
45
+ # See <https://redis.io/commands/xrange> for more details.
46
+ # @parameter key [Key]
47
+ # @parameter start [String]
48
+ # @parameter end [String]
48
49
  def xrange(*arguments)
49
50
  call("XRANGE", *arguments)
50
51
  end
51
52
 
52
53
  # Return a range of elements in a stream, with IDs matching the specified IDs interval, in reverse order (from greater to smaller IDs) compared to XRANGE. O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).
53
- # @see https://redis.io/commands/xrevrange
54
- # @param key [Key]
55
- # @param end [String]
56
- # @param start [String]
54
+ # See <https://redis.io/commands/xrevrange> for more details.
55
+ # @parameter key [Key]
56
+ # @parameter end [String]
57
+ # @parameter start [String]
57
58
  def xrevrange(*arguments)
58
59
  call("XREVRANGE", *arguments)
59
60
  end
60
61
 
61
62
  # Return the number of entires in a stream. O(1).
62
- # @see https://redis.io/commands/xlen
63
- # @param key [Key]
63
+ # See <https://redis.io/commands/xlen> for more details.
64
+ # @parameter key [Key]
64
65
  def xlen(*arguments)
65
66
  call("XLEN", *arguments)
66
67
  end
67
68
 
68
69
  # Return never seen elements in multiple streams, with IDs greater than the ones reported by the caller for each stream. Can block. For each stream mentioned: O(N) with N being the number of elements being returned, it means that XREAD-ing with a fixed COUNT is O(1). Note that when the BLOCK option is used, XADD will pay O(M) time in order to serve the M clients blocked on the stream getting new data.
69
- # @see https://redis.io/commands/xread
70
- # @param streams [Enum]
71
- # @param key [Key]
72
- # @param id [String]
70
+ # See <https://redis.io/commands/xread> for more details.
71
+ # @parameter streams [Enum]
72
+ # @parameter key [Key]
73
+ # @parameter id [String]
73
74
  def xread(*arguments)
74
75
  call("XREAD", *arguments)
75
76
  end
76
77
 
77
78
  # Create, destroy, and manage consumer groups. O(1) for all the subcommands, with the exception of the DESTROY subcommand which takes an additional O(M) time in order to delete the M entries inside the consumer group pending entries list (PEL).
78
- # @see https://redis.io/commands/xgroup
79
+ # See <https://redis.io/commands/xgroup> for more details.
79
80
  def xgroup(*arguments)
80
81
  call("XGROUP", *arguments)
81
82
  end
82
83
 
83
84
  # Return new entries from a stream using a consumer group, or access the history of the pending entries for a given consumer. Can block. For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data.
84
- # @see https://redis.io/commands/xreadgroup
85
- # @param noack [Enum]
86
- # @param streams [Enum]
87
- # @param key [Key]
88
- # @param ID [String]
85
+ # See <https://redis.io/commands/xreadgroup> for more details.
86
+ # @parameter noack [Enum]
87
+ # @parameter streams [Enum]
88
+ # @parameter key [Key]
89
+ # @parameter ID [String]
89
90
  def xreadgroup(*arguments)
90
91
  call("XREADGROUP", *arguments)
91
92
  end
92
93
 
93
94
  # Marks a pending message as correctly processed, effectively removing it from the pending entries list of the consumer group. Return value of the command is the number of messages successfully acknowledged, that is, the IDs we were actually able to resolve in the PEL. O(1) for each message ID processed.
94
- # @see https://redis.io/commands/xack
95
- # @param key [Key]
96
- # @param group [String]
97
- # @param ID [String]
95
+ # See <https://redis.io/commands/xack> for more details.
96
+ # @parameter key [Key]
97
+ # @parameter group [String]
98
+ # @parameter ID [String]
98
99
  def xack(*arguments)
99
100
  call("XACK", *arguments)
100
101
  end
101
102
 
102
103
  # Changes (or acquires) ownership of a message in a consumer group, as if the message was delivered to the specified consumer. O(log N) with N being the number of messages in the PEL of the consumer group.
103
- # @see https://redis.io/commands/xclaim
104
- # @param key [Key]
105
- # @param group [String]
106
- # @param consumer [String]
107
- # @param min-idle-time [String]
108
- # @param ID [String]
104
+ # See <https://redis.io/commands/xclaim> for more details.
105
+ # @parameter key [Key]
106
+ # @parameter group [String]
107
+ # @parameter consumer [String]
108
+ # @parameter min-idle-time [String]
109
+ # @parameter ID [String]
109
110
  def xclaim(*arguments)
110
111
  call("XCLAIM", *arguments)
111
112
  end
112
113
 
113
114
  # Return information and entries from a stream consumer group pending entries list, that are messages fetched but never acknowledged. O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). When the command returns just the summary it runs in O(1) time assuming the list of consumers is small, otherwise there is additional O(N) time needed to iterate every consumer.
114
- # @see https://redis.io/commands/xpending
115
- # @param key [Key]
116
- # @param group [String]
117
- # @param consumer [String]
115
+ # See <https://redis.io/commands/xpending> for more details.
116
+ # @parameter key [Key]
117
+ # @parameter group [String]
118
+ # @parameter consumer [String]
118
119
  def xpending(*arguments)
119
120
  call("XPENDING", *arguments)
120
121
  end
@@ -6,191 +6,194 @@
6
6
  module Protocol
7
7
  module Redis
8
8
  module Methods
9
+ # Methods for managing Redis strings.
9
10
  module Strings
10
11
  # Append a value to a key. O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.
11
- # @see https://redis.io/commands/append
12
- # @param key [Key]
13
- # @param value [String]
12
+ # See <https://redis.io/commands/append> for more details.
13
+ # @parameter key [Key]
14
+ # @parameter value [String]
14
15
  def append(key, value)
15
- call('APPEND', key, value)
16
+ call("APPEND", key, value)
16
17
  end
17
-
18
+
18
19
  # Count set bits in a string. O(N).
19
- # @see https://redis.io/commands/bitcount
20
- # @param key [Key]
20
+ # See <https://redis.io/commands/bitcount> for more details.
21
+ # @parameter key [Key]
21
22
  def bitcount(key, *range)
22
- call('BITCOUNT', key, *range)
23
+ call("BITCOUNT", key, *range)
23
24
  end
24
-
25
+
25
26
  # Decrement the integer value of a key by one. O(1).
26
- # @see https://redis.io/commands/decr
27
- # @param key [Key]
27
+ # See <https://redis.io/commands/decr> for more details.
28
+ # @parameter key [Key]
28
29
  def decr(key)
29
- call('DECR', key)
30
+ call("DECR", key)
30
31
  end
31
-
32
+
32
33
  # Decrement the integer value of a key by the given number. O(1).
33
- # @see https://redis.io/commands/decrby
34
- # @param key [Key]
35
- # @param decrement [Integer]
34
+ # See <https://redis.io/commands/decrby> for more details.
35
+ # @parameter key [Key]
36
+ # @parameter decrement [Integer]
36
37
  def decrby(key, decrement)
37
- call('DECRBY', key, decrement)
38
+ call("DECRBY", key, decrement)
38
39
  end
39
-
40
+
40
41
  # Get the value of a key. O(1).
41
- # @see https://redis.io/commands/get
42
- # @param key [Key]
42
+ # See <https://redis.io/commands/get> for more details.
43
+ # @parameter key [Key]
43
44
  def get(key)
44
- call('GET', key)
45
+ call("GET", key)
45
46
  end
46
-
47
+
47
48
  # Returns the bit value at offset in the string value stored at key. O(1).
48
- # @see https://redis.io/commands/getbit
49
- # @param key [Key]
50
- # @param offset [Integer]
49
+ # See <https://redis.io/commands/getbit> for more details.
50
+ # @parameter key [Key]
51
+ # @parameter offset [Integer]
51
52
  def getbit(key, offset)
52
- call('GETBIT', key, offset)
53
+ call("GETBIT", key, offset)
53
54
  end
54
-
55
+
55
56
  # Get a substring of the string stored at a key. O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.
56
- # @see https://redis.io/commands/getrange
57
- # @param key [Key]
58
- # @param start [Integer]
59
- # @param end [Integer]
57
+ # See <https://redis.io/commands/getrange> for more details.
58
+ # @parameter key [Key]
59
+ # @parameter start [Integer]
60
+ # @parameter end [Integer]
60
61
  def getrange(key, start_index, end_index)
61
- call('GETRANGE', key, start_index, end_index)
62
+ call("GETRANGE", key, start_index, end_index)
62
63
  end
63
-
64
+
64
65
  # Set the string value of a key and return its old value. O(1).
65
- # @see https://redis.io/commands/getset
66
- # @param key [Key]
67
- # @param value [String]
66
+ # See <https://redis.io/commands/getset> for more details.
67
+ # @parameter key [Key]
68
+ # @parameter value [String]
68
69
  def getset(key, value)
69
- call('GETSET', key, value)
70
+ call("GETSET", key, value)
70
71
  end
71
-
72
+
72
73
  # Increment the integer value of a key by one. O(1).
73
- # @see https://redis.io/commands/incr
74
- # @param key [Key]
74
+ # See <https://redis.io/commands/incr> for more details.
75
+ # @parameter key [Key]
75
76
  def incr(key)
76
- call('INCR', key)
77
+ call("INCR", key)
77
78
  end
78
-
79
+
79
80
  # Increment the integer value of a key by the given amount. O(1).
80
- # @see https://redis.io/commands/incrby
81
- # @param key [Key]
82
- # @param increment [Integer]
81
+ # See <https://redis.io/commands/incrby> for more details.
82
+ # @parameter key [Key]
83
+ # @parameter increment [Integer]
83
84
  def incrby(key, increment)
84
- call('INCRBY', key, increment)
85
+ call("INCRBY", key, increment)
85
86
  end
86
-
87
+
87
88
  # Increment the float value of a key by the given amount. O(1).
88
- # @see https://redis.io/commands/incrbyfloat
89
- # @param key [Key]
90
- # @param increment [Double]
89
+ # See <https://redis.io/commands/incrbyfloat> for more details.
90
+ # @parameter key [Key]
91
+ # @parameter increment [Double]
91
92
  def incrbyfloat(key, increment)
92
- call('INCRBYFLOAT', key, increment)
93
+ call("INCRBYFLOAT", key, increment)
93
94
  end
94
-
95
+
95
96
  # Get the values of all the given keys. O(N) where N is the number of keys to retrieve.
96
- # @see https://redis.io/commands/mget
97
- # @param key [Key]
97
+ # See <https://redis.io/commands/mget> for more details.
98
+ # @parameter key [Key]
98
99
  def mget(key, *keys)
99
- call('MGET', key, *keys)
100
+ call("MGET", key, *keys)
100
101
  end
101
-
102
+
102
103
  # Set multiple keys to multiple values. O(N) where N is the number of keys to set.
103
- # @see https://redis.io/commands/mset
104
+ # See <https://redis.io/commands/mset> for more details.
104
105
  def mset(pairs)
105
- flattened_pairs = pairs.keys.zip(pairs.values).flatten
106
+ if pairs.is_a?(Hash)
107
+ pairs = pairs.to_a.flatten
108
+ end
106
109
 
107
- call('MSET', *flattened_pairs)
110
+ call("MSET", *pairs)
108
111
  end
109
-
112
+
110
113
  # Set multiple keys to multiple values, only if none of the keys exist. O(N) where N is the number of keys to set.
111
- # @see https://redis.io/commands/msetnx
114
+ # See <https://redis.io/commands/msetnx> for more details.
112
115
  def msetnx(pairs)
113
116
  flattened_pairs = pairs.keys.zip(pairs.values).flatten
114
117
 
115
- call('MSETNX', *flattened_pairs)
118
+ call("MSETNX", *flattened_pairs)
116
119
  end
117
-
120
+
118
121
  # Set the value and expiration in milliseconds of a key. O(1).
119
- # @see https://redis.io/commands/psetex
120
- # @param key [Key]
121
- # @param milliseconds [Integer]
122
- # @param value [String]
122
+ # See <https://redis.io/commands/psetex> for more details.
123
+ # @parameter key [Key]
124
+ # @parameter milliseconds [Integer]
125
+ # @parameter value [String]
123
126
  def psetex(key, milliseconds, value)
124
- call('PSETEX', key, milliseconds, value)
127
+ call("PSETEX", key, milliseconds, value)
125
128
  end
126
-
129
+
127
130
  # Set the string value of a key. O(1).
128
- # @see https://redis.io/commands/set
129
- # @param key [Key]
130
- # @param value [String]
131
- # @param expiration [Enum]
132
- # @param update [Boolean, nil] If true, only update elements that already exist (never add elements). If false, don't update existing elements (only add new elements).
131
+ # See <https://redis.io/commands/set> for more details.
132
+ # @parameter key [Key]
133
+ # @parameter value [String]
134
+ # @parameter expiration [Enum]
135
+ # @parameter update [Boolean, nil] If true, only update elements that already exist (never add elements). If false, don't update existing elements (only add new elements).
133
136
  def set(key, value, update: nil, seconds: nil, milliseconds: nil)
134
137
  arguments = []
135
-
138
+
136
139
  if seconds
137
- arguments << 'EX' << seconds
140
+ arguments << "EX" << seconds
138
141
  end
139
-
142
+
140
143
  if milliseconds
141
- arguments << 'PX' << milliseconds
144
+ arguments << "PX" << milliseconds
142
145
  end
143
-
146
+
144
147
  if update == true
145
148
  arguments << "XX"
146
149
  elsif update == false
147
150
  arguments << "NX"
148
151
  end
149
-
150
- call('SET', key, value, *arguments)
152
+
153
+ call("SET", key, value, *arguments)
151
154
  end
152
-
155
+
153
156
  # Sets or clears the bit at offset in the string value stored at key. O(1).
154
- # @see https://redis.io/commands/setbit
155
- # @param key [Key]
156
- # @param offset [Integer]
157
- # @param value [Integer]
157
+ # See <https://redis.io/commands/setbit> for more details.
158
+ # @parameter key [Key]
159
+ # @parameter offset [Integer]
160
+ # @parameter value [Integer]
158
161
  def setbit(key, offset, value)
159
- call('SETBIT', key, offset, value)
162
+ call("SETBIT", key, offset, value)
160
163
  end
161
-
164
+
162
165
  # Set the value and expiration of a key. O(1).
163
- # @see https://redis.io/commands/setex
164
- # @param key [Key]
165
- # @param seconds [Integer]
166
- # @param value [String]
166
+ # See <https://redis.io/commands/setex> for more details.
167
+ # @parameter key [Key]
168
+ # @parameter seconds [Integer]
169
+ # @parameter value [String]
167
170
  def setex(key, seconds, value)
168
- call('SETEX', key, seconds, value)
171
+ call("SETEX", key, seconds, value)
169
172
  end
170
-
173
+
171
174
  # Set the value of a key, only if the key does not exist. O(1).
172
- # @return [Boolean] if the key was set.
173
- # @see https://redis.io/commands/setnx
174
- # @param key [Key]
175
- # @param value [String]
175
+ # @returns [Boolean] if the key was set.
176
+ # See <https://redis.io/commands/setnx> for more details.
177
+ # @parameter key [Key]
178
+ # @parameter value [String]
176
179
  def setnx(key, value)
177
- call('SETNX', key, value) == 1
180
+ call("SETNX", key, value) == 1
178
181
  end
179
-
182
+
180
183
  # Overwrite part of a string at key starting at the specified offset. O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.
181
- # @see https://redis.io/commands/setrange
182
- # @param key [Key]
183
- # @param offset [Integer]
184
- # @param value [String]
184
+ # See <https://redis.io/commands/setrange> for more details.
185
+ # @parameter key [Key]
186
+ # @parameter offset [Integer]
187
+ # @parameter value [String]
185
188
  def setrange(key, offset, value)
186
- call('SETRANGE', key, offset, value)
189
+ call("SETRANGE", key, offset, value)
187
190
  end
188
-
191
+
189
192
  # Get the length of the value stored in a key. O(1).
190
- # @see https://redis.io/commands/strlen
191
- # @param key [Key]
193
+ # See <https://redis.io/commands/strlen> for more details.
194
+ # @parameter key [Key]
192
195
  def strlen(key)
193
- call('STRLEN', key)
196
+ call("STRLEN", key)
194
197
  end
195
198
  end
196
199
  end
@@ -6,27 +6,29 @@
6
6
  # Copyright, 2021, by Daniel Evans.
7
7
  # Copyright, 2023, by Nick Burwell.
8
8
 
9
- require_relative 'methods/generic'
10
- require_relative 'methods/connection'
11
- require_relative 'methods/server'
12
- require_relative 'methods/cluster'
13
- require_relative 'methods/geospatial'
9
+ require_relative "methods/generic"
10
+ require_relative "methods/connection"
11
+ require_relative "methods/server"
12
+ require_relative "methods/cluster"
13
+ require_relative "methods/geospatial"
14
14
 
15
- require_relative 'methods/counting'
15
+ require_relative "methods/counting"
16
16
 
17
- require_relative 'methods/hashes'
18
- require_relative 'methods/lists'
19
- require_relative 'methods/scripting'
20
- require_relative 'methods/sets'
21
- require_relative 'methods/strings'
22
- require_relative 'methods/streams'
23
- require_relative 'methods/sorted_sets'
17
+ require_relative "methods/hashes"
18
+ require_relative "methods/lists"
19
+ require_relative "methods/scripting"
20
+ require_relative "methods/sets"
21
+ require_relative "methods/strings"
22
+ require_relative "methods/streams"
23
+ require_relative "methods/sorted_sets"
24
24
 
25
- require_relative 'methods/pubsub'
25
+ require_relative "methods/pubsub"
26
26
 
27
27
  module Protocol
28
28
  module Redis
29
+ # A collection of methods for interacting with Redis.
29
30
  module Methods
31
+ # Includes all Redis methods into the given class.
30
32
  def self.included(klass)
31
33
  klass.include Methods::Generic
32
34
  klass.include Methods::Connection
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module Redis
8
- VERSION = "0.9.0"
8
+ VERSION = "0.11.0"
9
9
  end
10
10
  end
@@ -3,5 +3,12 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2019-2023, by Samuel Williams.
5
5
 
6
- require_relative 'redis/version'
7
- require_relative 'redis/connection'
6
+ require_relative "redis/version"
7
+ require_relative "redis/connection"
8
+
9
+ # @namespace
10
+ module Protocol
11
+ # @namespace
12
+ module Redis
13
+ end
14
+ end
data/readme.md CHANGED
@@ -4,40 +4,68 @@ Implements the RESP2 and [RESP3](https://github.com/antirez/RESP3) Redis protoco
4
4
 
5
5
  [![Development Status](https://github.com/socketry/protocol-redis/workflows/Test/badge.svg)](https://github.com/socketry/protocol-redis/actions?workflow=Test)
6
6
 
7
- ## Installation
7
+ ## Usage
8
8
 
9
- Add this line to your application's Gemfile:
9
+ Please see the [project documentation](https://socketry.github.io/protocol-redis/) for more details.
10
10
 
11
- ``` ruby
12
- gem 'protocol-redis'
13
- ```
11
+ - [Getting Started](https://socketry.github.io/protocol-redis/guides/getting-started/index) - This guide explains how to use the `Protocol::Redis` gem to implement the RESP2 and RESP3 Redis protocols for low level client and server implementations.
14
12
 
15
- And then execute:
13
+ ## Releases
16
14
 
17
- $ bundle
15
+ Please see the [project releases](https://socketry.github.io/protocol-redis/releases/index) for all releases.
18
16
 
19
- Or install it yourself as:
17
+ ### v0.11.0
20
18
 
21
- $ gem install protocol-redis
19
+ - Introduce cluster methods, including `Strings`, `Streams`, `Scripting` and `Pubsub`.
22
20
 
23
- ## Usage
21
+ ### v0.10.0
22
+
23
+ - Add agent context.
24
+ - 100% documentation and test coverage + minor bug fixes.
25
+
26
+ ### v0.9.0
27
+
28
+ - Add support for `client info` command.
29
+
30
+ ### v0.8.1
31
+
32
+ - Fix HSCAN method implementation.
33
+
34
+ ### v0.8.0
35
+
36
+ - Add missing `hscan` method.
37
+ - Add `mapped_hmget` and `mapped_hmset` methods to match `redis-rb` gem interface.
38
+ - Add cluster methods to client.
39
+ - Make hashes methods compatible with redis-rb.
40
+
41
+ ### v0.7.0
42
+
43
+ - Add scripting methods to client and fix script interface.
44
+ - Include sets and streams in the protocol methods.
45
+ - Add support for essential `exists?` method.
46
+ - Prefer bake-gem for release management.
47
+
48
+ ### v0.6.1
49
+
50
+ - Add support for multi-argument auth.
24
51
 
25
- ``` ruby
26
- sockets = Socket.pair(Socket::PF_UNIX, Socket::SOCK_STREAM)
52
+ ### v0.6.0
27
53
 
28
- client = Protocol::Redis::Connection.new(sockets.first)
29
- server = Protocol::Redis::Connection.new(sockets.last)
54
+ - Add relevant pubsub method group.
30
55
 
31
- client.write_object("Hello World!")
32
- puts server.read_object
33
- # => "Hello World!"
34
- ```
56
+ ### v0.5.1
35
57
 
36
- ## Development
58
+ - Add tests for info command, streams, and string methods.
59
+ - Use correct CRLF constant in server methods.
60
+ - Modernize gem configuration.
37
61
 
38
- Run tests:
62
+ ### v0.5.0
39
63
 
40
- bundle exec bake test
64
+ - Add incomplete implementations of scripting, sets and streams.
65
+ - Merge existing sorted set implementations.
66
+ - Add `zrangebyscore` method.
67
+ - Improve argument management.
68
+ - Modernize testing infrastructure.
41
69
 
42
70
  ## Contributing
43
71