protocol-redis 0.8.1 → 0.10.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.
@@ -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,192 @@
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
106
  flattened_pairs = pairs.keys.zip(pairs.values).flatten
106
107
 
107
- call('MSET', *flattened_pairs)
108
+ call("MSET", *flattened_pairs)
108
109
  end
109
-
110
+
110
111
  # 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
112
+ # See <https://redis.io/commands/msetnx> for more details.
112
113
  def msetnx(pairs)
113
114
  flattened_pairs = pairs.keys.zip(pairs.values).flatten
114
115
 
115
- call('MSETNX', *flattened_pairs)
116
+ call("MSETNX", *flattened_pairs)
116
117
  end
117
-
118
+
118
119
  # 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]
120
+ # See <https://redis.io/commands/psetex> for more details.
121
+ # @parameter key [Key]
122
+ # @parameter milliseconds [Integer]
123
+ # @parameter value [String]
123
124
  def psetex(key, milliseconds, value)
124
- call('PSETEX', key, milliseconds, value)
125
+ call("PSETEX", key, milliseconds, value)
125
126
  end
126
-
127
+
127
128
  # 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).
129
+ # See <https://redis.io/commands/set> for more details.
130
+ # @parameter key [Key]
131
+ # @parameter value [String]
132
+ # @parameter expiration [Enum]
133
+ # @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
134
  def set(key, value, update: nil, seconds: nil, milliseconds: nil)
134
135
  arguments = []
135
-
136
+
136
137
  if seconds
137
- arguments << 'EX' << seconds
138
+ arguments << "EX" << seconds
138
139
  end
139
-
140
+
140
141
  if milliseconds
141
- arguments << 'PX' << milliseconds
142
+ arguments << "PX" << milliseconds
142
143
  end
143
-
144
+
144
145
  if update == true
145
146
  arguments << "XX"
146
147
  elsif update == false
147
148
  arguments << "NX"
148
149
  end
149
-
150
- call('SET', key, value, *arguments)
150
+
151
+ call("SET", key, value, *arguments)
151
152
  end
152
-
153
+
153
154
  # 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]
155
+ # See <https://redis.io/commands/setbit> for more details.
156
+ # @parameter key [Key]
157
+ # @parameter offset [Integer]
158
+ # @parameter value [Integer]
158
159
  def setbit(key, offset, value)
159
- call('SETBIT', key, offset, value)
160
+ call("SETBIT", key, offset, value)
160
161
  end
161
-
162
+
162
163
  # 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]
164
+ # See <https://redis.io/commands/setex> for more details.
165
+ # @parameter key [Key]
166
+ # @parameter seconds [Integer]
167
+ # @parameter value [String]
167
168
  def setex(key, seconds, value)
168
- call('SETEX', key, seconds, value)
169
+ call("SETEX", key, seconds, value)
169
170
  end
170
-
171
+
171
172
  # 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]
173
+ # @returns [Boolean] if the key was set.
174
+ # See <https://redis.io/commands/setnx> for more details.
175
+ # @parameter key [Key]
176
+ # @parameter value [String]
176
177
  def setnx(key, value)
177
- call('SETNX', key, value) == 1
178
+ call("SETNX", key, value) == 1
178
179
  end
179
-
180
+
180
181
  # 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]
182
+ # See <https://redis.io/commands/setrange> for more details.
183
+ # @parameter key [Key]
184
+ # @parameter offset [Integer]
185
+ # @parameter value [String]
185
186
  def setrange(key, offset, value)
186
- call('SETRANGE', key, offset, value)
187
+ call("SETRANGE", key, offset, value)
187
188
  end
188
-
189
+
189
190
  # Get the length of the value stored in a key. O(1).
190
- # @see https://redis.io/commands/strlen
191
- # @param key [Key]
191
+ # See <https://redis.io/commands/strlen> for more details.
192
+ # @parameter key [Key]
192
193
  def strlen(key)
193
- call('STRLEN', key)
194
+ call("STRLEN", key)
194
195
  end
195
196
  end
196
197
  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
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
6
  module Protocol
7
7
  module Redis
8
- VERSION = "0.8.1"
8
+ VERSION = "0.10.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/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2019-2023, by Samuel Williams.
3
+ Copyright, 2019-2024, by Samuel Williams.
4
4
  Copyright, 2020, by Olle Jonsson.
5
5
  Copyright, 2020, by Salim Semaoune.
6
6
  Copyright, 2020, by Dimitry Chopey.
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.10.0
20
18
 
21
- $ gem install protocol-redis
19
+ - Add agent context.
20
+ - 100% documentation and test coverage + minor bug fixes.
22
21
 
23
- ## Usage
22
+ ### v0.9.0
23
+
24
+ - Add support for `client info` command.
25
+
26
+ ### v0.8.1
27
+
28
+ - Fix HSCAN method implementation.
29
+
30
+ ### v0.8.0
31
+
32
+ - Add missing `hscan` method.
33
+ - Add `mapped_hmget` and `mapped_hmset` methods to match `redis-rb` gem interface.
34
+ - Add cluster methods to client.
35
+ - Make hashes methods compatible with redis-rb.
36
+
37
+ ### v0.7.0
38
+
39
+ - Add scripting methods to client and fix script interface.
40
+ - Include sets and streams in the protocol methods.
41
+ - Add support for essential `exists?` method.
42
+ - Prefer bake-gem for release management.
24
43
 
25
- ``` ruby
26
- sockets = Socket.pair(Socket::PF_UNIX, Socket::SOCK_STREAM)
44
+ ### v0.6.1
27
45
 
28
- client = Protocol::Redis::Connection.new(sockets.first)
29
- server = Protocol::Redis::Connection.new(sockets.last)
46
+ - Add support for multi-argument auth.
30
47
 
31
- client.write_object("Hello World!")
32
- puts server.read_object
33
- # => "Hello World!"
34
- ```
48
+ ### v0.6.0
35
49
 
36
- ## Development
50
+ - Add relevant pubsub method group.
37
51
 
38
- Run tests:
52
+ ### v0.5.1
39
53
 
40
- bundle exec bake test
54
+ - Add tests for info command, streams, and string methods.
55
+ - Use correct CRLF constant in server methods.
56
+ - Modernize gem configuration.
57
+
58
+ ### v0.5.0
59
+
60
+ - Add incomplete implementations of scripting, sets and streams.
61
+ - Merge existing sorted set implementations.
62
+ - Add `zrangebyscore` method.
63
+ - Improve argument management.
64
+ - Modernize testing infrastructure.
65
+
66
+ ### v0.4.2
67
+
68
+ - Prefer implicit returns and improve return value for `setnx`.
41
69
 
42
70
  ## Contributing
43
71
 
@@ -48,3 +76,11 @@ We welcome contributions to this project.
48
76
  3. Commit your changes (`git commit -am 'Add some feature'`).
49
77
  4. Push to the branch (`git push origin my-new-feature`).
50
78
  5. Create new Pull Request.
79
+
80
+ ### Developer Certificate of Origin
81
+
82
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
83
+
84
+ ### Community Guidelines
85
+
86
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.