mock_redis 0.5.4 → 0.31.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.
- checksums.yaml +7 -0
- data/.github/workflows/lint.yml +31 -0
- data/.github/workflows/tests.yml +63 -0
- data/.gitignore +1 -1
- data/.overcommit.yml +21 -0
- data/.rspec +1 -1
- data/.rubocop.yml +148 -0
- data/.rubocop_todo.yml +35 -0
- data/.simplecov +4 -0
- data/CHANGELOG.md +278 -0
- data/Gemfile +9 -5
- data/LICENSE.md +21 -0
- data/README.md +52 -16
- data/Rakefile +0 -8
- data/lib/mock_redis/assertions.rb +0 -1
- data/lib/mock_redis/connection_method.rb +13 -0
- data/lib/mock_redis/database.rb +193 -257
- data/lib/mock_redis/expire_wrapper.rb +2 -2
- data/lib/mock_redis/future.rb +23 -0
- data/lib/mock_redis/geospatial_methods.rb +240 -0
- data/lib/mock_redis/hash_methods.rb +83 -24
- data/lib/mock_redis/indifferent_hash.rb +11 -0
- data/lib/mock_redis/info_method.rb +160 -0
- data/lib/mock_redis/list_methods.rb +34 -19
- data/lib/mock_redis/multi_db_wrapper.rb +8 -7
- data/lib/mock_redis/pipelined_wrapper.rb +42 -16
- data/lib/mock_redis/set_methods.rb +62 -19
- data/lib/mock_redis/sort_method.rb +81 -0
- data/lib/mock_redis/stream/id.rb +58 -0
- data/lib/mock_redis/stream.rb +88 -0
- data/lib/mock_redis/stream_methods.rb +102 -0
- data/lib/mock_redis/string_methods.rb +235 -42
- data/lib/mock_redis/transaction_wrapper.rb +62 -28
- data/lib/mock_redis/utility_methods.rb +62 -11
- data/lib/mock_redis/version.rb +4 -1
- data/lib/mock_redis/zset.rb +24 -29
- data/lib/mock_redis/zset_methods.rb +187 -59
- data/lib/mock_redis.rb +77 -27
- data/mock_redis.gemspec +23 -15
- data/spec/client_spec.rb +29 -0
- data/spec/cloning_spec.rb +17 -18
- data/spec/commands/append_spec.rb +4 -4
- data/spec/commands/auth_spec.rb +1 -1
- data/spec/commands/bgrewriteaof_spec.rb +2 -2
- data/spec/commands/bgsave_spec.rb +2 -2
- data/spec/commands/bitcount_spec.rb +25 -0
- data/spec/commands/bitfield_spec.rb +169 -0
- data/spec/commands/blpop_spec.rb +19 -21
- data/spec/commands/brpop_spec.rb +25 -20
- data/spec/commands/brpoplpush_spec.rb +16 -17
- data/spec/commands/connected_spec.rb +7 -0
- data/spec/commands/connection_spec.rb +15 -0
- data/spec/commands/dbsize_spec.rb +3 -3
- data/spec/commands/decr_spec.rb +8 -8
- data/spec/commands/decrby_spec.rb +8 -8
- data/spec/commands/del_spec.rb +35 -3
- data/spec/commands/disconnect_spec.rb +7 -0
- data/spec/commands/dump_spec.rb +19 -0
- data/spec/commands/echo_spec.rb +4 -4
- data/spec/commands/eval_spec.rb +7 -0
- data/spec/commands/evalsha_spec.rb +10 -0
- data/spec/commands/exists_spec.rb +36 -7
- data/spec/commands/expire_spec.rb +48 -20
- data/spec/commands/expireat_spec.rb +12 -13
- data/spec/commands/flushall_spec.rb +5 -5
- data/spec/commands/flushdb_spec.rb +5 -5
- data/spec/commands/future_spec.rb +30 -0
- data/spec/commands/geoadd_spec.rb +58 -0
- data/spec/commands/geodist_spec.rb +118 -0
- data/spec/commands/geohash_spec.rb +52 -0
- data/spec/commands/geopos_spec.rb +55 -0
- data/spec/commands/get_spec.rb +14 -6
- data/spec/commands/getbit_spec.rb +7 -7
- data/spec/commands/getrange_spec.rb +9 -9
- data/spec/commands/getset_spec.rb +7 -7
- data/spec/commands/hdel_spec.rb +41 -11
- data/spec/commands/hexists_spec.rb +11 -11
- data/spec/commands/hget_spec.rb +7 -7
- data/spec/commands/hgetall_spec.rb +15 -5
- data/spec/commands/hincrby_spec.rb +16 -16
- data/spec/commands/hincrbyfloat_spec.rb +58 -0
- data/spec/commands/hkeys_spec.rb +5 -5
- data/spec/commands/hlen_spec.rb +5 -5
- data/spec/commands/hmget_spec.rb +19 -9
- data/spec/commands/hmset_spec.rb +38 -12
- data/spec/commands/hscan_each_spec.rb +48 -0
- data/spec/commands/hscan_spec.rb +27 -0
- data/spec/commands/hset_spec.rb +26 -12
- data/spec/commands/hsetnx_spec.rb +16 -16
- data/spec/commands/hvals_spec.rb +5 -5
- data/spec/commands/incr_spec.rb +8 -8
- data/spec/commands/incrby_spec.rb +13 -13
- data/spec/commands/incrbyfloat_spec.rb +13 -13
- data/spec/commands/info_spec.rb +54 -5
- data/spec/commands/keys_spec.rb +83 -31
- data/spec/commands/lastsave_spec.rb +2 -2
- data/spec/commands/lindex_spec.rb +20 -10
- data/spec/commands/linsert_spec.rb +14 -14
- data/spec/commands/llen_spec.rb +4 -4
- data/spec/commands/lpop_spec.rb +6 -6
- data/spec/commands/lpush_spec.rb +21 -15
- data/spec/commands/lpushx_spec.rb +24 -11
- data/spec/commands/lrange_spec.rb +24 -8
- data/spec/commands/lrem_spec.rb +16 -16
- data/spec/commands/lset_spec.rb +17 -12
- data/spec/commands/ltrim_spec.rb +17 -7
- data/spec/commands/mapped_hmget_spec.rb +13 -9
- data/spec/commands/mapped_hmset_spec.rb +12 -12
- data/spec/commands/mapped_mget_spec.rb +22 -0
- data/spec/commands/mapped_mset_spec.rb +19 -0
- data/spec/commands/mapped_msetnx_spec.rb +26 -0
- data/spec/commands/mget_spec.rb +48 -17
- data/spec/commands/move_spec.rb +37 -37
- data/spec/commands/mset_spec.rb +20 -6
- data/spec/commands/msetnx_spec.rb +14 -14
- data/spec/commands/persist_spec.rb +15 -16
- data/spec/commands/pexpire_spec.rb +86 -0
- data/spec/commands/pexpireat_spec.rb +48 -0
- data/spec/commands/ping_spec.rb +6 -2
- data/spec/commands/pipelined_spec.rb +98 -7
- data/spec/commands/pttl_spec.rb +41 -0
- data/spec/commands/randomkey_spec.rb +3 -3
- data/spec/commands/rename_spec.rb +16 -12
- data/spec/commands/renamenx_spec.rb +13 -15
- data/spec/commands/restore_spec.rb +47 -0
- data/spec/commands/rpop_spec.rb +6 -6
- data/spec/commands/rpoplpush_spec.rb +13 -8
- data/spec/commands/rpush_spec.rb +21 -15
- data/spec/commands/rpushx_spec.rb +24 -11
- data/spec/commands/sadd_spec.rb +14 -10
- data/spec/commands/scan_each_spec.rb +39 -0
- data/spec/commands/scan_spec.rb +64 -0
- data/spec/commands/scard_spec.rb +3 -3
- data/spec/commands/script_spec.rb +9 -0
- data/spec/commands/sdiff_spec.rb +13 -13
- data/spec/commands/sdiffstore_spec.rb +13 -13
- data/spec/commands/select_spec.rb +13 -5
- data/spec/commands/set_spec.rb +112 -0
- data/spec/commands/setbit_spec.rb +25 -16
- data/spec/commands/setex_spec.rb +20 -4
- data/spec/commands/setnx_spec.rb +6 -6
- data/spec/commands/setrange_spec.rb +12 -12
- data/spec/commands/sinter_spec.rb +11 -13
- data/spec/commands/sinterstore_spec.rb +12 -12
- data/spec/commands/sismember_spec.rb +10 -10
- data/spec/commands/smembers_spec.rb +15 -5
- data/spec/commands/smove_spec.rb +13 -13
- data/spec/commands/sort_list_spec.rb +21 -0
- data/spec/commands/sort_set_spec.rb +21 -0
- data/spec/commands/sort_zset_spec.rb +21 -0
- data/spec/commands/spop_spec.rb +19 -4
- data/spec/commands/srandmember_spec.rb +28 -4
- data/spec/commands/srem_spec.rb +17 -12
- data/spec/commands/sscan_each_spec.rb +48 -0
- data/spec/commands/sscan_spec.rb +39 -0
- data/spec/commands/strlen_spec.rb +4 -5
- data/spec/commands/sunion_spec.rb +13 -11
- data/spec/commands/sunionstore_spec.rb +12 -12
- data/spec/commands/ttl_spec.rb +11 -6
- data/spec/commands/type_spec.rb +1 -1
- data/spec/commands/watch_spec.rb +9 -4
- data/spec/commands/xadd_spec.rb +122 -0
- data/spec/commands/xlen_spec.rb +22 -0
- data/spec/commands/xrange_spec.rb +164 -0
- data/spec/commands/xread_spec.rb +66 -0
- data/spec/commands/xrevrange_spec.rb +130 -0
- data/spec/commands/xtrim_spec.rb +36 -0
- data/spec/commands/zadd_spec.rb +100 -11
- data/spec/commands/zcard_spec.rb +4 -4
- data/spec/commands/zcount_spec.rb +18 -10
- data/spec/commands/zincrby_spec.rb +6 -6
- data/spec/commands/zinterstore_spec.rb +54 -20
- data/spec/commands/zpopmax_spec.rb +60 -0
- data/spec/commands/zpopmin_spec.rb +60 -0
- data/spec/commands/zrange_spec.rb +54 -13
- data/spec/commands/zrangebyscore_spec.rb +42 -27
- data/spec/commands/zrank_spec.rb +4 -4
- data/spec/commands/zrem_spec.rb +18 -12
- data/spec/commands/zremrangebyrank_spec.rb +5 -5
- data/spec/commands/zremrangebyscore_spec.rb +12 -5
- data/spec/commands/zrevrange_spec.rb +35 -10
- data/spec/commands/zrevrangebyscore_spec.rb +26 -15
- data/spec/commands/zrevrank_spec.rb +4 -4
- data/spec/commands/zscan_each_spec.rb +48 -0
- data/spec/commands/zscan_spec.rb +26 -0
- data/spec/commands/zscore_spec.rb +7 -7
- data/spec/commands/zunionstore_spec.rb +54 -21
- data/spec/mock_redis_spec.rb +61 -0
- data/spec/spec_helper.rb +35 -8
- data/spec/support/redis_multiplexer.rb +62 -37
- data/spec/support/shared_examples/does_not_cleanup_empty_strings.rb +14 -0
- data/spec/support/shared_examples/only_operates_on_hashes.rb +5 -3
- data/spec/support/shared_examples/only_operates_on_lists.rb +5 -3
- data/spec/support/shared_examples/only_operates_on_sets.rb +5 -3
- data/spec/support/shared_examples/only_operates_on_strings.rb +4 -4
- data/spec/support/shared_examples/only_operates_on_zsets.rb +18 -16
- data/spec/support/shared_examples/sorts_enumerables.rb +56 -0
- data/spec/transactions_spec.rb +79 -29
- metadata +162 -42
- data/LICENSE +0 -19
- data/spec/commands/hash_operator_spec.rb +0 -21
metadata
CHANGED
@@ -1,91 +1,127 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mock_redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.31.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
7
|
+
- Shane da Silva
|
9
8
|
- Samuel Merritt
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2022-04-10 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
15
|
+
name: ruby2_keywords
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0
|
23
|
-
type: :
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
|
-
- -
|
25
|
+
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version: 0
|
27
|
+
version: '0'
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: redis
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
|
-
- - ~>
|
32
|
+
- - "~>"
|
37
33
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
34
|
+
version: 4.2.0
|
39
35
|
type: :development
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
|
-
- - ~>
|
39
|
+
- - "~>"
|
45
40
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
41
|
+
version: 4.2.0
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: rspec
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3.0'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3.0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec-its
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
53
61
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
62
|
+
version: '1.0'
|
55
63
|
type: :development
|
56
64
|
prerelease: false
|
57
65
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
66
|
requirements:
|
60
|
-
- - ~>
|
67
|
+
- - "~>"
|
61
68
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
69
|
+
version: '1.0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: timecop
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.9.1
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.9.1
|
63
84
|
description: Instantiate one with `redis = MockRedis.new` and treat it like you would
|
64
85
|
a normal Redis object. It supports all the usual Redis operations.
|
65
86
|
email:
|
66
|
-
-
|
87
|
+
- shane@dasilva.io
|
67
88
|
executables: []
|
68
89
|
extensions: []
|
69
90
|
extra_rdoc_files: []
|
70
91
|
files:
|
71
|
-
- .
|
72
|
-
- .
|
73
|
-
- .
|
92
|
+
- ".github/workflows/lint.yml"
|
93
|
+
- ".github/workflows/tests.yml"
|
94
|
+
- ".gitignore"
|
95
|
+
- ".mailmap"
|
96
|
+
- ".overcommit.yml"
|
97
|
+
- ".rspec"
|
98
|
+
- ".rubocop.yml"
|
99
|
+
- ".rubocop_todo.yml"
|
100
|
+
- ".simplecov"
|
74
101
|
- CHANGELOG.md
|
75
102
|
- Gemfile
|
76
|
-
- LICENSE
|
103
|
+
- LICENSE.md
|
77
104
|
- README.md
|
78
105
|
- Rakefile
|
79
106
|
- lib/mock_redis.rb
|
80
107
|
- lib/mock_redis/assertions.rb
|
108
|
+
- lib/mock_redis/connection_method.rb
|
81
109
|
- lib/mock_redis/database.rb
|
82
110
|
- lib/mock_redis/exceptions.rb
|
83
111
|
- lib/mock_redis/expire_wrapper.rb
|
112
|
+
- lib/mock_redis/future.rb
|
113
|
+
- lib/mock_redis/geospatial_methods.rb
|
84
114
|
- lib/mock_redis/hash_methods.rb
|
115
|
+
- lib/mock_redis/indifferent_hash.rb
|
116
|
+
- lib/mock_redis/info_method.rb
|
85
117
|
- lib/mock_redis/list_methods.rb
|
86
118
|
- lib/mock_redis/multi_db_wrapper.rb
|
87
119
|
- lib/mock_redis/pipelined_wrapper.rb
|
88
120
|
- lib/mock_redis/set_methods.rb
|
121
|
+
- lib/mock_redis/sort_method.rb
|
122
|
+
- lib/mock_redis/stream.rb
|
123
|
+
- lib/mock_redis/stream/id.rb
|
124
|
+
- lib/mock_redis/stream_methods.rb
|
89
125
|
- lib/mock_redis/string_methods.rb
|
90
126
|
- lib/mock_redis/transaction_wrapper.rb
|
91
127
|
- lib/mock_redis/undef_redis_methods.rb
|
@@ -94,38 +130,54 @@ files:
|
|
94
130
|
- lib/mock_redis/zset.rb
|
95
131
|
- lib/mock_redis/zset_methods.rb
|
96
132
|
- mock_redis.gemspec
|
133
|
+
- spec/client_spec.rb
|
97
134
|
- spec/cloning_spec.rb
|
98
135
|
- spec/commands/append_spec.rb
|
99
136
|
- spec/commands/auth_spec.rb
|
100
137
|
- spec/commands/bgrewriteaof_spec.rb
|
101
138
|
- spec/commands/bgsave_spec.rb
|
139
|
+
- spec/commands/bitcount_spec.rb
|
140
|
+
- spec/commands/bitfield_spec.rb
|
102
141
|
- spec/commands/blpop_spec.rb
|
103
142
|
- spec/commands/brpop_spec.rb
|
104
143
|
- spec/commands/brpoplpush_spec.rb
|
144
|
+
- spec/commands/connected_spec.rb
|
145
|
+
- spec/commands/connection_spec.rb
|
105
146
|
- spec/commands/dbsize_spec.rb
|
106
147
|
- spec/commands/decr_spec.rb
|
107
148
|
- spec/commands/decrby_spec.rb
|
108
149
|
- spec/commands/del_spec.rb
|
150
|
+
- spec/commands/disconnect_spec.rb
|
151
|
+
- spec/commands/dump_spec.rb
|
109
152
|
- spec/commands/echo_spec.rb
|
153
|
+
- spec/commands/eval_spec.rb
|
154
|
+
- spec/commands/evalsha_spec.rb
|
110
155
|
- spec/commands/exists_spec.rb
|
111
156
|
- spec/commands/expire_spec.rb
|
112
157
|
- spec/commands/expireat_spec.rb
|
113
158
|
- spec/commands/flushall_spec.rb
|
114
159
|
- spec/commands/flushdb_spec.rb
|
160
|
+
- spec/commands/future_spec.rb
|
161
|
+
- spec/commands/geoadd_spec.rb
|
162
|
+
- spec/commands/geodist_spec.rb
|
163
|
+
- spec/commands/geohash_spec.rb
|
164
|
+
- spec/commands/geopos_spec.rb
|
115
165
|
- spec/commands/get_spec.rb
|
116
166
|
- spec/commands/getbit_spec.rb
|
117
167
|
- spec/commands/getrange_spec.rb
|
118
168
|
- spec/commands/getset_spec.rb
|
119
|
-
- spec/commands/hash_operator_spec.rb
|
120
169
|
- spec/commands/hdel_spec.rb
|
121
170
|
- spec/commands/hexists_spec.rb
|
122
171
|
- spec/commands/hget_spec.rb
|
123
172
|
- spec/commands/hgetall_spec.rb
|
124
173
|
- spec/commands/hincrby_spec.rb
|
174
|
+
- spec/commands/hincrbyfloat_spec.rb
|
125
175
|
- spec/commands/hkeys_spec.rb
|
126
176
|
- spec/commands/hlen_spec.rb
|
127
177
|
- spec/commands/hmget_spec.rb
|
128
178
|
- spec/commands/hmset_spec.rb
|
179
|
+
- spec/commands/hscan_each_spec.rb
|
180
|
+
- spec/commands/hscan_spec.rb
|
129
181
|
- spec/commands/hset_spec.rb
|
130
182
|
- spec/commands/hsetnx_spec.rb
|
131
183
|
- spec/commands/hvals_spec.rb
|
@@ -147,24 +199,34 @@ files:
|
|
147
199
|
- spec/commands/ltrim_spec.rb
|
148
200
|
- spec/commands/mapped_hmget_spec.rb
|
149
201
|
- spec/commands/mapped_hmset_spec.rb
|
202
|
+
- spec/commands/mapped_mget_spec.rb
|
203
|
+
- spec/commands/mapped_mset_spec.rb
|
204
|
+
- spec/commands/mapped_msetnx_spec.rb
|
150
205
|
- spec/commands/mget_spec.rb
|
151
206
|
- spec/commands/move_spec.rb
|
152
207
|
- spec/commands/mset_spec.rb
|
153
208
|
- spec/commands/msetnx_spec.rb
|
154
209
|
- spec/commands/persist_spec.rb
|
210
|
+
- spec/commands/pexpire_spec.rb
|
211
|
+
- spec/commands/pexpireat_spec.rb
|
155
212
|
- spec/commands/ping_spec.rb
|
156
213
|
- spec/commands/pipelined_spec.rb
|
214
|
+
- spec/commands/pttl_spec.rb
|
157
215
|
- spec/commands/quit_spec.rb
|
158
216
|
- spec/commands/randomkey_spec.rb
|
159
217
|
- spec/commands/rename_spec.rb
|
160
218
|
- spec/commands/renamenx_spec.rb
|
219
|
+
- spec/commands/restore_spec.rb
|
161
220
|
- spec/commands/rpop_spec.rb
|
162
221
|
- spec/commands/rpoplpush_spec.rb
|
163
222
|
- spec/commands/rpush_spec.rb
|
164
223
|
- spec/commands/rpushx_spec.rb
|
165
224
|
- spec/commands/sadd_spec.rb
|
166
225
|
- spec/commands/save_spec.rb
|
226
|
+
- spec/commands/scan_each_spec.rb
|
227
|
+
- spec/commands/scan_spec.rb
|
167
228
|
- spec/commands/scard_spec.rb
|
229
|
+
- spec/commands/script_spec.rb
|
168
230
|
- spec/commands/sdiff_spec.rb
|
169
231
|
- spec/commands/sdiffstore_spec.rb
|
170
232
|
- spec/commands/select_spec.rb
|
@@ -178,9 +240,14 @@ files:
|
|
178
240
|
- spec/commands/sismember_spec.rb
|
179
241
|
- spec/commands/smembers_spec.rb
|
180
242
|
- spec/commands/smove_spec.rb
|
243
|
+
- spec/commands/sort_list_spec.rb
|
244
|
+
- spec/commands/sort_set_spec.rb
|
245
|
+
- spec/commands/sort_zset_spec.rb
|
181
246
|
- spec/commands/spop_spec.rb
|
182
247
|
- spec/commands/srandmember_spec.rb
|
183
248
|
- spec/commands/srem_spec.rb
|
249
|
+
- spec/commands/sscan_each_spec.rb
|
250
|
+
- spec/commands/sscan_spec.rb
|
184
251
|
- spec/commands/strlen_spec.rb
|
185
252
|
- spec/commands/sunion_spec.rb
|
186
253
|
- spec/commands/sunionstore_spec.rb
|
@@ -188,11 +255,19 @@ files:
|
|
188
255
|
- spec/commands/type_spec.rb
|
189
256
|
- spec/commands/unwatch_spec.rb
|
190
257
|
- spec/commands/watch_spec.rb
|
258
|
+
- spec/commands/xadd_spec.rb
|
259
|
+
- spec/commands/xlen_spec.rb
|
260
|
+
- spec/commands/xrange_spec.rb
|
261
|
+
- spec/commands/xread_spec.rb
|
262
|
+
- spec/commands/xrevrange_spec.rb
|
263
|
+
- spec/commands/xtrim_spec.rb
|
191
264
|
- spec/commands/zadd_spec.rb
|
192
265
|
- spec/commands/zcard_spec.rb
|
193
266
|
- spec/commands/zcount_spec.rb
|
194
267
|
- spec/commands/zincrby_spec.rb
|
195
268
|
- spec/commands/zinterstore_spec.rb
|
269
|
+
- spec/commands/zpopmax_spec.rb
|
270
|
+
- spec/commands/zpopmin_spec.rb
|
196
271
|
- spec/commands/zrange_spec.rb
|
197
272
|
- spec/commands/zrangebyscore_spec.rb
|
198
273
|
- spec/commands/zrank_spec.rb
|
@@ -202,74 +277,93 @@ files:
|
|
202
277
|
- spec/commands/zrevrange_spec.rb
|
203
278
|
- spec/commands/zrevrangebyscore_spec.rb
|
204
279
|
- spec/commands/zrevrank_spec.rb
|
280
|
+
- spec/commands/zscan_each_spec.rb
|
281
|
+
- spec/commands/zscan_spec.rb
|
205
282
|
- spec/commands/zscore_spec.rb
|
206
283
|
- spec/commands/zunionstore_spec.rb
|
207
284
|
- spec/mock_redis_spec.rb
|
208
285
|
- spec/spec_helper.rb
|
209
286
|
- spec/support/redis_multiplexer.rb
|
287
|
+
- spec/support/shared_examples/does_not_cleanup_empty_strings.rb
|
210
288
|
- spec/support/shared_examples/only_operates_on_hashes.rb
|
211
289
|
- spec/support/shared_examples/only_operates_on_lists.rb
|
212
290
|
- spec/support/shared_examples/only_operates_on_sets.rb
|
213
291
|
- spec/support/shared_examples/only_operates_on_strings.rb
|
214
292
|
- spec/support/shared_examples/only_operates_on_zsets.rb
|
293
|
+
- spec/support/shared_examples/sorts_enumerables.rb
|
215
294
|
- spec/transactions_spec.rb
|
216
|
-
homepage: https://github.com/
|
217
|
-
licenses:
|
295
|
+
homepage: https://github.com/sds/mock_redis
|
296
|
+
licenses:
|
297
|
+
- MIT
|
298
|
+
metadata: {}
|
218
299
|
post_install_message:
|
219
300
|
rdoc_options: []
|
220
301
|
require_paths:
|
221
302
|
- lib
|
222
303
|
required_ruby_version: !ruby/object:Gem::Requirement
|
223
|
-
none: false
|
224
304
|
requirements:
|
225
|
-
- -
|
305
|
+
- - ">="
|
226
306
|
- !ruby/object:Gem::Version
|
227
|
-
version: '
|
307
|
+
version: '2.4'
|
228
308
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
|
-
none: false
|
230
309
|
requirements:
|
231
|
-
- -
|
310
|
+
- - ">="
|
232
311
|
- !ruby/object:Gem::Version
|
233
312
|
version: '0'
|
234
313
|
requirements: []
|
235
|
-
|
236
|
-
rubygems_version: 1.8.23
|
314
|
+
rubygems_version: 3.1.6
|
237
315
|
signing_key:
|
238
|
-
specification_version:
|
316
|
+
specification_version: 4
|
239
317
|
summary: Redis mock that just lives in memory; useful for testing.
|
240
318
|
test_files:
|
319
|
+
- spec/client_spec.rb
|
241
320
|
- spec/cloning_spec.rb
|
242
321
|
- spec/commands/append_spec.rb
|
243
322
|
- spec/commands/auth_spec.rb
|
244
323
|
- spec/commands/bgrewriteaof_spec.rb
|
245
324
|
- spec/commands/bgsave_spec.rb
|
325
|
+
- spec/commands/bitcount_spec.rb
|
326
|
+
- spec/commands/bitfield_spec.rb
|
246
327
|
- spec/commands/blpop_spec.rb
|
247
328
|
- spec/commands/brpop_spec.rb
|
248
329
|
- spec/commands/brpoplpush_spec.rb
|
330
|
+
- spec/commands/connected_spec.rb
|
331
|
+
- spec/commands/connection_spec.rb
|
249
332
|
- spec/commands/dbsize_spec.rb
|
250
333
|
- spec/commands/decr_spec.rb
|
251
334
|
- spec/commands/decrby_spec.rb
|
252
335
|
- spec/commands/del_spec.rb
|
336
|
+
- spec/commands/disconnect_spec.rb
|
337
|
+
- spec/commands/dump_spec.rb
|
253
338
|
- spec/commands/echo_spec.rb
|
339
|
+
- spec/commands/eval_spec.rb
|
340
|
+
- spec/commands/evalsha_spec.rb
|
254
341
|
- spec/commands/exists_spec.rb
|
255
342
|
- spec/commands/expire_spec.rb
|
256
343
|
- spec/commands/expireat_spec.rb
|
257
344
|
- spec/commands/flushall_spec.rb
|
258
345
|
- spec/commands/flushdb_spec.rb
|
346
|
+
- spec/commands/future_spec.rb
|
347
|
+
- spec/commands/geoadd_spec.rb
|
348
|
+
- spec/commands/geodist_spec.rb
|
349
|
+
- spec/commands/geohash_spec.rb
|
350
|
+
- spec/commands/geopos_spec.rb
|
259
351
|
- spec/commands/get_spec.rb
|
260
352
|
- spec/commands/getbit_spec.rb
|
261
353
|
- spec/commands/getrange_spec.rb
|
262
354
|
- spec/commands/getset_spec.rb
|
263
|
-
- spec/commands/hash_operator_spec.rb
|
264
355
|
- spec/commands/hdel_spec.rb
|
265
356
|
- spec/commands/hexists_spec.rb
|
266
357
|
- spec/commands/hget_spec.rb
|
267
358
|
- spec/commands/hgetall_spec.rb
|
268
359
|
- spec/commands/hincrby_spec.rb
|
360
|
+
- spec/commands/hincrbyfloat_spec.rb
|
269
361
|
- spec/commands/hkeys_spec.rb
|
270
362
|
- spec/commands/hlen_spec.rb
|
271
363
|
- spec/commands/hmget_spec.rb
|
272
364
|
- spec/commands/hmset_spec.rb
|
365
|
+
- spec/commands/hscan_each_spec.rb
|
366
|
+
- spec/commands/hscan_spec.rb
|
273
367
|
- spec/commands/hset_spec.rb
|
274
368
|
- spec/commands/hsetnx_spec.rb
|
275
369
|
- spec/commands/hvals_spec.rb
|
@@ -291,24 +385,34 @@ test_files:
|
|
291
385
|
- spec/commands/ltrim_spec.rb
|
292
386
|
- spec/commands/mapped_hmget_spec.rb
|
293
387
|
- spec/commands/mapped_hmset_spec.rb
|
388
|
+
- spec/commands/mapped_mget_spec.rb
|
389
|
+
- spec/commands/mapped_mset_spec.rb
|
390
|
+
- spec/commands/mapped_msetnx_spec.rb
|
294
391
|
- spec/commands/mget_spec.rb
|
295
392
|
- spec/commands/move_spec.rb
|
296
393
|
- spec/commands/mset_spec.rb
|
297
394
|
- spec/commands/msetnx_spec.rb
|
298
395
|
- spec/commands/persist_spec.rb
|
396
|
+
- spec/commands/pexpire_spec.rb
|
397
|
+
- spec/commands/pexpireat_spec.rb
|
299
398
|
- spec/commands/ping_spec.rb
|
300
399
|
- spec/commands/pipelined_spec.rb
|
400
|
+
- spec/commands/pttl_spec.rb
|
301
401
|
- spec/commands/quit_spec.rb
|
302
402
|
- spec/commands/randomkey_spec.rb
|
303
403
|
- spec/commands/rename_spec.rb
|
304
404
|
- spec/commands/renamenx_spec.rb
|
405
|
+
- spec/commands/restore_spec.rb
|
305
406
|
- spec/commands/rpop_spec.rb
|
306
407
|
- spec/commands/rpoplpush_spec.rb
|
307
408
|
- spec/commands/rpush_spec.rb
|
308
409
|
- spec/commands/rpushx_spec.rb
|
309
410
|
- spec/commands/sadd_spec.rb
|
310
411
|
- spec/commands/save_spec.rb
|
412
|
+
- spec/commands/scan_each_spec.rb
|
413
|
+
- spec/commands/scan_spec.rb
|
311
414
|
- spec/commands/scard_spec.rb
|
415
|
+
- spec/commands/script_spec.rb
|
312
416
|
- spec/commands/sdiff_spec.rb
|
313
417
|
- spec/commands/sdiffstore_spec.rb
|
314
418
|
- spec/commands/select_spec.rb
|
@@ -322,9 +426,14 @@ test_files:
|
|
322
426
|
- spec/commands/sismember_spec.rb
|
323
427
|
- spec/commands/smembers_spec.rb
|
324
428
|
- spec/commands/smove_spec.rb
|
429
|
+
- spec/commands/sort_list_spec.rb
|
430
|
+
- spec/commands/sort_set_spec.rb
|
431
|
+
- spec/commands/sort_zset_spec.rb
|
325
432
|
- spec/commands/spop_spec.rb
|
326
433
|
- spec/commands/srandmember_spec.rb
|
327
434
|
- spec/commands/srem_spec.rb
|
435
|
+
- spec/commands/sscan_each_spec.rb
|
436
|
+
- spec/commands/sscan_spec.rb
|
328
437
|
- spec/commands/strlen_spec.rb
|
329
438
|
- spec/commands/sunion_spec.rb
|
330
439
|
- spec/commands/sunionstore_spec.rb
|
@@ -332,11 +441,19 @@ test_files:
|
|
332
441
|
- spec/commands/type_spec.rb
|
333
442
|
- spec/commands/unwatch_spec.rb
|
334
443
|
- spec/commands/watch_spec.rb
|
444
|
+
- spec/commands/xadd_spec.rb
|
445
|
+
- spec/commands/xlen_spec.rb
|
446
|
+
- spec/commands/xrange_spec.rb
|
447
|
+
- spec/commands/xread_spec.rb
|
448
|
+
- spec/commands/xrevrange_spec.rb
|
449
|
+
- spec/commands/xtrim_spec.rb
|
335
450
|
- spec/commands/zadd_spec.rb
|
336
451
|
- spec/commands/zcard_spec.rb
|
337
452
|
- spec/commands/zcount_spec.rb
|
338
453
|
- spec/commands/zincrby_spec.rb
|
339
454
|
- spec/commands/zinterstore_spec.rb
|
455
|
+
- spec/commands/zpopmax_spec.rb
|
456
|
+
- spec/commands/zpopmin_spec.rb
|
340
457
|
- spec/commands/zrange_spec.rb
|
341
458
|
- spec/commands/zrangebyscore_spec.rb
|
342
459
|
- spec/commands/zrank_spec.rb
|
@@ -346,15 +463,18 @@ test_files:
|
|
346
463
|
- spec/commands/zrevrange_spec.rb
|
347
464
|
- spec/commands/zrevrangebyscore_spec.rb
|
348
465
|
- spec/commands/zrevrank_spec.rb
|
466
|
+
- spec/commands/zscan_each_spec.rb
|
467
|
+
- spec/commands/zscan_spec.rb
|
349
468
|
- spec/commands/zscore_spec.rb
|
350
469
|
- spec/commands/zunionstore_spec.rb
|
351
470
|
- spec/mock_redis_spec.rb
|
352
471
|
- spec/spec_helper.rb
|
353
472
|
- spec/support/redis_multiplexer.rb
|
473
|
+
- spec/support/shared_examples/does_not_cleanup_empty_strings.rb
|
354
474
|
- spec/support/shared_examples/only_operates_on_hashes.rb
|
355
475
|
- spec/support/shared_examples/only_operates_on_lists.rb
|
356
476
|
- spec/support/shared_examples/only_operates_on_sets.rb
|
357
477
|
- spec/support/shared_examples/only_operates_on_strings.rb
|
358
478
|
- spec/support/shared_examples/only_operates_on_zsets.rb
|
479
|
+
- spec/support/shared_examples/sorts_enumerables.rb
|
359
480
|
- spec/transactions_spec.rb
|
360
|
-
has_rdoc:
|
data/LICENSE
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
Copyright (c) 2011 Philotic, Inc.
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
5
|
-
in the Software without restriction, including without limitation the rights
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
8
|
-
furnished to do so, subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
11
|
-
all copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
THE SOFTWARE.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe "#[](key)" do
|
4
|
-
before do
|
5
|
-
@key = 'mock-redis-test:hash_operator'
|
6
|
-
end
|
7
|
-
|
8
|
-
it "returns nil for a nonexistent value" do
|
9
|
-
@redises['mock-redis-test:does-not-exist'].should be_nil
|
10
|
-
end
|
11
|
-
|
12
|
-
it "returns a stored string value" do
|
13
|
-
@redises[@key] = 'forsooth'
|
14
|
-
@redises[@key].should == 'forsooth'
|
15
|
-
end
|
16
|
-
|
17
|
-
it "treats integers as strings" do
|
18
|
-
@redises[@key] = 100
|
19
|
-
@redises[@key].should == "100"
|
20
|
-
end
|
21
|
-
end
|