mock_redis 0.17.0 → 0.17.1
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/.overcommit.yml +0 -5
- data/CHANGELOG.md +5 -0
- data/Gemfile +2 -3
- data/lib/mock_redis/hash_methods.rb +1 -0
- data/lib/mock_redis/transaction_wrapper.rb +4 -0
- data/lib/mock_redis/version.rb +1 -1
- data/spec/transactions_spec.rb +13 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a55e7d747d39e4c40aedd4b13974ea1ba8fb78a3
|
4
|
+
data.tar.gz: b5efc0805cac7734fa78403f18b4ee4253866197
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0c1277f32ded504822a15d589c0c262d872593afe6a98e100cdc05e06ff5e04a39e5b8899089656de0f061dc197d632ce954550bae4fb61095df359f27bccef
|
7
|
+
data.tar.gz: 33183c7e84dc6d0ebc9990b44bb0ada35bbaca1a90a0ee801f94e8d240419cdcf108b9c1bf861a27f4efbc1e03a9f83052ddd3fe3c6da8a66849f71212d9e677
|
data/.overcommit.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -4,10 +4,9 @@ source 'http://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
# Run all pre-commit hooks via Overcommit during CI runs
|
7
|
-
gem 'overcommit', '0.
|
7
|
+
gem 'overcommit', '0.37.0'
|
8
8
|
|
9
9
|
# Pin tool versions (which are executed by Overcommit) for Travis builds
|
10
|
-
gem 'rubocop', '0.
|
11
|
-
gem 'travis', '~> 1.7'
|
10
|
+
gem 'rubocop', '0.45.0'
|
12
11
|
|
13
12
|
gem 'coveralls', require: false
|
data/lib/mock_redis/version.rb
CHANGED
data/spec/transactions_spec.rb
CHANGED
@@ -17,7 +17,7 @@ describe 'transactions (multi/exec/discard)' do
|
|
17
17
|
end.should raise_error(Redis::CommandError)
|
18
18
|
end
|
19
19
|
|
20
|
-
it 'cleans state of
|
20
|
+
it 'cleans state of transaction wrapper if exception occurs during transaction' do
|
21
21
|
lambda do
|
22
22
|
@redises.mock.multi do |_r|
|
23
23
|
raise "i'm a command that fails"
|
@@ -55,6 +55,18 @@ describe 'transactions (multi/exec/discard)' do
|
|
55
55
|
end.should raise_error(Redis::CommandError)
|
56
56
|
end
|
57
57
|
end
|
58
|
+
|
59
|
+
it 'allows pipelined calls within multi blocks' do
|
60
|
+
@redises.set('counter', 5)
|
61
|
+
@redises.multi do |r|
|
62
|
+
r.pipelined do |pr|
|
63
|
+
pr.set('test', 1)
|
64
|
+
pr.incr('counter')
|
65
|
+
end
|
66
|
+
end
|
67
|
+
@redises.get('counter').should == '6'
|
68
|
+
@redises.get('test').should == '1'
|
69
|
+
end
|
58
70
|
end
|
59
71
|
|
60
72
|
context '#discard' do
|
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.17.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brigade Engineering
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -432,4 +432,3 @@ test_files:
|
|
432
432
|
- spec/support/shared_examples/only_operates_on_zsets.rb
|
433
433
|
- spec/support/shared_examples/sorts_enumerables.rb
|
434
434
|
- spec/transactions_spec.rb
|
435
|
-
has_rdoc:
|