mock_redis 0.17.0 → 0.17.1

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: bb438752840e4549b0797ba546fe482c36bbfed7
4
- data.tar.gz: af6544eeeabb9e54989b39aebf64bad53e2a4ac0
3
+ metadata.gz: a55e7d747d39e4c40aedd4b13974ea1ba8fb78a3
4
+ data.tar.gz: b5efc0805cac7734fa78403f18b4ee4253866197
5
5
  SHA512:
6
- metadata.gz: e548a84b1df2535ddde32358e88801383560e3cedb65e9892e07c4f1812b291e37d3e255cd5777463fa96ad11fa9c47c047b520d77fb101e3e430a5703159a69
7
- data.tar.gz: e3c469733b2de7d7793ea892b651cc3b9d0005f97c73e8b71894d4d6e10a4e95ae12de0faf97bfc0110d60ea7352abd40272ac5cba8df0bbc05984646819afe7
6
+ metadata.gz: a0c1277f32ded504822a15d589c0c262d872593afe6a98e100cdc05e06ff5e04a39e5b8899089656de0f061dc197d632ce954550bae4fb61095df359f27bccef
7
+ data.tar.gz: 33183c7e84dc6d0ebc9990b44bb0ada35bbaca1a90a0ee801f94e8d240419cdcf108b9c1bf861a27f4efbc1e03a9f83052ddd3fe3c6da8a66849f71212d9e677
@@ -14,11 +14,6 @@ PreCommit:
14
14
  enabled: true
15
15
  command: ['bundle', 'exec', 'rubocop']
16
16
 
17
- TravisLint:
18
- enabled: true
19
- command: ['bundle', 'exec', 'travis']
20
- flags: ['lint', '--skip-version-check']
21
-
22
17
  TrailingWhitespace:
23
18
  enabled: true
24
19
 
@@ -1,5 +1,10 @@
1
1
  # MockRedis Changelog
2
2
 
3
+ ### 0.17.1
4
+
5
+ * Flatten args list passed to `hmset`
6
+ * Fix `pipelined` calls within `multi` blocks
7
+
3
8
  ### 0.17.0
4
9
 
5
10
  * Upgrade minimum `redis` gem version to 3.3.0+
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.35.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.42.0'
11
- gem 'travis', '~> 1.7'
10
+ gem 'rubocop', '0.45.0'
12
11
 
13
12
  gem 'coveralls', require: false
@@ -88,6 +88,7 @@ class MockRedis
88
88
  end
89
89
 
90
90
  def hmset(key, *kvpairs)
91
+ kvpairs.flatten!
91
92
  assert_has_args(kvpairs, 'hmset')
92
93
  if kvpairs.length.odd?
93
94
  raise Redis::CommandError, 'ERR wrong number of arguments for HMSET'
@@ -87,6 +87,10 @@ class MockRedis
87
87
  end
88
88
  end
89
89
 
90
+ def pipelined
91
+ yield(self) if block_given?
92
+ end
93
+
90
94
  def unwatch
91
95
  'OK'
92
96
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  class MockRedis
5
- VERSION = '0.17.0'.freeze
5
+ VERSION = '0.17.1'.freeze
6
6
  end
@@ -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 tansaction wrapper if exception occurs during transaction' do
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.0
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-08-09 00:00:00.000000000 Z
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: