mock_redis 0.19.0 → 0.44.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 +4 -4
- data/CHANGELOG.md +161 -0
- data/LICENSE.md +21 -0
- data/README.md +41 -17
- data/lib/mock_redis/connection_method.rb +13 -0
- data/lib/mock_redis/database.rb +116 -41
- data/lib/mock_redis/expire_wrapper.rb +1 -1
- data/lib/mock_redis/future.rb +1 -1
- data/lib/mock_redis/geospatial_methods.rb +13 -21
- data/lib/mock_redis/hash_methods.rb +34 -15
- data/lib/mock_redis/indifferent_hash.rb +0 -8
- data/lib/mock_redis/info_method.rb +2 -2
- data/lib/mock_redis/list_methods.rb +39 -4
- data/lib/mock_redis/memory_method.rb +11 -0
- data/lib/mock_redis/multi_db_wrapper.rb +4 -4
- data/lib/mock_redis/pipelined_wrapper.rb +32 -15
- data/lib/mock_redis/set_methods.rb +34 -6
- 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 +81 -30
- data/lib/mock_redis/transaction_wrapper.rb +32 -21
- data/lib/mock_redis/utility_methods.rb +9 -4
- data/lib/mock_redis/version.rb +1 -1
- data/lib/mock_redis/zset.rb +5 -8
- data/lib/mock_redis/zset_methods.rb +64 -12
- data/lib/mock_redis.rb +38 -10
- metadata +40 -336
- data/.gitignore +0 -5
- data/.mailmap +0 -2
- data/.overcommit.yml +0 -21
- data/.rspec +0 -1
- data/.rubocop.yml +0 -121
- data/.rubocop_todo.yml +0 -35
- data/.simplecov +0 -4
- data/.travis.yml +0 -33
- data/Gemfile +0 -12
- data/LICENSE +0 -19
- data/Rakefile +0 -2
- data/mock_redis.gemspec +0 -30
- data/spec/client_spec.rb +0 -17
- data/spec/cloning_spec.rb +0 -95
- data/spec/commands/append_spec.rb +0 -24
- data/spec/commands/auth_spec.rb +0 -7
- data/spec/commands/bgrewriteaof_spec.rb +0 -7
- data/spec/commands/bgsave_spec.rb +0 -7
- data/spec/commands/bitcount_spec.rb +0 -25
- data/spec/commands/bitfield_spec.rb +0 -169
- data/spec/commands/blpop_spec.rb +0 -59
- data/spec/commands/brpop_spec.rb +0 -58
- data/spec/commands/brpoplpush_spec.rb +0 -52
- data/spec/commands/connected_spec.rb +0 -7
- data/spec/commands/dbsize_spec.rb +0 -18
- data/spec/commands/decr_spec.rb +0 -34
- data/spec/commands/decrby_spec.rb +0 -34
- data/spec/commands/del_spec.rb +0 -35
- data/spec/commands/disconnect_spec.rb +0 -7
- data/spec/commands/echo_spec.rb +0 -11
- data/spec/commands/eval_spec.rb +0 -7
- data/spec/commands/evalsha_spec.rb +0 -10
- data/spec/commands/exists_spec.rb +0 -14
- data/spec/commands/expire_spec.rb +0 -111
- data/spec/commands/expireat_spec.rb +0 -47
- data/spec/commands/flushall_spec.rb +0 -38
- data/spec/commands/flushdb_spec.rb +0 -38
- data/spec/commands/future_spec.rb +0 -20
- data/spec/commands/geoadd_spec.rb +0 -58
- data/spec/commands/geodist_spec.rb +0 -114
- data/spec/commands/geohash_spec.rb +0 -52
- data/spec/commands/geopos_spec.rb +0 -55
- data/spec/commands/get_spec.rb +0 -30
- data/spec/commands/getbit_spec.rb +0 -34
- data/spec/commands/getrange_spec.rb +0 -22
- data/spec/commands/getset_spec.rb +0 -23
- data/spec/commands/hash_operator_spec.rb +0 -21
- data/spec/commands/hdel_spec.rb +0 -54
- data/spec/commands/hexists_spec.rb +0 -27
- data/spec/commands/hget_spec.rb +0 -28
- data/spec/commands/hgetall_spec.rb +0 -32
- data/spec/commands/hincrby_spec.rb +0 -58
- data/spec/commands/hincrbyfloat_spec.rb +0 -58
- data/spec/commands/hkeys_spec.rb +0 -19
- data/spec/commands/hlen_spec.rb +0 -19
- data/spec/commands/hmget_spec.rb +0 -40
- data/spec/commands/hmset_spec.rb +0 -43
- data/spec/commands/hscan_each_spec.rb +0 -48
- data/spec/commands/hscan_spec.rb +0 -27
- data/spec/commands/hset_spec.rb +0 -38
- data/spec/commands/hsetnx_spec.rb +0 -44
- data/spec/commands/hvals_spec.rb +0 -19
- data/spec/commands/incr_spec.rb +0 -34
- data/spec/commands/incrby_spec.rb +0 -44
- data/spec/commands/incrbyfloat_spec.rb +0 -44
- data/spec/commands/info_spec.rb +0 -62
- data/spec/commands/keys_spec.rb +0 -122
- data/spec/commands/lastsave_spec.rb +0 -8
- data/spec/commands/lindex_spec.rb +0 -49
- data/spec/commands/linsert_spec.rb +0 -68
- data/spec/commands/llen_spec.rb +0 -16
- data/spec/commands/lpop_spec.rb +0 -34
- data/spec/commands/lpush_spec.rb +0 -43
- data/spec/commands/lpushx_spec.rb +0 -46
- data/spec/commands/lrange_spec.rb +0 -51
- data/spec/commands/lrem_spec.rb +0 -80
- data/spec/commands/lset_spec.rb +0 -43
- data/spec/commands/ltrim_spec.rb +0 -45
- data/spec/commands/mapped_hmget_spec.rb +0 -29
- data/spec/commands/mapped_hmset_spec.rb +0 -47
- data/spec/commands/mapped_mget_spec.rb +0 -22
- data/spec/commands/mapped_mset_spec.rb +0 -19
- data/spec/commands/mapped_msetnx_spec.rb +0 -26
- data/spec/commands/mget_spec.rb +0 -34
- data/spec/commands/move_spec.rb +0 -147
- data/spec/commands/mset_spec.rb +0 -29
- data/spec/commands/msetnx_spec.rb +0 -40
- data/spec/commands/persist_spec.rb +0 -48
- data/spec/commands/pexpire_spec.rb +0 -86
- data/spec/commands/pexpireat_spec.rb +0 -48
- data/spec/commands/ping_spec.rb +0 -7
- data/spec/commands/pipelined_spec.rb +0 -42
- data/spec/commands/pttl_spec.rb +0 -41
- data/spec/commands/quit_spec.rb +0 -7
- data/spec/commands/randomkey_spec.rb +0 -20
- data/spec/commands/rename_spec.rb +0 -42
- data/spec/commands/renamenx_spec.rb +0 -41
- data/spec/commands/rpop_spec.rb +0 -34
- data/spec/commands/rpoplpush_spec.rb +0 -50
- data/spec/commands/rpush_spec.rb +0 -43
- data/spec/commands/rpushx_spec.rb +0 -46
- data/spec/commands/sadd_spec.rb +0 -45
- data/spec/commands/save_spec.rb +0 -7
- data/spec/commands/scan_each_spec.rb +0 -39
- data/spec/commands/scan_spec.rb +0 -55
- data/spec/commands/scard_spec.rb +0 -18
- data/spec/commands/script_spec.rb +0 -9
- data/spec/commands/sdiff_spec.rb +0 -47
- data/spec/commands/sdiffstore_spec.rb +0 -58
- data/spec/commands/select_spec.rb +0 -61
- data/spec/commands/set_spec.rb +0 -63
- data/spec/commands/setbit_spec.rb +0 -54
- data/spec/commands/setex_spec.rb +0 -22
- data/spec/commands/setnx_spec.rb +0 -25
- data/spec/commands/setrange_spec.rb +0 -30
- data/spec/commands/sinter_spec.rb +0 -39
- data/spec/commands/sinterstore_spec.rb +0 -53
- data/spec/commands/sismember_spec.rb +0 -29
- data/spec/commands/smembers_spec.rb +0 -28
- data/spec/commands/smove_spec.rb +0 -41
- data/spec/commands/sort_list_spec.rb +0 -21
- data/spec/commands/sort_set_spec.rb +0 -21
- data/spec/commands/sort_zset_spec.rb +0 -21
- data/spec/commands/spop_spec.rb +0 -25
- data/spec/commands/srandmember_spec.rb +0 -49
- data/spec/commands/srem_spec.rb +0 -40
- data/spec/commands/sscan_each_spec.rb +0 -48
- data/spec/commands/sscan_spec.rb +0 -39
- data/spec/commands/strlen_spec.rb +0 -18
- data/spec/commands/sunion_spec.rb +0 -42
- data/spec/commands/sunionstore_spec.rb +0 -59
- data/spec/commands/ttl_spec.rb +0 -40
- data/spec/commands/type_spec.rb +0 -36
- data/spec/commands/unwatch_spec.rb +0 -7
- data/spec/commands/watch_spec.rb +0 -16
- data/spec/commands/zadd_spec.rb +0 -123
- data/spec/commands/zcard_spec.rb +0 -19
- data/spec/commands/zcount_spec.rb +0 -39
- data/spec/commands/zincrby_spec.rb +0 -31
- data/spec/commands/zinterstore_spec.rb +0 -96
- data/spec/commands/zrange_spec.rb +0 -80
- data/spec/commands/zrangebyscore_spec.rb +0 -83
- data/spec/commands/zrank_spec.rb +0 -29
- data/spec/commands/zrem_spec.rb +0 -43
- data/spec/commands/zremrangebyrank_spec.rb +0 -27
- data/spec/commands/zremrangebyscore_spec.rb +0 -35
- data/spec/commands/zrevrange_spec.rb +0 -56
- data/spec/commands/zrevrangebyscore_spec.rb +0 -58
- data/spec/commands/zrevrank_spec.rb +0 -29
- data/spec/commands/zscan_each_spec.rb +0 -48
- data/spec/commands/zscan_spec.rb +0 -26
- data/spec/commands/zscore_spec.rb +0 -22
- data/spec/commands/zunionstore_spec.rb +0 -104
- data/spec/mock_redis_spec.rb +0 -86
- data/spec/spec_helper.rb +0 -63
- data/spec/support/redis_multiplexer.rb +0 -106
- data/spec/support/shared_examples/only_operates_on_hashes.rb +0 -13
- data/spec/support/shared_examples/only_operates_on_lists.rb +0 -13
- data/spec/support/shared_examples/only_operates_on_sets.rb +0 -13
- data/spec/support/shared_examples/only_operates_on_strings.rb +0 -13
- data/spec/support/shared_examples/only_operates_on_zsets.rb +0 -57
- data/spec/support/shared_examples/sorts_enumerables.rb +0 -56
- data/spec/transactions_spec.rb +0 -159
data/lib/mock_redis.rb
CHANGED
@@ -21,6 +21,7 @@ class MockRedis
|
|
21
21
|
:path => nil,
|
22
22
|
:timeout => 5.0,
|
23
23
|
:password => nil,
|
24
|
+
:logger => nil,
|
24
25
|
:db => 0,
|
25
26
|
:time_class => Time,
|
26
27
|
}.freeze
|
@@ -48,10 +49,6 @@ class MockRedis
|
|
48
49
|
end
|
49
50
|
alias location id
|
50
51
|
|
51
|
-
def call(command, &_block)
|
52
|
-
send(*command)
|
53
|
-
end
|
54
|
-
|
55
52
|
def host
|
56
53
|
options[:host]
|
57
54
|
end
|
@@ -64,10 +61,9 @@ class MockRedis
|
|
64
61
|
options[:db]
|
65
62
|
end
|
66
63
|
|
67
|
-
def
|
68
|
-
options[:
|
64
|
+
def logger
|
65
|
+
options[:logger]
|
69
66
|
end
|
70
|
-
alias time now
|
71
67
|
|
72
68
|
def time_at(timestamp)
|
73
69
|
options[:time_class].at(timestamp)
|
@@ -85,12 +81,18 @@ class MockRedis
|
|
85
81
|
self
|
86
82
|
end
|
87
83
|
|
84
|
+
def with
|
85
|
+
yield self
|
86
|
+
end
|
87
|
+
|
88
88
|
def respond_to?(method, include_private = false)
|
89
89
|
super || @db.respond_to?(method, include_private)
|
90
90
|
end
|
91
91
|
|
92
|
-
def method_missing(method, *args, &block)
|
93
|
-
|
92
|
+
ruby2_keywords def method_missing(method, *args, &block)
|
93
|
+
logging([[method, *args]]) do
|
94
|
+
@db.send(method, *args, &block)
|
95
|
+
end
|
94
96
|
end
|
95
97
|
|
96
98
|
def initialize_copy(source)
|
@@ -123,7 +125,7 @@ class MockRedis
|
|
123
125
|
defaults[:host] = uri.host
|
124
126
|
defaults[:port] = uri.port if uri.port
|
125
127
|
defaults[:password] = uri.password if uri.password
|
126
|
-
defaults[:db] = uri.path[1
|
128
|
+
defaults[:db] = uri.path[1..].to_i if uri.path
|
127
129
|
end
|
128
130
|
end
|
129
131
|
|
@@ -143,4 +145,30 @@ class MockRedis
|
|
143
145
|
|
144
146
|
options
|
145
147
|
end
|
148
|
+
|
149
|
+
def logging(commands)
|
150
|
+
return yield unless logger&.debug?
|
151
|
+
|
152
|
+
begin
|
153
|
+
commands.each do |name, *args|
|
154
|
+
logged_args = args.map do |a|
|
155
|
+
if a.respond_to?(:inspect) then a.inspect
|
156
|
+
elsif a.respond_to?(:to_s) then a.to_s
|
157
|
+
else
|
158
|
+
# handle poorly-behaved descendants of BasicObject
|
159
|
+
klass = a.instance_exec { (class << self; self end).superclass }
|
160
|
+
"\#<#{klass}:#{a.__id__}>"
|
161
|
+
end
|
162
|
+
end
|
163
|
+
logger.debug("[MockRedis] command=#{name.to_s.upcase} args=#{logged_args.join(' ')}")
|
164
|
+
end
|
165
|
+
|
166
|
+
t1 = Time.now
|
167
|
+
yield
|
168
|
+
ensure
|
169
|
+
if t1
|
170
|
+
logger.debug(format('[MockRedis] call_time=%<time>0.2f ms', time: ((Time.now - t1) * 1000)))
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
146
174
|
end
|
metadata
CHANGED
@@ -1,50 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mock_redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.44.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Shane da Silva
|
8
8
|
- Samuel Merritt
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '10'
|
21
|
-
- - "<"
|
18
|
+
- - "~>"
|
22
19
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
20
|
+
version: '13'
|
24
21
|
type: :development
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
|
-
- - "
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
version: '10'
|
31
|
-
- - "<"
|
25
|
+
- - "~>"
|
32
26
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
27
|
+
version: '13'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: redis
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
37
31
|
requirements:
|
38
32
|
- - "~>"
|
39
33
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
34
|
+
version: 4.8.0
|
41
35
|
type: :development
|
42
36
|
prerelease: false
|
43
37
|
version_requirements: !ruby/object:Gem::Requirement
|
44
38
|
requirements:
|
45
39
|
- - "~>"
|
46
40
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
41
|
+
version: 4.8.0
|
48
42
|
- !ruby/object:Gem::Dependency
|
49
43
|
name: rspec
|
50
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,29 +67,34 @@ dependencies:
|
|
73
67
|
- - "~>"
|
74
68
|
- !ruby/object:Gem::Version
|
75
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
|
76
84
|
description: Instantiate one with `redis = MockRedis.new` and treat it like you would
|
77
85
|
a normal Redis object. It supports all the usual Redis operations.
|
78
86
|
email:
|
79
|
-
-
|
87
|
+
- shane@dasilva.io
|
80
88
|
executables: []
|
81
89
|
extensions: []
|
82
90
|
extra_rdoc_files: []
|
83
91
|
files:
|
84
|
-
- ".gitignore"
|
85
|
-
- ".mailmap"
|
86
|
-
- ".overcommit.yml"
|
87
|
-
- ".rspec"
|
88
|
-
- ".rubocop.yml"
|
89
|
-
- ".rubocop_todo.yml"
|
90
|
-
- ".simplecov"
|
91
|
-
- ".travis.yml"
|
92
92
|
- CHANGELOG.md
|
93
|
-
-
|
94
|
-
- LICENSE
|
93
|
+
- LICENSE.md
|
95
94
|
- README.md
|
96
|
-
- Rakefile
|
97
95
|
- lib/mock_redis.rb
|
98
96
|
- lib/mock_redis/assertions.rb
|
97
|
+
- lib/mock_redis/connection_method.rb
|
99
98
|
- lib/mock_redis/database.rb
|
100
99
|
- lib/mock_redis/exceptions.rb
|
101
100
|
- lib/mock_redis/expire_wrapper.rb
|
@@ -105,10 +104,14 @@ files:
|
|
105
104
|
- lib/mock_redis/indifferent_hash.rb
|
106
105
|
- lib/mock_redis/info_method.rb
|
107
106
|
- lib/mock_redis/list_methods.rb
|
107
|
+
- lib/mock_redis/memory_method.rb
|
108
108
|
- lib/mock_redis/multi_db_wrapper.rb
|
109
109
|
- lib/mock_redis/pipelined_wrapper.rb
|
110
110
|
- lib/mock_redis/set_methods.rb
|
111
111
|
- lib/mock_redis/sort_method.rb
|
112
|
+
- lib/mock_redis/stream.rb
|
113
|
+
- lib/mock_redis/stream/id.rb
|
114
|
+
- lib/mock_redis/stream_methods.rb
|
112
115
|
- lib/mock_redis/string_methods.rb
|
113
116
|
- lib/mock_redis/transaction_wrapper.rb
|
114
117
|
- lib/mock_redis/undef_redis_methods.rb
|
@@ -116,162 +119,15 @@ files:
|
|
116
119
|
- lib/mock_redis/version.rb
|
117
120
|
- lib/mock_redis/zset.rb
|
118
121
|
- lib/mock_redis/zset_methods.rb
|
119
|
-
|
120
|
-
- spec/client_spec.rb
|
121
|
-
- spec/cloning_spec.rb
|
122
|
-
- spec/commands/append_spec.rb
|
123
|
-
- spec/commands/auth_spec.rb
|
124
|
-
- spec/commands/bgrewriteaof_spec.rb
|
125
|
-
- spec/commands/bgsave_spec.rb
|
126
|
-
- spec/commands/bitcount_spec.rb
|
127
|
-
- spec/commands/bitfield_spec.rb
|
128
|
-
- spec/commands/blpop_spec.rb
|
129
|
-
- spec/commands/brpop_spec.rb
|
130
|
-
- spec/commands/brpoplpush_spec.rb
|
131
|
-
- spec/commands/connected_spec.rb
|
132
|
-
- spec/commands/dbsize_spec.rb
|
133
|
-
- spec/commands/decr_spec.rb
|
134
|
-
- spec/commands/decrby_spec.rb
|
135
|
-
- spec/commands/del_spec.rb
|
136
|
-
- spec/commands/disconnect_spec.rb
|
137
|
-
- spec/commands/echo_spec.rb
|
138
|
-
- spec/commands/eval_spec.rb
|
139
|
-
- spec/commands/evalsha_spec.rb
|
140
|
-
- spec/commands/exists_spec.rb
|
141
|
-
- spec/commands/expire_spec.rb
|
142
|
-
- spec/commands/expireat_spec.rb
|
143
|
-
- spec/commands/flushall_spec.rb
|
144
|
-
- spec/commands/flushdb_spec.rb
|
145
|
-
- spec/commands/future_spec.rb
|
146
|
-
- spec/commands/geoadd_spec.rb
|
147
|
-
- spec/commands/geodist_spec.rb
|
148
|
-
- spec/commands/geohash_spec.rb
|
149
|
-
- spec/commands/geopos_spec.rb
|
150
|
-
- spec/commands/get_spec.rb
|
151
|
-
- spec/commands/getbit_spec.rb
|
152
|
-
- spec/commands/getrange_spec.rb
|
153
|
-
- spec/commands/getset_spec.rb
|
154
|
-
- spec/commands/hash_operator_spec.rb
|
155
|
-
- spec/commands/hdel_spec.rb
|
156
|
-
- spec/commands/hexists_spec.rb
|
157
|
-
- spec/commands/hget_spec.rb
|
158
|
-
- spec/commands/hgetall_spec.rb
|
159
|
-
- spec/commands/hincrby_spec.rb
|
160
|
-
- spec/commands/hincrbyfloat_spec.rb
|
161
|
-
- spec/commands/hkeys_spec.rb
|
162
|
-
- spec/commands/hlen_spec.rb
|
163
|
-
- spec/commands/hmget_spec.rb
|
164
|
-
- spec/commands/hmset_spec.rb
|
165
|
-
- spec/commands/hscan_each_spec.rb
|
166
|
-
- spec/commands/hscan_spec.rb
|
167
|
-
- spec/commands/hset_spec.rb
|
168
|
-
- spec/commands/hsetnx_spec.rb
|
169
|
-
- spec/commands/hvals_spec.rb
|
170
|
-
- spec/commands/incr_spec.rb
|
171
|
-
- spec/commands/incrby_spec.rb
|
172
|
-
- spec/commands/incrbyfloat_spec.rb
|
173
|
-
- spec/commands/info_spec.rb
|
174
|
-
- spec/commands/keys_spec.rb
|
175
|
-
- spec/commands/lastsave_spec.rb
|
176
|
-
- spec/commands/lindex_spec.rb
|
177
|
-
- spec/commands/linsert_spec.rb
|
178
|
-
- spec/commands/llen_spec.rb
|
179
|
-
- spec/commands/lpop_spec.rb
|
180
|
-
- spec/commands/lpush_spec.rb
|
181
|
-
- spec/commands/lpushx_spec.rb
|
182
|
-
- spec/commands/lrange_spec.rb
|
183
|
-
- spec/commands/lrem_spec.rb
|
184
|
-
- spec/commands/lset_spec.rb
|
185
|
-
- spec/commands/ltrim_spec.rb
|
186
|
-
- spec/commands/mapped_hmget_spec.rb
|
187
|
-
- spec/commands/mapped_hmset_spec.rb
|
188
|
-
- spec/commands/mapped_mget_spec.rb
|
189
|
-
- spec/commands/mapped_mset_spec.rb
|
190
|
-
- spec/commands/mapped_msetnx_spec.rb
|
191
|
-
- spec/commands/mget_spec.rb
|
192
|
-
- spec/commands/move_spec.rb
|
193
|
-
- spec/commands/mset_spec.rb
|
194
|
-
- spec/commands/msetnx_spec.rb
|
195
|
-
- spec/commands/persist_spec.rb
|
196
|
-
- spec/commands/pexpire_spec.rb
|
197
|
-
- spec/commands/pexpireat_spec.rb
|
198
|
-
- spec/commands/ping_spec.rb
|
199
|
-
- spec/commands/pipelined_spec.rb
|
200
|
-
- spec/commands/pttl_spec.rb
|
201
|
-
- spec/commands/quit_spec.rb
|
202
|
-
- spec/commands/randomkey_spec.rb
|
203
|
-
- spec/commands/rename_spec.rb
|
204
|
-
- spec/commands/renamenx_spec.rb
|
205
|
-
- spec/commands/rpop_spec.rb
|
206
|
-
- spec/commands/rpoplpush_spec.rb
|
207
|
-
- spec/commands/rpush_spec.rb
|
208
|
-
- spec/commands/rpushx_spec.rb
|
209
|
-
- spec/commands/sadd_spec.rb
|
210
|
-
- spec/commands/save_spec.rb
|
211
|
-
- spec/commands/scan_each_spec.rb
|
212
|
-
- spec/commands/scan_spec.rb
|
213
|
-
- spec/commands/scard_spec.rb
|
214
|
-
- spec/commands/script_spec.rb
|
215
|
-
- spec/commands/sdiff_spec.rb
|
216
|
-
- spec/commands/sdiffstore_spec.rb
|
217
|
-
- spec/commands/select_spec.rb
|
218
|
-
- spec/commands/set_spec.rb
|
219
|
-
- spec/commands/setbit_spec.rb
|
220
|
-
- spec/commands/setex_spec.rb
|
221
|
-
- spec/commands/setnx_spec.rb
|
222
|
-
- spec/commands/setrange_spec.rb
|
223
|
-
- spec/commands/sinter_spec.rb
|
224
|
-
- spec/commands/sinterstore_spec.rb
|
225
|
-
- spec/commands/sismember_spec.rb
|
226
|
-
- spec/commands/smembers_spec.rb
|
227
|
-
- spec/commands/smove_spec.rb
|
228
|
-
- spec/commands/sort_list_spec.rb
|
229
|
-
- spec/commands/sort_set_spec.rb
|
230
|
-
- spec/commands/sort_zset_spec.rb
|
231
|
-
- spec/commands/spop_spec.rb
|
232
|
-
- spec/commands/srandmember_spec.rb
|
233
|
-
- spec/commands/srem_spec.rb
|
234
|
-
- spec/commands/sscan_each_spec.rb
|
235
|
-
- spec/commands/sscan_spec.rb
|
236
|
-
- spec/commands/strlen_spec.rb
|
237
|
-
- spec/commands/sunion_spec.rb
|
238
|
-
- spec/commands/sunionstore_spec.rb
|
239
|
-
- spec/commands/ttl_spec.rb
|
240
|
-
- spec/commands/type_spec.rb
|
241
|
-
- spec/commands/unwatch_spec.rb
|
242
|
-
- spec/commands/watch_spec.rb
|
243
|
-
- spec/commands/zadd_spec.rb
|
244
|
-
- spec/commands/zcard_spec.rb
|
245
|
-
- spec/commands/zcount_spec.rb
|
246
|
-
- spec/commands/zincrby_spec.rb
|
247
|
-
- spec/commands/zinterstore_spec.rb
|
248
|
-
- spec/commands/zrange_spec.rb
|
249
|
-
- spec/commands/zrangebyscore_spec.rb
|
250
|
-
- spec/commands/zrank_spec.rb
|
251
|
-
- spec/commands/zrem_spec.rb
|
252
|
-
- spec/commands/zremrangebyrank_spec.rb
|
253
|
-
- spec/commands/zremrangebyscore_spec.rb
|
254
|
-
- spec/commands/zrevrange_spec.rb
|
255
|
-
- spec/commands/zrevrangebyscore_spec.rb
|
256
|
-
- spec/commands/zrevrank_spec.rb
|
257
|
-
- spec/commands/zscan_each_spec.rb
|
258
|
-
- spec/commands/zscan_spec.rb
|
259
|
-
- spec/commands/zscore_spec.rb
|
260
|
-
- spec/commands/zunionstore_spec.rb
|
261
|
-
- spec/mock_redis_spec.rb
|
262
|
-
- spec/spec_helper.rb
|
263
|
-
- spec/support/redis_multiplexer.rb
|
264
|
-
- spec/support/shared_examples/only_operates_on_hashes.rb
|
265
|
-
- spec/support/shared_examples/only_operates_on_lists.rb
|
266
|
-
- spec/support/shared_examples/only_operates_on_sets.rb
|
267
|
-
- spec/support/shared_examples/only_operates_on_strings.rb
|
268
|
-
- spec/support/shared_examples/only_operates_on_zsets.rb
|
269
|
-
- spec/support/shared_examples/sorts_enumerables.rb
|
270
|
-
- spec/transactions_spec.rb
|
271
|
-
homepage: https://github.com/brigade/mock_redis
|
122
|
+
homepage: https://github.com/sds/mock_redis
|
272
123
|
licenses:
|
273
124
|
- MIT
|
274
|
-
metadata:
|
125
|
+
metadata:
|
126
|
+
bug_tracker_uri: https://github.com/sds/mock_redis/issues
|
127
|
+
changelog_uri: https://github.com/sds/mock_redis/blob/v0.44.0/CHANGELOG.md
|
128
|
+
documentation_uri: https://www.rubydoc.info/gems/mock_redis/0.44.0
|
129
|
+
homepage_uri: https://github.com/sds/mock_redis
|
130
|
+
source_code_uri: https://github.com/sds/mock_redis/tree/v0.44.0
|
275
131
|
post_install_message:
|
276
132
|
rdoc_options: []
|
277
133
|
require_paths:
|
@@ -280,167 +136,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
280
136
|
requirements:
|
281
137
|
- - ">="
|
282
138
|
- !ruby/object:Gem::Version
|
283
|
-
version: '
|
139
|
+
version: '3.0'
|
284
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
285
141
|
requirements:
|
286
142
|
- - ">="
|
287
143
|
- !ruby/object:Gem::Version
|
288
144
|
version: '0'
|
289
145
|
requirements: []
|
290
|
-
|
291
|
-
rubygems_version: 2.7.3
|
146
|
+
rubygems_version: 3.0.3.1
|
292
147
|
signing_key:
|
293
148
|
specification_version: 4
|
294
149
|
summary: Redis mock that just lives in memory; useful for testing.
|
295
|
-
test_files:
|
296
|
-
- spec/client_spec.rb
|
297
|
-
- spec/cloning_spec.rb
|
298
|
-
- spec/commands/append_spec.rb
|
299
|
-
- spec/commands/auth_spec.rb
|
300
|
-
- spec/commands/bgrewriteaof_spec.rb
|
301
|
-
- spec/commands/bgsave_spec.rb
|
302
|
-
- spec/commands/bitcount_spec.rb
|
303
|
-
- spec/commands/bitfield_spec.rb
|
304
|
-
- spec/commands/blpop_spec.rb
|
305
|
-
- spec/commands/brpop_spec.rb
|
306
|
-
- spec/commands/brpoplpush_spec.rb
|
307
|
-
- spec/commands/connected_spec.rb
|
308
|
-
- spec/commands/dbsize_spec.rb
|
309
|
-
- spec/commands/decr_spec.rb
|
310
|
-
- spec/commands/decrby_spec.rb
|
311
|
-
- spec/commands/del_spec.rb
|
312
|
-
- spec/commands/disconnect_spec.rb
|
313
|
-
- spec/commands/echo_spec.rb
|
314
|
-
- spec/commands/eval_spec.rb
|
315
|
-
- spec/commands/evalsha_spec.rb
|
316
|
-
- spec/commands/exists_spec.rb
|
317
|
-
- spec/commands/expire_spec.rb
|
318
|
-
- spec/commands/expireat_spec.rb
|
319
|
-
- spec/commands/flushall_spec.rb
|
320
|
-
- spec/commands/flushdb_spec.rb
|
321
|
-
- spec/commands/future_spec.rb
|
322
|
-
- spec/commands/geoadd_spec.rb
|
323
|
-
- spec/commands/geodist_spec.rb
|
324
|
-
- spec/commands/geohash_spec.rb
|
325
|
-
- spec/commands/geopos_spec.rb
|
326
|
-
- spec/commands/get_spec.rb
|
327
|
-
- spec/commands/getbit_spec.rb
|
328
|
-
- spec/commands/getrange_spec.rb
|
329
|
-
- spec/commands/getset_spec.rb
|
330
|
-
- spec/commands/hash_operator_spec.rb
|
331
|
-
- spec/commands/hdel_spec.rb
|
332
|
-
- spec/commands/hexists_spec.rb
|
333
|
-
- spec/commands/hget_spec.rb
|
334
|
-
- spec/commands/hgetall_spec.rb
|
335
|
-
- spec/commands/hincrby_spec.rb
|
336
|
-
- spec/commands/hincrbyfloat_spec.rb
|
337
|
-
- spec/commands/hkeys_spec.rb
|
338
|
-
- spec/commands/hlen_spec.rb
|
339
|
-
- spec/commands/hmget_spec.rb
|
340
|
-
- spec/commands/hmset_spec.rb
|
341
|
-
- spec/commands/hscan_each_spec.rb
|
342
|
-
- spec/commands/hscan_spec.rb
|
343
|
-
- spec/commands/hset_spec.rb
|
344
|
-
- spec/commands/hsetnx_spec.rb
|
345
|
-
- spec/commands/hvals_spec.rb
|
346
|
-
- spec/commands/incr_spec.rb
|
347
|
-
- spec/commands/incrby_spec.rb
|
348
|
-
- spec/commands/incrbyfloat_spec.rb
|
349
|
-
- spec/commands/info_spec.rb
|
350
|
-
- spec/commands/keys_spec.rb
|
351
|
-
- spec/commands/lastsave_spec.rb
|
352
|
-
- spec/commands/lindex_spec.rb
|
353
|
-
- spec/commands/linsert_spec.rb
|
354
|
-
- spec/commands/llen_spec.rb
|
355
|
-
- spec/commands/lpop_spec.rb
|
356
|
-
- spec/commands/lpush_spec.rb
|
357
|
-
- spec/commands/lpushx_spec.rb
|
358
|
-
- spec/commands/lrange_spec.rb
|
359
|
-
- spec/commands/lrem_spec.rb
|
360
|
-
- spec/commands/lset_spec.rb
|
361
|
-
- spec/commands/ltrim_spec.rb
|
362
|
-
- spec/commands/mapped_hmget_spec.rb
|
363
|
-
- spec/commands/mapped_hmset_spec.rb
|
364
|
-
- spec/commands/mapped_mget_spec.rb
|
365
|
-
- spec/commands/mapped_mset_spec.rb
|
366
|
-
- spec/commands/mapped_msetnx_spec.rb
|
367
|
-
- spec/commands/mget_spec.rb
|
368
|
-
- spec/commands/move_spec.rb
|
369
|
-
- spec/commands/mset_spec.rb
|
370
|
-
- spec/commands/msetnx_spec.rb
|
371
|
-
- spec/commands/persist_spec.rb
|
372
|
-
- spec/commands/pexpire_spec.rb
|
373
|
-
- spec/commands/pexpireat_spec.rb
|
374
|
-
- spec/commands/ping_spec.rb
|
375
|
-
- spec/commands/pipelined_spec.rb
|
376
|
-
- spec/commands/pttl_spec.rb
|
377
|
-
- spec/commands/quit_spec.rb
|
378
|
-
- spec/commands/randomkey_spec.rb
|
379
|
-
- spec/commands/rename_spec.rb
|
380
|
-
- spec/commands/renamenx_spec.rb
|
381
|
-
- spec/commands/rpop_spec.rb
|
382
|
-
- spec/commands/rpoplpush_spec.rb
|
383
|
-
- spec/commands/rpush_spec.rb
|
384
|
-
- spec/commands/rpushx_spec.rb
|
385
|
-
- spec/commands/sadd_spec.rb
|
386
|
-
- spec/commands/save_spec.rb
|
387
|
-
- spec/commands/scan_each_spec.rb
|
388
|
-
- spec/commands/scan_spec.rb
|
389
|
-
- spec/commands/scard_spec.rb
|
390
|
-
- spec/commands/script_spec.rb
|
391
|
-
- spec/commands/sdiff_spec.rb
|
392
|
-
- spec/commands/sdiffstore_spec.rb
|
393
|
-
- spec/commands/select_spec.rb
|
394
|
-
- spec/commands/set_spec.rb
|
395
|
-
- spec/commands/setbit_spec.rb
|
396
|
-
- spec/commands/setex_spec.rb
|
397
|
-
- spec/commands/setnx_spec.rb
|
398
|
-
- spec/commands/setrange_spec.rb
|
399
|
-
- spec/commands/sinter_spec.rb
|
400
|
-
- spec/commands/sinterstore_spec.rb
|
401
|
-
- spec/commands/sismember_spec.rb
|
402
|
-
- spec/commands/smembers_spec.rb
|
403
|
-
- spec/commands/smove_spec.rb
|
404
|
-
- spec/commands/sort_list_spec.rb
|
405
|
-
- spec/commands/sort_set_spec.rb
|
406
|
-
- spec/commands/sort_zset_spec.rb
|
407
|
-
- spec/commands/spop_spec.rb
|
408
|
-
- spec/commands/srandmember_spec.rb
|
409
|
-
- spec/commands/srem_spec.rb
|
410
|
-
- spec/commands/sscan_each_spec.rb
|
411
|
-
- spec/commands/sscan_spec.rb
|
412
|
-
- spec/commands/strlen_spec.rb
|
413
|
-
- spec/commands/sunion_spec.rb
|
414
|
-
- spec/commands/sunionstore_spec.rb
|
415
|
-
- spec/commands/ttl_spec.rb
|
416
|
-
- spec/commands/type_spec.rb
|
417
|
-
- spec/commands/unwatch_spec.rb
|
418
|
-
- spec/commands/watch_spec.rb
|
419
|
-
- spec/commands/zadd_spec.rb
|
420
|
-
- spec/commands/zcard_spec.rb
|
421
|
-
- spec/commands/zcount_spec.rb
|
422
|
-
- spec/commands/zincrby_spec.rb
|
423
|
-
- spec/commands/zinterstore_spec.rb
|
424
|
-
- spec/commands/zrange_spec.rb
|
425
|
-
- spec/commands/zrangebyscore_spec.rb
|
426
|
-
- spec/commands/zrank_spec.rb
|
427
|
-
- spec/commands/zrem_spec.rb
|
428
|
-
- spec/commands/zremrangebyrank_spec.rb
|
429
|
-
- spec/commands/zremrangebyscore_spec.rb
|
430
|
-
- spec/commands/zrevrange_spec.rb
|
431
|
-
- spec/commands/zrevrangebyscore_spec.rb
|
432
|
-
- spec/commands/zrevrank_spec.rb
|
433
|
-
- spec/commands/zscan_each_spec.rb
|
434
|
-
- spec/commands/zscan_spec.rb
|
435
|
-
- spec/commands/zscore_spec.rb
|
436
|
-
- spec/commands/zunionstore_spec.rb
|
437
|
-
- spec/mock_redis_spec.rb
|
438
|
-
- spec/spec_helper.rb
|
439
|
-
- spec/support/redis_multiplexer.rb
|
440
|
-
- spec/support/shared_examples/only_operates_on_hashes.rb
|
441
|
-
- spec/support/shared_examples/only_operates_on_lists.rb
|
442
|
-
- spec/support/shared_examples/only_operates_on_sets.rb
|
443
|
-
- spec/support/shared_examples/only_operates_on_strings.rb
|
444
|
-
- spec/support/shared_examples/only_operates_on_zsets.rb
|
445
|
-
- spec/support/shared_examples/sorts_enumerables.rb
|
446
|
-
- spec/transactions_spec.rb
|
150
|
+
test_files: []
|
data/.gitignore
DELETED
data/.mailmap
DELETED
data/.overcommit.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
gemfile: Gemfile
|
2
|
-
|
3
|
-
PreCommit:
|
4
|
-
BundleCheck:
|
5
|
-
enabled: true
|
6
|
-
|
7
|
-
ExecutePermissions:
|
8
|
-
enabled: true
|
9
|
-
|
10
|
-
HardTabs:
|
11
|
-
enabled: true
|
12
|
-
|
13
|
-
RuboCop:
|
14
|
-
enabled: true
|
15
|
-
command: ['bundle', 'exec', 'rubocop']
|
16
|
-
|
17
|
-
TrailingWhitespace:
|
18
|
-
enabled: true
|
19
|
-
|
20
|
-
YamlSyntax:
|
21
|
-
enabled: true
|
data/.rspec
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
--color
|