ultra-smart-kit 0.0.1

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3b0d3c414f46b902af393d89fad5db090cd17fe7de1a34aae4e7f3d71e3a756e
4
+ data.tar.gz: 24ce73f6140f4a57ab95917242fdc015efa7eba8a421bc45ac45edcbb2df6825
5
+ SHA512:
6
+ metadata.gz: 9f2bcda631f676e6d824dce3a3f6d7b626c623c079c023958cec872f019daab35d35419daf8bdbe995b7986e28ba3c334271ac274a3042961c894022429c32ab
7
+ data.tar.gz: bd8eabd888d3e95848951940b6084552adc192040c2bc7e0f52e1a2399627b677ac86b356bb87967699fc29ceb434268c41d70b5510b87399753f9bdf69e19cd
@@ -0,0 +1,693 @@
1
+ # Unreleased
2
+
3
+ # 5.4.1
4
+
5
+ - Properly handle NOSCRIPT errors.
6
+
7
+ # 5.4.0
8
+
9
+ - Fix `blmpop` method to actually use `BLMPOP`, it was mistakenly issuing `LMPOP` commands.
10
+ - `xadd` now accepts a `minid:` argument.
11
+ - `zrank` and `zrevrank` now accepts `with_score:` argument.
12
+ - `Redis#call` now accept a block, allowing to use `Redis` instances where `RedisClient` is expected.
13
+
14
+ # 5.3.0
15
+
16
+ - Fix the return type of `hgetall` when used inside a `multi` transaction which is itself inside a pipeline.
17
+
18
+ # 5.2.0
19
+
20
+ - Now require Ruby 2.6 because `redis-client` does.
21
+ - Eagerly close subscribed connection when using `subscribe_with_timeout`. See #1259.
22
+ - Add `exception` flag in `pipelined` allowing failed commands to be returned in the result array when set to `false`.
23
+
24
+ # 5.1.0
25
+
26
+ - `multi` now accept a `watch` keyword argument like `redis-client`. See #1236.
27
+ - `bitcount` and `bitpos` now accept a `scale:` argument on Redis 7+. See #1242
28
+ - Added `expiretime` and `pexpiretime`. See #1248.
29
+
30
+ # 5.0.8
31
+
32
+ - Fix `Redis#without_reconnect` for sentinel clients. Fix #1212.
33
+ - Add `sentinel_username`, `sentinel_password` for sentinel clients. Bump `redis-client` to `>=0.17.0`. See #1213
34
+
35
+ # 5.0.7
36
+
37
+ - Fix compatibility with `redis-client 0.15.0` when using Redis Sentinel. Fix #1209.
38
+
39
+ # 5.0.6
40
+
41
+ - Wait for an extra `config.read_timeout` in blocking commands rather than an arbitrary 100ms. See #1175.
42
+ - Treat ReadOnlyError as ConnectionError. See #1168.
43
+
44
+ # 5.0.5
45
+
46
+ - Fix automatic disconnection when the process was forked. See #1157.
47
+
48
+ # 5.0.4
49
+
50
+ - Cast `ttl` argument to integer in `expire`, `setex` and a few others.
51
+
52
+ # 5.0.3
53
+
54
+ - Add `OutOfMemoryError` as a subclass of `CommandError`
55
+
56
+ # 5.0.2
57
+
58
+ - Fix `Redis#close` to properly reset the fork protection check.
59
+
60
+ # 5.0.1
61
+
62
+ - Added a fake `Redis::Connections.drivers` method to be compatible with older sidekiq versions.
63
+
64
+ # 5.0.0
65
+
66
+ - Default client timeout decreased from 5 seconds to 1 second.
67
+ - Eagerly and strictly cast Integer and Float parameters.
68
+ - Allow to call `subscribe`, `unsubscribe`, `psubscribe` and `punsubscribe` from a subscribed client. See #1131.
69
+ - Use `MD5` for hashing server nodes in `Redis::Distributed`. This should improve keys distribution among servers. See #1089.
70
+ - Changed `sadd` and `srem` to now always return an Integer.
71
+ - Added `sadd?` and `srem?` which always return a Boolean.
72
+ - Added support for `IDLE` paramter in `xpending`.
73
+ - Cluster support has been moved to a `redis-clustering` companion gem.
74
+ - `select` no longer record the current database. If the client has to reconnect after `select` was used, it will reconnect to the original database.
75
+ - Better support Float timeout in blocking commands. See #977.
76
+ - `Redis.new` will now raise an error if provided unknown options.
77
+ - Removed positional timeout in blocking commands (`BLPOP`, etc). Timeout now must be passed as an option: `r.blpop("key", timeout: 2.5)`
78
+ - Removed `logger` option.
79
+ - Removed `reconnect_delay_max` and `reconnect_delay`, you can pass precise sleep durations to `reconnect_attempts` instead.
80
+ - Require Ruby 2.5+.
81
+ - Removed the deprecated `queue` and `commit` methods. Use `pipelined` instead.
82
+ - Removed the deprecated `Redis::Future#==`.
83
+ - Removed the deprecated `pipelined` and `multi` signature. Commands now MUST be called on the block argument, not the original redis instance.
84
+ - Removed `Redis.current`. You shouldn't assume there is a single global Redis connection, use a connection pool instead,
85
+ and libaries using Redis should accept a Redis instance (or connection pool) as a config. E.g. `MyLibrary.redis = Redis.new(...)`.
86
+ - Removed the `synchrony` driver.
87
+ - Removed `Redis.exists_returns_integer`, it's now always enabled.
88
+
89
+ # 4.8.1
90
+
91
+ * Automatically reconnect after fork regardless of `reconnect_attempts`
92
+
93
+ # 4.8.0
94
+
95
+ * Introduce `sadd?` and `srem?` as boolean returning versions of `sadd` and `srem`.
96
+ * Deprecate `sadd` and `srem` returning a boolean when called with a single argument.
97
+ To enable the redis 5.0 behavior you can set `Redis.sadd_returns_boolean = false`.
98
+ * Deprecate passing `timeout` as a positional argument in blocking commands (`brpop`, `blop`, etc).
99
+
100
+ # 4.7.1
101
+
102
+ * Gracefully handle OpenSSL 3.0 EOF Errors (`OpenSSL::SSL::SSLError: SSL_read: unexpected eof while reading`). See #1106
103
+ This happens frequently on heroku-22.
104
+
105
+ # 4.7.0
106
+
107
+ * Support single endpoint architecture with SSL/TLS in cluster mode. See #1086.
108
+ * `zrem` and `zadd` act as noop when provided an empty list of keys. See #1097.
109
+ * Support IPv6 URLs.
110
+ * Add `Redis#with` for better compatibility with `connection_pool` usage.
111
+ * Fix the block form of `multi` called inside `pipelined`. Previously the `MUTLI/EXEC` wouldn't be sent. See #1073.
112
+
113
+ # 4.6.0
114
+
115
+ * Deprecate `Redis.current`.
116
+ * Deprecate calling commands on `Redis` inside `Redis#pipelined`. See #1059.
117
+ ```ruby
118
+ redis.pipelined do
119
+ redis.get("key")
120
+ end
121
+ ```
122
+
123
+ should be replaced by:
124
+
125
+ ```ruby
126
+ redis.pipelined do |pipeline|
127
+ pipeline.get("key")
128
+ end
129
+ ```
130
+ * Deprecate calling commands on `Redis` inside `Redis#multi`. See #1059.
131
+ ```ruby
132
+ redis.multi do
133
+ redis.get("key")
134
+ end
135
+ ```
136
+
137
+ should be replaced by:
138
+
139
+ ```ruby
140
+ redis.multi do |transaction|
141
+ transaction.get("key")
142
+ end
143
+ ```
144
+ * Deprecate `Redis#queue` and `Redis#commit`. See #1059.
145
+
146
+ * Fix `zpopmax` and `zpopmin` when called inside a pipeline. See #1055.
147
+ * `Redis#synchronize` is now private like it should always have been.
148
+
149
+ * Add `Redis.silence_deprecations=` to turn off deprecation warnings.
150
+ If you don't wish to see warnings yet, you can set `Redis.silence_deprecations = true`.
151
+ It is however heavily recommended to fix them instead when possible.
152
+ * Add `Redis.raise_deprecations=` to turn deprecation warnings into errors.
153
+ This makes it easier to identitify the source of deprecated APIs usage.
154
+ It is recommended to set `Redis.raise_deprecations = true` in development and test environments.
155
+ * Add new options to ZRANGE. See #1053.
156
+ * Add ZRANGESTORE command. See #1053.
157
+ * Add SCAN support for `Redis::Cluster`. See #1049.
158
+ * Add COPY command. See #1053. See #1048.
159
+ * Add ZDIFFSTORE command. See #1046.
160
+ * Add ZDIFF command. See #1044.
161
+ * Add ZUNION command. See #1042.
162
+ * Add HRANDFIELD command. See #1040.
163
+
164
+ # 4.5.1
165
+
166
+ * Restore the accidential auth behavior of redis-rb 4.3.0 with a warning. If provided with the `default` user's password, but a wrong username,
167
+ redis-rb will first try to connect as the provided user, but then will fallback to connect as the `default` user with the provided password.
168
+ This behavior is deprecated and will be removed in Redis 4.6.0. Fix #1038.
169
+
170
+ # 4.5.0
171
+
172
+ * Handle parts of the command using incompatible encodings. See #1037.
173
+ * Add GET option to SET command. See #1036.
174
+ * Add ZRANDMEMBER command. See #1035.
175
+ * Add LMOVE/BLMOVE commands. See #1034.
176
+ * Add ZMSCORE command. See #1032.
177
+ * Add LT/GT options to ZADD. See #1033.
178
+ * Add SMISMEMBER command. See #1031.
179
+ * Add EXAT/PXAT options to SET. See #1028.
180
+ * Add GETDEL/GETEX commands. See #1024.
181
+ * `Redis#exists` now returns an Integer by default, as warned since 4.2.0. The old behavior can be restored with `Redis.exists_returns_integer = false`.
182
+ * Fix Redis < 6 detection during connect. See #1025.
183
+ * Fix fetching command details in Redis cluster when the first node is unhealthy. See #1026.
184
+
185
+ # 4.4.0
186
+
187
+ * Redis cluster: fix cross-slot validation in pipelines. Fix ##1019.
188
+ * Add support for `XAUTOCLAIM`. See #1018.
189
+ * Properly issue `READONLY` when reconnecting to replicas. Fix #1017.
190
+ * Make `del` a noop if passed an empty list of keys. See #998.
191
+ * Add support for `ZINTER`. See #995.
192
+
193
+ # 4.3.1
194
+
195
+ * Fix password authentication against redis server 5 and older.
196
+
197
+ # 4.3.0
198
+
199
+ * Add the TYPE argument to scan and scan_each. See #985.
200
+ * Support AUTH command for ACL. See #967.
201
+
202
+ # 4.2.5
203
+
204
+ * Optimize the ruby connector write buffering. See #964.
205
+
206
+ # 4.2.4
207
+
208
+ * Fix bytesize calculations in the ruby connector, and work on a copy of the buffer. Fix #961, #962.
209
+
210
+ # 4.2.3
211
+
212
+ * Use io/wait instead of IO.select in the ruby connector. See #960.
213
+ * Use exception free non blocking IOs in the ruby connector. See #926.
214
+ * Prevent corruption of the client when an interrupt happen during inside a pipeline block. See #945.
215
+
216
+ # 4.2.2
217
+
218
+ * Fix `WATCH` support for `Redis::Distributed`. See #941.
219
+ * Fix handling of empty stream responses. See #905, #929.
220
+
221
+ # 4.2.1
222
+
223
+ * Fix `exists?` returning an actual boolean when called with multiple keys. See #918.
224
+ * Setting `Redis.exists_returns_integer = false` disables warning message about new behaviour. See #920.
225
+
226
+ # 4.2.0
227
+
228
+ * Convert commands to accept keyword arguments rather than option hashes. This both help catching typos, and reduce needless allocations.
229
+ * Deprecate the synchrony driver. It will be removed in 5.0 and hopefully maintained as a separate gem. See #915.
230
+ * Make `Redis#exists` variadic, will return an Integer if called with multiple keys.
231
+ * Add `Redis#exists?` to get a Boolean if any of the keys exists.
232
+ * `Redis#exists` when called with a single key will warn that future versions will return an Integer.
233
+ Set `Redis.exists_returns_integer = true` to opt-in to the new behavior.
234
+ * Support `keepttl` ooption in `set`. See #913.
235
+ * Optimized initialization of Redis::Cluster. See #912.
236
+ * Accept sentinel options even with string key. See #599.
237
+ * Verify TLS connections by default. See #900.
238
+ * Make `Redis#hset` variadic. It now returns an integer, not a boolean. See #910.
239
+
240
+ # 4.1.4
241
+
242
+ * Alias `Redis#disconnect` as `#close`. See #901.
243
+ * Handle clusters with multiple slot ranges. See #894.
244
+ * Fix password authentication to a redis cluster. See #889.
245
+ * Handle recursive MOVED responses. See #882.
246
+ * Increase buffer size in the ruby connector. See #880.
247
+ * Fix thread safety of `Redis.queue`. See #878.
248
+ * Deprecate `Redis::Future#==` as it's likely to be a mistake. See #876.
249
+ * Support `KEEPTTL` option for SET command. See #913.
250
+
251
+ # 4.1.3
252
+
253
+ * Fix the client hanging forever when connecting with SSL to a non-SSL server. See #835.
254
+
255
+ # 4.1.2
256
+
257
+ * Fix several authentication problems with sentinel. See #850 and #856.
258
+ * Explicitly drop Ruby 2.2 support.
259
+
260
+
261
+ # 4.1.1
262
+
263
+ * Fix error handling in multi blocks. See #754.
264
+ * Fix geoadd to accept arrays like georadius and georadiusbymember. See #841.
265
+ * Fix georadius command failing when long == lat. See #841.
266
+ * Fix timeout error in xread block: 0. See #837.
267
+ * Fix incompatibility issue with redis-objects. See #834.
268
+ * Properly handle Errno::EADDRNOTAVAIL on connect.
269
+ * Fix password authentication to sentinel instances. See #813.
270
+
271
+ # 4.1.0
272
+
273
+ * Add Redis Cluster support. See #716.
274
+ * Add streams support. See #799 and #811.
275
+ * Add ZPOP* support. See #812.
276
+ * Fix issues with integer-like objects as BPOP timeout
277
+
278
+ # 4.0.3
279
+
280
+ * Fix raising command error for first command in pipeline. See #788.
281
+ * Fix the gemspec to stop exposing a `build` executable. See #785.
282
+ * Add `:reconnect_delay` and `:reconnect_delay_max` options. See #778.
283
+
284
+ # 4.0.2
285
+
286
+ * Added `Redis#unlink`. See #766.
287
+
288
+ * `Redis.new` now accept a custom connector via `:connector`. See #591.
289
+
290
+ * `Redis#multi` no longer perform empty transactions. See #747.
291
+
292
+ * `Redis#hdel` now accepts hash keys as multiple arguments like `#del`. See #755.
293
+
294
+ * Allow to skip SSL verification. See #745.
295
+
296
+ * Add Geo commands: `geoadd`, `geohash`, `georadius`, `georadiusbymember`, `geopos`, `geodist`. See #730.
297
+
298
+ # 4.0.1
299
+
300
+ * `Redis::Distributed` now supports `mget` and `mapped_mget`. See #687.
301
+
302
+ * `Redis::Distributed` now supports `sscan` and `sscan_each`. See #572.
303
+
304
+ * `Redis#connection` returns a hash with connection information.
305
+ You shouldn't need to call `Redis#_client`, ever.
306
+
307
+ * `Redis#flushdb` and `Redis#flushall` now support the `:async` option. See #706.
308
+
309
+
310
+ # 4.0
311
+
312
+ * Removed `Redis.connect`. Use `Redis.new`.
313
+
314
+ * Removed `Redis#[]` and `Redis#[]=` aliases.
315
+
316
+ * Added support for `CLIENT` commands. The lower-level client can be
317
+ accessed via `Redis#_client`.
318
+
319
+ * Dropped official support for Ruby < 2.2.2.
320
+
321
+ # 3.3.5
322
+
323
+ * Fixed Ruby 1.8 compatibility after backporting `Redis#connection`. See #719.
324
+
325
+ # 3.3.4 (yanked)
326
+
327
+ * `Redis#connection` returns a hash with connection information.
328
+ You shouldn't need to call `Redis#_client`, ever.
329
+
330
+ # 3.3.3
331
+
332
+ * Improved timeout handling after dropping Timeout module.
333
+
334
+ # 3.3.2
335
+
336
+ * Added support for `SPOP` with COUNT. See #628.
337
+
338
+ * Fixed connection glitches when using SSL. See #644.
339
+
340
+ # 3.3.1
341
+
342
+ * Remove usage of Timeout::timeout, refactor into using low level non-blocking writes.
343
+ This fixes a memory leak due to Timeout creating threads on each invocation.
344
+
345
+ # 3.3.0
346
+
347
+ * Added support for SSL/TLS. Redis doesn't support SSL natively, so you still
348
+ need to run a terminating proxy on Redis' side. See #496.
349
+
350
+ * Added `read_timeout` and `write_timeout` options. See #437, #482.
351
+
352
+ * Added support for pub/sub with timeouts. See #329.
353
+
354
+ * Added `Redis#call`, `Redis#queue` and `Redis#commit` as a more minimal API to
355
+ the client.
356
+
357
+ * Deprecated `Redis#disconnect!` in favor of `Redis#close`.
358
+
359
+ # 3.2.2
360
+
361
+ * Added support for `ZADD` options `NX`, `XX`, `CH`, `INCR`. See #547.
362
+
363
+ * Added support for sentinel commands. See #556.
364
+
365
+ * New `:id` option allows you to identify the client against Redis. See #510.
366
+
367
+ * `Redis::Distributed` will raise when adding two nodes with the same ID.
368
+ See #354.
369
+
370
+ # 3.2.1
371
+
372
+ * Added support for `PUBSUB` command.
373
+
374
+ * More low-level socket errors are now raised as `CannotConnectError`.
375
+
376
+ * Added `:connect_timeout` option.
377
+
378
+ * Added support for `:limit` option for `ZREVRANGEBYLEX`.
379
+
380
+ * Fixed an issue where connections become inconsistent when using Ruby's
381
+ Timeout module outside of the client (see #501, #502).
382
+
383
+ * Added `Redis#disconnect!` as a public-API way of disconnecting the client
384
+ (without needing to use `QUIT`). See #506.
385
+
386
+ * Fixed Sentinel support with Hiredis.
387
+
388
+ * Fixed Sentinel support when using authentication and databases.
389
+
390
+ * Improved resilience when trying to contact sentinels.
391
+
392
+ # 3.2.0
393
+
394
+ * Redis Sentinel support.
395
+
396
+ # 3.1.0
397
+
398
+ * Added debug log sanitization (#428).
399
+
400
+ * Added support for HyperLogLog commands (Redis 2.8.9, #432).
401
+
402
+ * Added support for `BITPOS` command (Redis 2.9.11, #412).
403
+
404
+ * The client will now automatically reconnect after a fork (#414).
405
+
406
+ * If you want to disable the fork-safety check and prefer to share the
407
+ connection across child processes, you can now pass the `inherit_socket`
408
+ option (#409).
409
+
410
+ * If you want the client to attempt to reconnect more than once, you can now
411
+ pass the `reconnect_attempts` option (#347)
412
+
413
+ # 3.0.7
414
+
415
+ * Added method `Redis#dup` to duplicate a Redis connection.
416
+
417
+ * IPv6 support.
418
+
419
+ # 3.0.6
420
+
421
+ * Added support for `SCAN` and variants.
422
+
423
+ # 3.0.5
424
+
425
+ * Fix calling #select from a pipeline (#309).
426
+
427
+ * Added method `Redis#connected?`.
428
+
429
+ * Added support for `MIGRATE` (Redis 2.6).
430
+
431
+ * Support extended SET command (#343, thanks to @benubois).
432
+
433
+ # 3.0.4
434
+
435
+ * Ensure #watch without a block returns "OK" (#332).
436
+
437
+ * Make futures identifiable (#330).
438
+
439
+ * Fix an issue preventing STORE in a SORT with multiple GETs (#328).
440
+
441
+ # 3.0.3
442
+
443
+ * Blocking list commands (`BLPOP`, `BRPOP`, `BRPOPLPUSH`) use a socket
444
+ timeout equal to the sum of the command's timeout and the Redis
445
+ client's timeout, instead of disabling socket timeout altogether.
446
+
447
+ * Ruby 2.0 compatibility.
448
+
449
+ * Added support for `DUMP` and `RESTORE` (Redis 2.6).
450
+
451
+ * Added support for `BITCOUNT` and `BITOP` (Redis 2.6).
452
+
453
+ * Call `#to_s` on value argument for `SET`, `SETEX`, `PSETEX`, `GETSET`,
454
+ `SETNX`, and `SETRANGE`.
455
+
456
+ # 3.0.2
457
+
458
+ * Unescape CGI escaped password in URL.
459
+
460
+ * Fix test to check availability of `UNIXSocket`.
461
+
462
+ * Fix handling of score = +/- infinity for sorted set commands.
463
+
464
+ * Replace array splats with concatenation where possible.
465
+
466
+ * Raise if `EXEC` returns an error.
467
+
468
+ * Passing a nil value in options hash no longer overwrites the default.
469
+
470
+ * Allow string keys in options hash passed to `Redis.new` or
471
+ `Redis.connect`.
472
+
473
+ * Fix uncaught error triggering unrelated error (synchrony driver).
474
+
475
+ See f7ffd5f1a628029691084de69e5b46699bb8b96d and #248.
476
+
477
+ # 3.0.1
478
+
479
+ * Fix reconnect logic not kicking in on a write error.
480
+
481
+ See 427dbd52928af452f35aa0a57b621bee56cdcb18 and #238.
482
+
483
+ # 3.0.0
484
+
485
+ ### Upgrading from 2.x to 3.0
486
+
487
+ The following items are the most important changes to review when
488
+ upgrading from redis-rb 2.x. A full list of changes can be found below.
489
+
490
+ * The methods for the following commands have changed the arguments they
491
+ take, their return value, or both.
492
+
493
+ * `BLPOP`, `BRPOP`, `BRPOPLPUSH`
494
+ * `SORT`
495
+ * `MSETNX`
496
+ * `ZRANGE`, `ZREVRANGE`, `ZRANGEBYSCORE`, `ZREVRANGEBYSCORE`
497
+ * `ZINCRBY`, `ZSCORE`
498
+
499
+ * The return value from `#pipelined` and `#multi` no longer contains
500
+ unprocessed replies, but the same replies that would be returned if
501
+ the command had not been executed in these blocks.
502
+
503
+ * The client raises custom errors on connection errors, instead of
504
+ `RuntimeError` and errors in the `Errno` family.
505
+
506
+ ### Changes
507
+
508
+ * Added support for scripting commands (Redis 2.6).
509
+
510
+ Scripts can be executed using `#eval` and `#evalsha`. Both can
511
+ commands can either take two arrays to specify `KEYS` and `ARGV`, or
512
+ take a hash containing `:keys` and `:argv` to specify `KEYS` and
513
+ `ARGV`.
514
+
515
+ ```ruby
516
+ redis.eval("return ARGV[1] * ARGV[2]", :argv => [2, 3])
517
+ # => 6
518
+ ```
519
+
520
+ Subcommands of the `SCRIPT` command can be executed via the
521
+ `#script` method.
522
+
523
+ For example:
524
+
525
+ ```ruby
526
+ redis.script(:load, "return ARGV[1] * ARGV[2]")
527
+ # => "58db5d365a1922f32e7aa717722141ea9c2b0cf3"
528
+ redis.script(:exists, "58db5d365a1922f32e7aa717722141ea9c2b0cf3")
529
+ # => true
530
+ redis.script(:flush)
531
+ # => "OK"
532
+ ```
533
+
534
+ * The repository now lives at [https://github.com/redis/redis-rb](https://github.com/redis/redis-rb).
535
+ Thanks, Ezra!
536
+
537
+ * Added support for `PEXPIRE`, `PEXPIREAT`, `PTTL`, `PSETEX`,
538
+ `INCRYBYFLOAT`, `HINCRYBYFLOAT` and `TIME` (Redis 2.6).
539
+
540
+ * `Redis.current` is now thread unsafe, because the client itself is thread safe.
541
+
542
+ In the future you'll be able to do something like:
543
+
544
+ ```ruby
545
+ Redis.current = Redis::Pool.connect
546
+ ```
547
+
548
+ This makes `Redis.current` actually usable in multi-threaded environments,
549
+ while not affecting those running a single thread.
550
+
551
+ * Change API for `BLPOP`, `BRPOP` and `BRPOPLPUSH`.
552
+
553
+ Both `BLPOP` and `BRPOP` now take a single argument equal to a
554
+ string key, or an array with string keys, followed by an optional
555
+ hash with a `:timeout` key. When not specified, the timeout defaults
556
+ to `0` to not time out.
557
+
558
+ ```ruby
559
+ redis.blpop(["list1", "list2"], :timeout => 1.0)
560
+ ```
561
+
562
+ `BRPOPLPUSH` also takes an optional hash with a `:timeout` key as
563
+ last argument for consistency. When not specified, the timeout
564
+ defaults to `0` to not time out.
565
+
566
+ ```ruby
567
+ redis.brpoplpush("some_list", "another_list", :timeout => 1.0)
568
+ ```
569
+
570
+ * When `SORT` is passed multiple key patterns to get via the `:get`
571
+ option, it now returns an array per result element, holding all `GET`
572
+ substitutions.
573
+
574
+ * The `MSETNX` command now returns a boolean.
575
+
576
+ * The `ZRANGE`, `ZREVRANGE`, `ZRANGEBYSCORE` and `ZREVRANGEBYSCORE` commands
577
+ now return an array containing `[String, Float]` pairs when
578
+ `:with_scores => true` is passed.
579
+
580
+ For example:
581
+
582
+ ```ruby
583
+ redis.zrange("zset", 0, -1, :with_scores => true)
584
+ # => [["foo", 1.0], ["bar", 2.0]]
585
+ ```
586
+
587
+ * The `ZINCRBY` and `ZSCORE` commands now return a `Float` score instead
588
+ of a string holding a representation of the score.
589
+
590
+ * The client now raises custom exceptions where it makes sense.
591
+
592
+ If by any chance you were rescuing low-level exceptions (`Errno::*`),
593
+ you should now rescue as follows:
594
+
595
+ Errno::ECONNRESET -> Redis::ConnectionError
596
+ Errno::EPIPE -> Redis::ConnectionError
597
+ Errno::ECONNABORTED -> Redis::ConnectionError
598
+ Errno::EBADF -> Redis::ConnectionError
599
+ Errno::EINVAL -> Redis::ConnectionError
600
+ Errno::EAGAIN -> Redis::TimeoutError
601
+ Errno::ECONNREFUSED -> Redis::CannotConnectError
602
+
603
+ * Always raise exceptions originating from erroneous command invocation
604
+ inside pipelines and MULTI/EXEC blocks.
605
+
606
+ The old behavior (swallowing exceptions) could cause application bugs
607
+ to go unnoticed.
608
+
609
+ * Implement futures for assigning values inside pipelines and MULTI/EXEC
610
+ blocks. Futures are assigned their value after the pipeline or
611
+ MULTI/EXEC block has executed.
612
+
613
+ ```ruby
614
+ $redis.pipelined do
615
+ @future = $redis.get "key"
616
+ end
617
+
618
+ puts @future.value
619
+ ```
620
+
621
+ * Ruby 1.8.6 is officially not supported.
622
+
623
+ * Support `ZCOUNT` in `Redis::Distributed` (Michael Dungan).
624
+
625
+ * Pipelined commands now return the same replies as when called outside
626
+ a pipeline.
627
+
628
+ In the past, pipelined replies were returned without post-processing.
629
+
630
+ * Support `SLOWLOG` command (Michael Bernstein).
631
+
632
+ * Calling `SHUTDOWN` effectively disconnects the client (Stefan Kaes).
633
+
634
+ * Basic support for mapping commands so that they can be renamed on the
635
+ server.
636
+
637
+ * Connecting using a URL now checks that a host is given.
638
+
639
+ It's just a small sanity check, cf. #126
640
+
641
+ * Support variadic commands introduced in Redis 2.4.
642
+
643
+ # 2.2.2
644
+
645
+ * Added method `Redis::Distributed#hsetnx`.
646
+
647
+ # 2.2.1
648
+
649
+ * Internal API: Client#call and family are now called with a single array
650
+ argument, since splatting a large number of arguments (100K+) results in a
651
+ stack overflow on 1.9.2.
652
+
653
+ * The `INFO` command can optionally take a subcommand. When the subcommand is
654
+ `COMMANDSTATS`, the client will properly format the returned statistics per
655
+ command. Subcommands for `INFO` are available since Redis v2.3.0 (unstable).
656
+
657
+ * Change `IO#syswrite` back to the buffered `IO#write` since some Rubies do
658
+ short writes for large (1MB+) buffers and some don't (see issue #108).
659
+
660
+ # 2.2.0
661
+
662
+ * Added method `Redis#without_reconnect` that ensures the client will not try
663
+ to reconnect when running the code inside the specified block.
664
+
665
+ * Thread-safe by default. Thread safety can be explicitly disabled by passing
666
+ `:thread_safe => false` as argument.
667
+
668
+ * Commands called inside a MULTI/EXEC no longer raise error replies, since a
669
+ successful EXEC means the commands inside the block were executed.
670
+
671
+ * MULTI/EXEC blocks are pipelined.
672
+
673
+ * Don't disconnect on error replies.
674
+
675
+ * Use `IO#syswrite` instead of `IO#write` because write buffering is not
676
+ necessary.
677
+
678
+ * Connect to a unix socket by passing the `:path` option as argument.
679
+
680
+ * The timeout value is coerced into a float, allowing sub-second timeouts.
681
+
682
+ * Accept both `:with_scores` _and_ `:withscores` as argument to sorted set
683
+ commands.
684
+
685
+ * Use [hiredis](https://github.com/pietern/hiredis-rb) (v0.3 or higher) by
686
+ requiring "redis/connection/hiredis".
687
+
688
+ * Use [em-synchrony](https://github.com/igrigorik/em-synchrony) by requiring
689
+ "redis/connection/synchrony".
690
+
691
+ # 2.1.1
692
+
693
+ See commit log.