mock_redis 0.14.0 → 0.14.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: 994ce4cc7000897238012b0a9f11a8417b31358d
4
- data.tar.gz: 44f03b45a1310b977d0bf996fe042a7b32c70b36
3
+ metadata.gz: 51d5bc5ef12c98487d1fc31d420608e1265eb6b7
4
+ data.tar.gz: 7fcf609fe19c71439098a4f4e588c50e588c91f3
5
5
  SHA512:
6
- metadata.gz: 84bd359ec9c9eff9b5b40cacc7ac65f206bdd8a720d00445fcb53cd0729abcd003c3fe66f96e220728575f305e00495c0fa75a55290a268ba304f4cf92597035
7
- data.tar.gz: e09387fa284e38847e8ebec0d8ed1a7c3681ebfad0b661a239c54b976adada92ffb08661f736abdde1686aaba5ed394e53d6620326979b84811c42d65d63ba2c
6
+ metadata.gz: 7f51ea5086ba013622a7bf782607757c78d9eb9b54f146079e50d37ba7c7486446fe4face94d208395f0aa70b61d5ee4aed7240659682421e4e1461ba52b8546
7
+ data.tar.gz: c55ead056d294255f2cef773c0e8c4e9960974bda6a64887d60445b6e9211e6d7f82adfda74222294691cc659e035f4d88fea40887a3bd41f6992416f42e1085
data/.gitignore CHANGED
@@ -1,5 +1,4 @@
1
1
  pkg/*
2
- *.gem
3
2
  .bundle
4
3
  Gemfile.lock
5
4
  .rvmrc
data/.overcommit.yml CHANGED
@@ -1,3 +1,21 @@
1
- CommitMsg:
2
- GerritChangeId:
1
+ PreCommit:
2
+ BundleCheck:
3
+ enabled: true
4
+
5
+ HardTabs:
6
+ enabled: true
7
+
8
+ Rubocop:
9
+ enabled: true
10
+ command: ['bundle', 'exec', 'rubocop']
11
+
12
+ TravisLint:
13
+ enabled: true
14
+ command: ['bundle', 'exec', 'travis']
15
+ flags: ['lint', '--skip-version-check']
16
+
17
+ TrailingWhitespace:
18
+ enabled: true
19
+
20
+ YamlSyntax:
3
21
  enabled: true
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # MockRedis Changelog
2
2
 
3
+ ### 0.14.1
4
+
5
+ * Upgrade `redis` gem dependency to 3.2.x series
6
+ * Map `HDEL` field to string when given as an array
7
+
3
8
  ### 0.14.0
4
9
 
5
10
  * Fix bug where SETBIT command would not correctly unset a bit
data/Gemfile CHANGED
@@ -1,4 +1,11 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in mock_redis.gemspec
4
4
  gemspec
5
+
6
+ # Run all pre-commit hooks via Overcommit during CI runs
7
+ gem 'overcommit', '0.24.0'
8
+
9
+ # Pin tool versions (which are executed by Overcommit) for Travis builds
10
+ gem 'rubocop', '0.30.0'
11
+ gem 'travis', '~> 1.7'
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # MockRedis
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/mock_redis.png)](http://badge.fury.io/rb/mock_redis)
4
- [![Build Status](https://travis-ci.org/causes/mock_redis.png)](https://travis-ci.org/causes/mock_redis)
5
- [![Dependency Status](https://gemnasium.com/causes/mock_redis.svg)](https://gemnasium.com/causes/mock_redis)
3
+ [![Gem Version](https://badge.fury.io/rb/mock_redis.svg)](http://badge.fury.io/rb/mock_redis)
4
+ [![Build Status](https://travis-ci.org/brigade/mock_redis.svg)](https://travis-ci.org/brigade/mock_redis)
5
+ [![Dependency Status](https://gemnasium.com/brigade/mock_redis.svg)](https://gemnasium.com/brigade/mock_redis)
6
6
 
7
7
  MockRedis provides the same interface as `redis-rb`, but it stores its
8
8
  data in memory instead of talking to a Redis server. It is intended
@@ -10,7 +10,8 @@ class MockRedis
10
10
  with_hash_at(key) do |hash|
11
11
  if field.is_a?(Array)
12
12
  orig_size = hash.size
13
- hash.delete_if { |k,v| field.include?(k) }
13
+ fields = field.map(&:to_s)
14
+ hash.delete_if { |k,v| fields.include?(k) }
14
15
  orig_size - hash.size
15
16
  else
16
17
  hash.delete(field.to_s) ? 1 : 0
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  class MockRedis
3
- VERSION = '0.14.0'
3
+ VERSION = '0.14.1'
4
4
  end
data/mock_redis.gemspec CHANGED
@@ -6,9 +6,9 @@ Gem::Specification.new do |s|
6
6
  s.version = MockRedis::VERSION
7
7
  s.license = 'MIT'
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ['Causes Engineering', 'Samuel Merritt']
10
- s.email = ['eng@causes.com']
11
- s.homepage = 'https://github.com/causes/mock_redis'
9
+ s.authors = ['Brigade Engineering', 'Samuel Merritt']
10
+ s.email = ['eng@brigade.com']
11
+ s.homepage = 'https://github.com/brigade/mock_redis'
12
12
  s.summary = 'Redis mock that just lives in memory; useful for testing.'
13
13
 
14
14
  s.description = <<-EOS.strip.gsub(/\s+/, ' ')
@@ -17,12 +17,12 @@ Gem::Specification.new do |s|
17
17
  EOS
18
18
 
19
19
  s.files = `git ls-files`.split("\n")
20
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
+ s.test_files = `git ls-files -- spec/*`.split("\n")
21
21
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
22
22
  s.require_paths = ['lib']
23
23
 
24
24
  s.add_development_dependency 'rake', '~> 10.0'
25
- s.add_development_dependency 'redis', '~> 3.0.0'
26
- s.add_development_dependency 'rspec', '~> 3.1.0'
25
+ s.add_development_dependency 'redis', '~> 3.2.0'
26
+ s.add_development_dependency 'rspec', '~> 3.0'
27
27
  s.add_development_dependency 'rspec-its', '~> 1.0'
28
28
  end
@@ -43,5 +43,12 @@ describe "#hdel(key, field)" do
43
43
  @redises.get(@key).should be_nil
44
44
  end
45
45
 
46
+ it "treats variable arguments as strings" do
47
+ field = 2
48
+ @redises.hset(@key, field, 'two')
49
+ @redises.hdel(@key, [field])
50
+ @redises.hget(@key, field).should be_nil
51
+ end
52
+
46
53
  it_should_behave_like "a hash-only command"
47
54
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mock_redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
- - Causes Engineering
7
+ - Brigade Engineering
8
8
  - Samuel Merritt
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-09 00:00:00.000000000 Z
12
+ date: 2015-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -31,28 +31,28 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 3.0.0
34
+ version: 3.2.0
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 3.0.0
41
+ version: 3.2.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 3.1.0
48
+ version: '3.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 3.1.0
55
+ version: '3.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rspec-its
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -70,7 +70,7 @@ dependencies:
70
70
  description: Instantiate one with `redis = MockRedis.new` and treat it like you would
71
71
  a normal Redis object. It supports all the usual Redis operations.
72
72
  email:
73
- - eng@causes.com
73
+ - eng@brigade.com
74
74
  executables: []
75
75
  extensions: []
76
76
  extra_rdoc_files: []
@@ -243,7 +243,7 @@ files:
243
243
  - spec/support/shared_examples/only_operates_on_zsets.rb
244
244
  - spec/support/shared_examples/sorts_enumerables.rb
245
245
  - spec/transactions_spec.rb
246
- homepage: https://github.com/causes/mock_redis
246
+ homepage: https://github.com/brigade/mock_redis
247
247
  licenses:
248
248
  - MIT
249
249
  metadata: {}
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
263
263
  version: '0'
264
264
  requirements: []
265
265
  rubyforge_project:
266
- rubygems_version: 2.2.2
266
+ rubygems_version: 2.4.5
267
267
  signing_key:
268
268
  specification_version: 4
269
269
  summary: Redis mock that just lives in memory; useful for testing.