redis 4.1.0.beta1 → 4.1.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 (142) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -2
  3. data/README.md +45 -0
  4. data/lib/redis.rb +497 -20
  5. data/lib/redis/client.rb +14 -6
  6. data/lib/redis/cluster.rb +1 -0
  7. data/lib/redis/cluster/command_loader.rb +2 -0
  8. data/lib/redis/cluster/node_loader.rb +2 -0
  9. data/lib/redis/cluster/option.rb +1 -0
  10. data/lib/redis/cluster/slot_loader.rb +2 -0
  11. data/lib/redis/distributed.rb +3 -4
  12. data/lib/redis/version.rb +1 -1
  13. metadata +20 -243
  14. data/.gitignore +0 -19
  15. data/.travis.yml +0 -61
  16. data/.travis/Gemfile +0 -18
  17. data/.yardopts +0 -3
  18. data/Gemfile +0 -8
  19. data/benchmarking/logging.rb +0 -71
  20. data/benchmarking/pipeline.rb +0 -51
  21. data/benchmarking/speed.rb +0 -21
  22. data/benchmarking/suite.rb +0 -24
  23. data/benchmarking/worker.rb +0 -71
  24. data/bin/build +0 -71
  25. data/bors.toml +0 -14
  26. data/examples/basic.rb +0 -15
  27. data/examples/consistency.rb +0 -114
  28. data/examples/dist_redis.rb +0 -43
  29. data/examples/incr-decr.rb +0 -17
  30. data/examples/list.rb +0 -26
  31. data/examples/pubsub.rb +0 -37
  32. data/examples/sentinel.rb +0 -41
  33. data/examples/sentinel/start +0 -49
  34. data/examples/sets.rb +0 -36
  35. data/examples/unicorn/config.ru +0 -3
  36. data/examples/unicorn/unicorn.rb +0 -20
  37. data/makefile +0 -74
  38. data/redis.gemspec +0 -42
  39. data/test/bitpos_test.rb +0 -63
  40. data/test/blocking_commands_test.rb +0 -40
  41. data/test/client_test.rb +0 -76
  42. data/test/cluster_abnormal_state_test.rb +0 -38
  43. data/test/cluster_blocking_commands_test.rb +0 -15
  44. data/test/cluster_client_internals_test.rb +0 -77
  45. data/test/cluster_client_key_hash_tags_test.rb +0 -88
  46. data/test/cluster_client_options_test.rb +0 -147
  47. data/test/cluster_client_pipelining_test.rb +0 -59
  48. data/test/cluster_client_replicas_test.rb +0 -36
  49. data/test/cluster_client_slots_test.rb +0 -94
  50. data/test/cluster_client_transactions_test.rb +0 -71
  51. data/test/cluster_commands_on_cluster_test.rb +0 -165
  52. data/test/cluster_commands_on_connection_test.rb +0 -40
  53. data/test/cluster_commands_on_geo_test.rb +0 -74
  54. data/test/cluster_commands_on_hashes_test.rb +0 -11
  55. data/test/cluster_commands_on_hyper_log_log_test.rb +0 -17
  56. data/test/cluster_commands_on_keys_test.rb +0 -134
  57. data/test/cluster_commands_on_lists_test.rb +0 -15
  58. data/test/cluster_commands_on_pub_sub_test.rb +0 -101
  59. data/test/cluster_commands_on_scripting_test.rb +0 -56
  60. data/test/cluster_commands_on_server_test.rb +0 -221
  61. data/test/cluster_commands_on_sets_test.rb +0 -39
  62. data/test/cluster_commands_on_sorted_sets_test.rb +0 -35
  63. data/test/cluster_commands_on_streams_test.rb +0 -196
  64. data/test/cluster_commands_on_strings_test.rb +0 -15
  65. data/test/cluster_commands_on_transactions_test.rb +0 -41
  66. data/test/cluster_commands_on_value_types_test.rb +0 -14
  67. data/test/command_map_test.rb +0 -28
  68. data/test/commands_on_geo_test.rb +0 -116
  69. data/test/commands_on_hashes_test.rb +0 -7
  70. data/test/commands_on_hyper_log_log_test.rb +0 -7
  71. data/test/commands_on_lists_test.rb +0 -7
  72. data/test/commands_on_sets_test.rb +0 -7
  73. data/test/commands_on_sorted_sets_test.rb +0 -7
  74. data/test/commands_on_strings_test.rb +0 -7
  75. data/test/commands_on_value_types_test.rb +0 -207
  76. data/test/connection_handling_test.rb +0 -275
  77. data/test/connection_test.rb +0 -57
  78. data/test/distributed_blocking_commands_test.rb +0 -52
  79. data/test/distributed_commands_on_hashes_test.rb +0 -21
  80. data/test/distributed_commands_on_hyper_log_log_test.rb +0 -26
  81. data/test/distributed_commands_on_lists_test.rb +0 -19
  82. data/test/distributed_commands_on_sets_test.rb +0 -105
  83. data/test/distributed_commands_on_sorted_sets_test.rb +0 -59
  84. data/test/distributed_commands_on_strings_test.rb +0 -79
  85. data/test/distributed_commands_on_value_types_test.rb +0 -129
  86. data/test/distributed_commands_requiring_clustering_test.rb +0 -162
  87. data/test/distributed_connection_handling_test.rb +0 -21
  88. data/test/distributed_internals_test.rb +0 -68
  89. data/test/distributed_key_tags_test.rb +0 -50
  90. data/test/distributed_persistence_control_commands_test.rb +0 -24
  91. data/test/distributed_publish_subscribe_test.rb +0 -90
  92. data/test/distributed_remote_server_control_commands_test.rb +0 -64
  93. data/test/distributed_scripting_test.rb +0 -100
  94. data/test/distributed_sorting_test.rb +0 -18
  95. data/test/distributed_test.rb +0 -56
  96. data/test/distributed_transactions_test.rb +0 -30
  97. data/test/encoding_test.rb +0 -14
  98. data/test/error_replies_test.rb +0 -57
  99. data/test/fork_safety_test.rb +0 -60
  100. data/test/helper.rb +0 -344
  101. data/test/helper_test.rb +0 -22
  102. data/test/internals_test.rb +0 -395
  103. data/test/lint/blocking_commands.rb +0 -174
  104. data/test/lint/hashes.rb +0 -203
  105. data/test/lint/hyper_log_log.rb +0 -74
  106. data/test/lint/lists.rb +0 -159
  107. data/test/lint/sets.rb +0 -282
  108. data/test/lint/sorted_sets.rb +0 -497
  109. data/test/lint/strings.rb +0 -348
  110. data/test/lint/value_types.rb +0 -130
  111. data/test/persistence_control_commands_test.rb +0 -24
  112. data/test/pipelining_commands_test.rb +0 -246
  113. data/test/publish_subscribe_test.rb +0 -280
  114. data/test/remote_server_control_commands_test.rb +0 -175
  115. data/test/scanning_test.rb +0 -407
  116. data/test/scripting_test.rb +0 -76
  117. data/test/sentinel_command_test.rb +0 -78
  118. data/test/sentinel_test.rb +0 -253
  119. data/test/sorting_test.rb +0 -57
  120. data/test/ssl_test.rb +0 -69
  121. data/test/support/cluster/orchestrator.rb +0 -199
  122. data/test/support/connection/hiredis.rb +0 -1
  123. data/test/support/connection/ruby.rb +0 -1
  124. data/test/support/connection/synchrony.rb +0 -17
  125. data/test/support/redis_mock.rb +0 -130
  126. data/test/support/ssl/gen_certs.sh +0 -31
  127. data/test/support/ssl/trusted-ca.crt +0 -25
  128. data/test/support/ssl/trusted-ca.key +0 -27
  129. data/test/support/ssl/trusted-cert.crt +0 -81
  130. data/test/support/ssl/trusted-cert.key +0 -28
  131. data/test/support/ssl/untrusted-ca.crt +0 -26
  132. data/test/support/ssl/untrusted-ca.key +0 -27
  133. data/test/support/ssl/untrusted-cert.crt +0 -82
  134. data/test/support/ssl/untrusted-cert.key +0 -28
  135. data/test/support/wire/synchrony.rb +0 -24
  136. data/test/support/wire/thread.rb +0 -5
  137. data/test/synchrony_driver.rb +0 -85
  138. data/test/test.conf.erb +0 -9
  139. data/test/thread_safety_test.rb +0 -60
  140. data/test/transactions_test.rb +0 -272
  141. data/test/unknown_commands_test.rb +0 -12
  142. data/test/url_param_test.rb +0 -136
