mock_redis 0.13.1 → 0.13.2

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
  SHA1:
3
- metadata.gz: 0e83c6871358c3a1fb0dcec3a3b197e9910781df
4
- data.tar.gz: 3b08ea384505fc494190e51cfe3f812f8d3f63e8
3
+ metadata.gz: b3d7978080e5d75386c90cbae717fee17d6194c7
4
+ data.tar.gz: abfc802fe90cf8e2a9a996311b0859451a8abff0
5
5
  SHA512:
6
- metadata.gz: ffe8619a761fdb4898e326b971019e167ea47bf091251b8113f8ee16bfd94d5122c355a7bd87c47503212b076148128a37da1a5efa932f94869ef1b670b0da44
7
- data.tar.gz: 4d5a6c0cd48dff3cc89f5e71f7899e6fae2bac72f14ac5e4eccd2705ebad0ed99f0a23786314df43f468907cab2188ccbc8c0e81ccfe09facad072f0362dbecd
6
+ metadata.gz: 19b2a107cbb896b8fd5435a83e84c45e64a5b0603e1e130611fcf4655e4f20a68427d230c4cd6c4133925a1bbf8bd49a783a0f94b676c5999df7f1f94bdb8b96
7
+ data.tar.gz: a74a10f31f47764a4c09ed3a838587b384771f3a72130ea57dc8e09cb82556fa0974fc3e12285d78c4374580b0f7f5bd3686badea137fee95aa20231c2558f5f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # MockRedis Changelog
2
2
 
3
+ ### 0.13.2
4
+
5
+ * Fix SMEMBERS command to not return frozen elements
6
+
3
7
  ### 0.13.1
4
8
 
5
9
  * Fix bug where certain characters in keys were treated as regex characters
@@ -59,7 +59,7 @@ class MockRedis
59
59
  end
60
60
 
61
61
  def smembers(key)
62
- with_set_at(key, &:to_a).reverse
62
+ with_set_at(key, &:to_a).map(&:dup).reverse
63
63
  end
64
64
 
65
65
  def smove(src, dest, member)
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  class MockRedis
3
- VERSION = '0.13.1'
3
+ VERSION = '0.13.2'
4
4
  end
@@ -14,5 +14,15 @@ describe '#smembers(key)' do
14
14
  @redises.smembers(@key).should == %w[Test World Hello]
15
15
  end
16
16
 
17
+ it 'returns unfrozen copies of the input' do
18
+ input = 'a string'
19
+ @redises.sadd(@key, input)
20
+ output = @redises.smembers(@key).first
21
+
22
+ expect(output).to eq input
23
+ expect(output).to_not equal input
24
+ expect(output).to_not be_frozen
25
+ end
26
+
17
27
  it_should_behave_like "a set-only command"
18
28
  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.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Causes Engineering
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-08 00:00:00.000000000 Z
12
+ date: 2014-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake