mock_redis 0.33.0 → 0.34.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: 764d3b747c037b933788f2d4ef01e581ecb509aa8c3e445d12c27d199d2273fe
4
- data.tar.gz: 9093a8b7601c57e746dd38d7708c52474df56247ea0910ca4d8d7bcecca9506e
3
+ metadata.gz: 85e71d6b9f2fa3400db015c2c29a7f8c0d017c1c6c0f44f45c404fd1eb8d6fd6
4
+ data.tar.gz: b61b3a420aa7dc9232fffbddd263c82719665cc738e1e36834d95fcd9566cff3
5
5
  SHA512:
6
- metadata.gz: c7ef20dba317c18d0ab4de7d5d0a87107512cb2398c7d9c549a603a1980fbced844c7b98c547db32fb905a32ed68cdfa25ba9331b03a91512c8c1d1f6d45551a
7
- data.tar.gz: 29570271c68cf37d7fd09c065cdad79e1ac64e9b1aa3bdb28dbf0d2080983cc758ad4632e13ad132d492dc823afef8dd7a7a9cec14dfbefb6a7e49a840c74c8c
6
+ metadata.gz: ce57715bda59804aeed319d49a76d81ac9cd1e4d9093005402dd256b804b20245c2a723051eef79c7da883896e75b72b91fe0066ae6e830dd1d24130a751b965
7
+ data.tar.gz: b4a4d237d9705b64b973fd5959ed2544fd8fbf037f5525b1080d647c1b4a1743fb22110e8d5af4cf4077ba7a185e880f4cfbb303ff23346db3611adc64d5aab3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # MockRedis Changelog
2
2
 
3
+ ### 0.34.0
4
+
5
+ * Add support for `with`
6
+
3
7
  ### 0.33.0
4
8
 
5
9
  * Add support for `GET` argument to `SET` command
data/README.md CHANGED
@@ -105,7 +105,7 @@ We recommend running Redis within a Docker container to make development as simp
105
105
 
106
106
  1. Start Redis.
107
107
  ```bash
108
- docker run --rm -p 6379:6379 redis
108
+ docker run --rm -p 6379:6379 redis:6.2-alpine
109
109
  ```
110
110
  2. Install dependencies.
111
111
  ```bash
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  class MockRedis
5
- VERSION = '0.33.0'
5
+ VERSION = '0.34.0'
6
6
  end
data/lib/mock_redis.rb CHANGED
@@ -86,6 +86,10 @@ class MockRedis
86
86
  self
87
87
  end
88
88
 
89
+ def with
90
+ yield self
91
+ end
92
+
89
93
  def respond_to?(method, include_private = false)
90
94
  super || @db.respond_to?(method, include_private)
91
95
  end
data/spec/client_spec.rb CHANGED
@@ -26,4 +26,11 @@ describe 'client' do
26
26
  expect(MockRedis.new).to respond_to(:close)
27
27
  end
28
28
  end
29
+
30
+ context '#with' do
31
+ it 'supports with' do
32
+ redis = MockRedis.new
33
+ redis.with { |c| c.set('key', 'value') }.should == 'OK'
34
+ end
35
+ end
29
36
  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.33.0
4
+ version: 0.34.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: 2022-08-20 00:00:00.000000000 Z
12
+ date: 2022-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby2_keywords