mock_redis 0.41.0 → 0.42.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38600e39b89ea4f37c414a69fb7ed50e4915d0f723d2d7f50e11141b4f9f9e33
4
- data.tar.gz: 5e2830a85a5dcf6326ed01c3cac52cf5c5136393dd79f979b9a197a79dd12c60
3
+ metadata.gz: 7c029cb2a22c5d9bdb8fd8d9f1f1266f8d3312d74672024d3e90a4704eb5ff2d
4
+ data.tar.gz: 28d10360caaf1cf17441155a1add6e03f593c22ea1b6565b1100de38db0c632a
5
5
  SHA512:
6
- metadata.gz: 1fcdf6c59782080a318f7915b918367aa7935f4de4dee130fac4bae158574e39685db1a81a598fae56d7c97a14e33c4b333c0e357375c45edd691c31bed20455
7
- data.tar.gz: f0a336671d8a76ad0984604ad3f29ab231188442155de7968c1e0698489f5a02f3a012ab3ae3f38a8398c3d553cbc1ca68b9915514d6c5046ebede63a5c9e842
6
+ metadata.gz: 2190dafa783552b41b965ec49b97f9dc4183f32d99bd78a3b93ad61c6c1cabc9f62233cd14b6ec7c178bf125dffa214188e4db37111eb8c9b044c5ea285ebcbd
7
+ data.tar.gz: acbdd8e328413f1288fef8a6f0ddead0387630677d2bbb3ae8ef3e02253e45be315ce7243afe257a51931f3cc71a5965ed16705b5dda9fad1c71dedb106e0574
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # MockRedis Changelog
2
2
 
3
+ ### 0.42.0
4
+
5
+ * Drop support for Ruby 2.x
6
+ * Add support for `srem?`
7
+
3
8
  ### 0.41.0
4
9
 
5
10
  * Add support for `expire`-related command options `nx`/`xx`/`lt`/`gt`
data/README.md CHANGED
@@ -10,7 +10,7 @@ for use in tests.
10
10
 
11
11
  ## Requirements
12
12
 
13
- Ruby 2.7+
13
+ Ruby 3.0+
14
14
 
15
15
  The current implementation is tested against Redis 6.2. Older versions may work, but can also return different results or not support some commands.
16
16
 
@@ -1,7 +1,7 @@
1
1
  class MockRedis
2
2
  module GeospatialMethods
3
- LNG_RANGE = (-180..180).freeze
4
- LAT_RANGE = (-85.05112878..85.05112878).freeze
3
+ LNG_RANGE = (-180..180)
4
+ LAT_RANGE = (-85.05112878..85.05112878)
5
5
  STEP = 26
6
6
  UNITS = {
7
7
  m: 1,
@@ -137,6 +137,11 @@ class MockRedis
137
137
  end
138
138
  end
139
139
 
140
+ def srem?(key, members)
141
+ res = srem(key, members)
142
+ res.is_a?(Numeric) ? res > 0 : res
143
+ end
144
+
140
145
  def sscan(key, cursor, opts = {})
141
146
  common_scan(smembers(key), cursor, opts)
142
147
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  class MockRedis
5
- VERSION = '0.41.0'
5
+ VERSION = '0.42.0'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mock_redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.41.0
4
+ version: 0.42.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane da Silva
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-12-13 00:00:00.000000000 Z
12
+ date: 2024-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -123,10 +123,10 @@ licenses:
123
123
  - MIT
124
124
  metadata:
125
125
  bug_tracker_uri: https://github.com/sds/mock_redis/issues
126
- changelog_uri: https://github.com/sds/mock_redis/blob/v0.41.0/CHANGELOG.md
127
- documentation_uri: https://www.rubydoc.info/gems/mock_redis/0.41.0
126
+ changelog_uri: https://github.com/sds/mock_redis/blob/v0.42.0/CHANGELOG.md
127
+ documentation_uri: https://www.rubydoc.info/gems/mock_redis/0.42.0
128
128
  homepage_uri: https://github.com/sds/mock_redis
129
- source_code_uri: https://github.com/sds/mock_redis/tree/v0.41.0
129
+ source_code_uri: https://github.com/sds/mock_redis/tree/v0.42.0
130
130
  post_install_message:
131
131
  rdoc_options: []
132
132
  require_paths:
@@ -135,14 +135,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: '2.7'
138
+ version: '3.0'
139
139
  required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - ">="
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubygems_version: 3.1.6
145
+ rubygems_version: 3.4.10
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Redis mock that just lives in memory; useful for testing.