@@ -1,76 +0,0 @@
1
- require_relative "helper"
2
-
3
- class TestScripting < Test::Unit::TestCase
4
-
5
- include Helper::Client
6
-
7
- def to_sha(script)
8
- r.script(:load, script)
9
- end
10
-
11
- def test_script_exists
12
- target_version "2.5.9" do # 2.6-rc1
13
- a = to_sha("return 1")
14
- b = a.succ
15
-
16
- assert_equal true, r.script(:exists, a)
17
- assert_equal false, r.script(:exists, b)
18
- assert_equal [true], r.script(:exists, [a])
19
- assert_equal [false], r.script(:exists, [b])
20
- assert_equal [true, false], r.script(:exists, [a, b])
21
- end
22
- end
23
-
24
- def test_script_flush
25
- target_version "2.5.9" do # 2.6-rc1
26
- sha = to_sha("return 1")
27
- assert r.script(:exists, sha)
28
- assert_equal "OK", r.script(:flush)
29
- assert !r.script(:exists, sha)
30
- end
31
- end
32
-
33
- def test_script_kill
34
- target_version "2.5.9" do # 2.6-rc1
35
- redis_mock(:script => lambda { |arg| "+#{arg.upcase}" }) do |redis|
36
- assert_equal "KILL", redis.script(:kill)
37
- end
38
- end
39
- end
40
-
41
- def test_eval
42
- target_version "2.5.9" do # 2.6-rc1
43
- assert_equal 0, r.eval("return #KEYS")
44
- assert_equal 0, r.eval("return #ARGV")
45
- assert_equal ["k1", "k2"], r.eval("return KEYS", ["k1", "k2"])
46
- assert_equal ["a1", "a2"], r.eval("return ARGV", [], ["a1", "a2"])
47
- end
48
- end
49
-
50
- def test_eval_with_options_hash
51
- target_version "2.5.9" do # 2.6-rc1
52
- assert_equal 0, r.eval("return #KEYS", {})
53
- assert_equal 0, r.eval("return #ARGV", {})
54
- assert_equal ["k1", "k2"], r.eval("return KEYS", { :keys => ["k1", "k2"] })
55
- assert_equal ["a1", "a2"], r.eval("return ARGV", { :argv => ["a1", "a2"] })
56
- end
57
- end
58
-
59
- def test_evalsha
60
- target_version "2.5.9" do # 2.6-rc1
61
- assert_equal 0, r.evalsha(to_sha("return #KEYS"))
62
- assert_equal 0, r.evalsha(to_sha("return #ARGV"))
63
- assert_equal ["k1", "k2"], r.evalsha(to_sha("return KEYS"), ["k1", "k2"])
64
- assert_equal ["a1", "a2"], r.evalsha(to_sha("return ARGV"), [], ["a1", "a2"])
65
- end
66
- end
67
-
68
- def test_evalsha_with_options_hash
69
- target_version "2.5.9" do # 2.6-rc1
70
- assert_equal 0, r.evalsha(to_sha("return #KEYS"), {})
71
- assert_equal 0, r.evalsha(to_sha("return #ARGV"), {})
72
- assert_equal ["k1", "k2"], r.evalsha(to_sha("return KEYS"), { :keys => ["k1", "k2"] })
73
- assert_equal ["a1", "a2"], r.evalsha(to_sha("return ARGV"), { :argv => ["a1", "a2"] })
74
- end
75
- end
76
- end
@@ -1,78 +0,0 @@
1
- require_relative "helper"
2
-
3
- class SentinelCommandsTest < Test::Unit::TestCase
4
-
5
- include Helper::Client
6
-
7
- def test_sentinel_command_master
8
-
9
- handler = lambda do |id|
10
- {
11
- :sentinel => lambda do |command, *args|
12
- ["name", "master1", "ip", "127.0.0.1"]
13
- end
14
- }
15
- end
16
-
17
- RedisMock.start(handler.call(:s1)) do |port|
18
- redis = Redis.new(:host => "127.0.0.1", :port => port)
19
-
20
- result = redis.sentinel('master', 'master1')
21
- assert_equal result, { "name" => "master1", "ip" => "127.0.0.1" }
22
- end
23
- end
24
-
25
- def test_sentinel_command_masters
26
-
27
- handler = lambda do |id|
28
- {
29
- :sentinel => lambda do |command, *args|
30
- [%w[name master1 ip 127.0.0.1 port 6381], %w[name master1 ip 127.0.0.1 port 6382]]
31
- end
32
- }
33
- end
34
-
35
- RedisMock.start(handler.call(:s1)) do |port|
36
- redis = Redis.new(:host => "127.0.0.1", :port => port)
37
-
38
- result = redis.sentinel('masters')
39
- assert_equal result[0], { "name" => "master1", "ip" => "127.0.0.1", "port" => "6381" }
40
- assert_equal result[1], { "name" => "master1", "ip" => "127.0.0.1", "port" => "6382" }
41
- end
42
- end
43
-
44
- def test_sentinel_command_get_master_by_name
45
-
46
- handler = lambda do |id|
47
- {
48
- :sentinel => lambda do |command, *args|
49
- ["127.0.0.1", "6381"]
50
- end
51
- }
52
- end
53
-
54
- RedisMock.start(handler.call(:s1)) do |port|
55
- redis = Redis.new(:host => "127.0.0.1", :port => port)
56
-
57
- result = redis.sentinel('get-master-addr-by-name', 'master1')
58
- assert_equal result, ["127.0.0.1", "6381"]
59
- end
60
- end
61
-
62
- def test_sentinel_command_ckquorum
63
- handler = lambda do |id|
64
- {
65
- :sentinel => lambda do |command, *args|
66
- "+OK 2 usable Sentinels. Quorum and failover authorization can be reached"
67
- end
68
- }
69
- end
70
-
71
- RedisMock.start(handler.call(:s1)) do |port|
72
- redis = Redis.new(:host => "127.0.0.1", :port => port)
73
-
74
- result = redis.sentinel('ckquorum', 'master1')
75
- assert_equal result, "OK 2 usable Sentinels. Quorum and failover authorization can be reached"
76
- end
77
- end
78
- end
@@ -1,253 +0,0 @@
1
- require_relative "helper"
2
-
3
- class SentinelTest < Test::Unit::TestCase
4
-
5
- include Helper::Client
6
-
7
- def test_sentinel_connection
8
- sentinels = [{:host => "127.0.0.1", :port => 26381},
9
- {:host => "127.0.0.1", :port => 26382}]
10
-
11
- commands = {
12
- :s1 => [],
13
- :s2 => [],
14
- }
15
-
16
- handler = lambda do |id|
17
- {
18
- :sentinel => lambda do |command, *args|
19
- commands[id] << [command, *args]
20
- ["127.0.0.1", "6381"]
21
- end
22
- }
23
- end
24
-
25
- RedisMock.start(handler.call(:s1)) do |s1_port|
26
- RedisMock.start(handler.call(:s2)) do |s2_port|
27
- sentinels[0][:port] = s1_port
28
- sentinels[1][:port] = s2_port
29
- redis = Redis.new(:url => "redis://master1", :sentinels => sentinels, :role => :master)
30
-
31
- assert redis.ping
32
- end
33
- end
34
-
35
- assert_equal commands[:s1], [%w[get-master-addr-by-name master1]]
36
- assert_equal commands[:s2], []
37
- end
38
-
39
- def test_sentinel_failover
40
- sentinels = [{:host => "127.0.0.1", :port => 26381},
41
- {:host => "127.0.0.1", :port => 26382}]
42
-
43
- commands = {
44
- :s1 => [],
45
- :s2 => [],
46
- }
47
-
48
- s1 = {
49
- :sentinel => lambda do |command, *args|
50
- commands[:s1] << [command, *args]
51
- "$-1" # Nil
52
- end
53
- }
54
-
55
- s2 = {
56
- :sentinel => lambda do |command, *args|
57
- commands[:s2] << [command, *args]
58
- ["127.0.0.1", "6381"]
59
- end
60
- }
61
-
62
- RedisMock.start(s1) do |s1_port|
63
- RedisMock.start(s2) do |s2_port|
64
- sentinels[0][:port] = s1_port
65
- sentinels[1][:port] = s2_port
66
- redis = Redis.new(:url => "redis://master1", :sentinels => sentinels, :role => :master)
67
-
68
- assert redis.ping
69
- end
70
- end
71
-
72
- assert_equal commands[:s1], [%w[get-master-addr-by-name master1]]
73
- assert_equal commands[:s2], [%w[get-master-addr-by-name master1]]
74
- end
75
-
76
- def test_sentinel_failover_prioritize_healthy_sentinel
77
- sentinels = [{:host => "127.0.0.1", :port => 26381},
78
- {:host => "127.0.0.1", :port => 26382}]
79
-
80
- commands = {
81
- :s1 => [],
82
- :s2 => [],
83
- }
84
-
85
- s1 = {
86
- :sentinel => lambda do |command, *args|
87
- commands[:s1] << [command, *args]
88
- "$-1" # Nil
89
- end
90
- }
91
-
92
- s2 = {
93
- :sentinel => lambda do |command, *args|
94
- commands[:s2] << [command, *args]
95
- ["127.0.0.1", "6381"]
96
- end
97
- }
98
-
99
- RedisMock.start(s1) do |s1_port|
100
- RedisMock.start(s2) do |s2_port|
101
- sentinels[0][:port] = s1_port
102
- sentinels[1][:port] = s2_port
103
- redis = Redis.new(:url => "redis://master1", :sentinels => sentinels, :role => :master)
104
-
105
- assert redis.ping
106
-
107
- redis.quit
108
-
109
- assert redis.ping
110
- end
111
- end
112
-
113
- assert_equal commands[:s1], [%w[get-master-addr-by-name master1]]
114
- assert_equal commands[:s2], [%w[get-master-addr-by-name master1], %w[get-master-addr-by-name master1]]
115
- end
116
-
117
- def test_sentinel_with_non_sentinel_options
118
- sentinels = [{:host => "127.0.0.1", :port => 26381}]
119
-
120
- commands = {
121
- :s1 => [],
122
- :m1 => []
123
- }
124
-
125
- sentinel = lambda do |port|
126
- {
127
- :auth => lambda do |pass|
128
- commands[:s1] << ["auth", pass]
129
- "-ERR unknown command 'auth'"
130
- end,
131
- :select => lambda do |db|
132
- commands[:s1] << ["select", db]
133
- "-ERR unknown command 'select'"
134
- end,
135
- :sentinel => lambda do |command, *args|
136
- commands[:s1] << [command, *args]
137
- ["127.0.0.1", port.to_s]
138
- end
139
- }
140
- end
141
-
142
- master = {
143
- :auth => lambda do |pass|
144
- commands[:m1] << ["auth", pass]
145
- "+OK"
146
- end,
147
- :role => lambda do
148
- commands[:m1] << ["role"]
149
- ["master"]
150
- end
151
- }
152
-
153
- RedisMock.start(master) do |master_port|
154
- RedisMock.start(sentinel.call(master_port)) do |sen_port|
155
- sentinels[0][:port] = sen_port
156
- redis = Redis.new(:url => "redis://:foo@master1/15", :sentinels => sentinels, :role => :master)
157
-
158
- assert redis.ping
159
- end
160
- end
161
-
162
- assert_equal [%w[get-master-addr-by-name master1]], commands[:s1]
163
- assert_equal [%w[auth foo], %w[role]], commands[:m1]
164
- end
165
-
166
- def test_sentinel_role_mismatch
167
- sentinels = [{:host => "127.0.0.1", :port => 26381}]
168
-
169
- sentinel = lambda do |port|
170
- {
171
- :sentinel => lambda do |command, *args|
172
- ["127.0.0.1", port.to_s]
173
- end
174
- }
175
- end
176
-
177
- master = {
178
- :role => lambda do
179
- ["slave"]
180
- end
181
- }
182
-
183
- ex = assert_raise(Redis::ConnectionError) do
184
- RedisMock.start(master) do |master_port|
185
- RedisMock.start(sentinel.call(master_port)) do |sen_port|
186
- sentinels[0][:port] = sen_port
187
- redis = Redis.new(:url => "redis://master1", :sentinels => sentinels, :role => :master)
188
-
189
- assert redis.ping
190
- end
191
- end
192
- end
193
-
194
- assert_match(/Instance role mismatch/, ex.message)
195
- end
196
-
197
- def test_sentinel_retries
198
- sentinels = [{:host => "127.0.0.1", :port => 26381},
199
- {:host => "127.0.0.1", :port => 26382}]
200
-
201
- connections = []
202
-
203
- handler = lambda do |id, port|
204
- {
205
- :sentinel => lambda do |command, *args|
206
- connections << id
207
-
208
- if connections.count(id) < 2
209
- :close
210
- else
211
- ["127.0.0.1", port.to_s]
212
- end
213
- end
214
- }
215
- end
216
-
217
- master = {
218
- :role => lambda do
219
- ["master"]
220
- end
221
- }
222
-
223
- RedisMock.start(master) do |master_port|
224
- RedisMock.start(handler.call(:s1, master_port)) do |s1_port|
225
- RedisMock.start(handler.call(:s2, master_port)) do |s2_port|
226
- sentinels[0][:port] = s1_port
227
- sentinels[1][:port] = s2_port
228
- redis = Redis.new(:url => "redis://master1", :sentinels => sentinels, :role => :master, :reconnect_attempts => 1)
229
-
230
- assert redis.ping
231
- end
232
- end
233
- end
234
-
235
- assert_equal [:s1, :s2, :s1], connections
236
-
237
- connections.clear
238
-
239
- ex = assert_raise(Redis::CannotConnectError) do
240
- RedisMock.start(master) do |master_port|
241
- RedisMock.start(handler.call(:s1, master_port)) do |s1_port|
242
- RedisMock.start(handler.call(:s2, master_port)) do |s2_port|
243
- redis = Redis.new(:url => "redis://master1", :sentinels => sentinels, :role => :master, :reconnect_attempts => 0)
244
-
245
- assert redis.ping
246
- end
247
- end
248
- end
249
- end
250
-
251
- assert_match(/No sentinels available/, ex.message)
252
- end
253
- end
@@ -1,57 +0,0 @@
1
- require_relative "helper"
2
-
3
- class TestSorting < Test::Unit::TestCase
4
-
5
- include Helper::Client
6
-
7
- def test_sort
8
- r.set("foo:1", "s1")
9
- r.set("foo:2", "s2")
10
-
11
- r.rpush("bar", "1")
12
- r.rpush("bar", "2")
13
-
14
- assert_equal ["s1"], r.sort("bar", :get => "foo:*", :limit => [0, 1])
15
- assert_equal ["s2"], r.sort("bar", :get => "foo:*", :limit => [0, 1], :order => "desc alpha")
16
- end
17
-
18
- def test_sort_with_an_array_of_gets
19
- r.set("foo:1:a", "s1a")
20
- r.set("foo:1:b", "s1b")
21
-
22
- r.set("foo:2:a", "s2a")
23
- r.set("foo:2:b", "s2b")
24
-
25
- r.rpush("bar", "1")
26
- r.rpush("bar", "2")
27
-
28
- assert_equal [["s1a", "s1b"]], r.sort("bar", :get => ["foo:*:a", "foo:*:b"], :limit => [0, 1])
29
- assert_equal [["s2a", "s2b"]], r.sort("bar", :get => ["foo:*:a", "foo:*:b"], :limit => [0, 1], :order => "desc alpha")
30
- assert_equal [["s1a", "s1b"], ["s2a", "s2b"]], r.sort("bar", :get => ["foo:*:a", "foo:*:b"])
31
- end
32
-
33
- def test_sort_with_store
34
- r.set("foo:1", "s1")
35
- r.set("foo:2", "s2")
36
-
37
- r.rpush("bar", "1")
38
- r.rpush("bar", "2")
39
-
40
- r.sort("bar", :get => "foo:*", :store => "baz")
41
- assert_equal ["s1", "s2"], r.lrange("baz", 0, -1)
42
- end
43
-
44
- def test_sort_with_an_array_of_gets_and_with_store
45
- r.set("foo:1:a", "s1a")
46
- r.set("foo:1:b", "s1b")
47
-
48
- r.set("foo:2:a", "s2a")
49
- r.set("foo:2:b", "s2b")
50
-
51
- r.rpush("bar", "1")
52
- r.rpush("bar", "2")
53
-
54
- r.sort("bar", :get => ["foo:*:a", "foo:*:b"], :store => 'baz')
55
- assert_equal ["s1a", "s1b", "s2a", "s2b"], r.lrange("baz", 0, -1)
56
- end
57
- end