redis-rack 2.0.5 → 2.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 66572ef2577985ef4e66d8eff099b41cd2522452
4
- data.tar.gz: 021ff43d18f10505f52187456132922eddea15b8
2
+ SHA256:
3
+ metadata.gz: 68b8d92fa59d3d7167cf87bd16e1e62ca34ba905a901964a6d386b47155f8da0
4
+ data.tar.gz: 3c8b27ef07b66c2050d053287c03eb3aee64860fda3e4ff806200d9cc663f7ec
5
5
  SHA512:
6
- metadata.gz: dd6ac3b843ebadac7e56d802680badd2163ac0320a90377e94f730465c739ee74738e5c2b347a34c4fae1b6d94160a8f988c8e748ab540c820750ed7792b2ae0
7
- data.tar.gz: b26ae6bfb3306d19260454d41ce2559e88997365bfc713c10fd33168b8e70ea052b45be7fed5e5370a8c36b0b66c5415935df19d77ae2a6cef1db64fd925e36c
6
+ metadata.gz: 351e468a771f67ed2e05c3620735636f23f7ad40e338d420c3662a2f7bfc1abdf82e3cf30c1e9a8268452ed1451e87740cc7fabb110b5c60251717a84b2c70f4
7
+ data.tar.gz: b93772d79076558bf42e60effd452a47699e215538e73435ec70f500ee8e2902b65b7c1f2eb40d4019884c12fbf81ab57b940702657b4295581abe820483631d
@@ -0,0 +1,2 @@
1
+ assignees:
2
+ - tubbo
@@ -1,16 +1,22 @@
1
1
  language: ruby
2
- script: 'bundle exec rake'
2
+ script: bundle exec rake
3
3
  rvm:
4
- - 2.2.3
5
- - 2.3.1
6
- - ruby-head
7
- - jruby-head
8
-
4
+ - 2.2.3
5
+ - 2.3.1
6
+ - ruby-head
7
+ - jruby-head
9
8
  matrix:
10
9
  allow_failures:
11
- - rvm: jruby-head
12
- - rvm: ruby-head
13
- # Put this in your .travis.yml
10
+ - rvm: jruby-head
11
+ - rvm: ruby-head
14
12
  gemfile:
15
- - gemfiles/rack_2.gemfile
16
- - gemfiles/rack_1.gemfile
13
+ - gemfiles/rack_2.gemfile
14
+ - gemfiles/rack_1.gemfile
15
+ deploy:
16
+ provider: rubygems
17
+ api_key:
18
+ secure: VTosVmCdLWUGK8KyzovYri7ySfd7fACtfL8MClEBBHnI+m2cLCpmtCJ7Z1X7z9BXlj974EDaF8V9iRKzfksXIf8aaPfVQw9AW94fLJZbfSB8YGOGyNbPu9YECoZQB1aZ2lw9s/aEdfwCbmqizO/fYpG3YoPKJdm1ZJpNOFR37Xk=
19
+ gem: redis-rack
20
+ on:
21
+ tags: true
22
+ repo: redis-store/redis-rack
@@ -0,0 +1 @@
1
+ * @tubbo
@@ -9,6 +9,10 @@ class Redis
9
9
  if @pool && !@pool.is_a?(ConnectionPool)
10
10
  raise ArgumentError, "pool must be an instance of ConnectionPool"
11
11
  end
12
+
13
+ if @store && !@store.is_a?(Redis::Store)
14
+ raise ArgumentError, "redis_store must be an instance of Redis::Store (currently #{@store.class.name})"
15
+ end
12
16
  end
13
17
 
14
18
  def with(&block)
@@ -35,7 +39,7 @@ class Redis
35
39
  {
36
40
  size: @options[:pool_size],
37
41
  timeout: @options[:pool_timeout]
38
- }
42
+ }.reject { |key, value| value.nil? }.to_h
39
43
  end
40
44
  end
41
45
  end
@@ -1,6 +1,6 @@
1
1
  class Redis
2
2
  module Rack
3
- VERSION = '2.0.5'
3
+ VERSION = '2.0.6'
4
4
  end
5
5
  end
6
6
 
@@ -56,12 +56,29 @@ class Redis
56
56
  conn.store.must_equal(store)
57
57
  end
58
58
 
59
+ it "throws an error when provided Redis store is not the expected type" do
60
+ assert_raises ArgumentError do
61
+ Connection.new(redis_store: ::Redis.new)
62
+ end
63
+ end
64
+
59
65
  it "uses the specified Redis server when provided" do
60
66
  conn = Connection.new(redis_server: 'redis://127.0.0.1:6380/1')
61
67
 
62
68
  conn.pooled?.must_equal false
63
69
  conn.store.to_s.must_match(/127\.0\.0\.1:6380 against DB 1$/)
64
70
  end
71
+
72
+ it "does not include nil options for the connection pool" do
73
+ conn = Connection.new
74
+ conn.pool_options.must_be_empty
75
+
76
+ conn = Connection.new(pool_size: nil)
77
+ conn.pool_options.must_be_empty
78
+
79
+ conn = Connection.new(pool_timeout: nil)
80
+ conn.pool_options.must_be_empty
81
+ end
65
82
  end
66
83
  end
67
84
  end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-09 00:00:00.000000000 Z
11
+ date: 2019-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-store
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "<"
18
- - !ruby/object:Gem::Version
19
- version: '2'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: '1.2'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "<"
28
- - !ruby/object:Gem::Version
29
- version: '2'
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: '1.2'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rack
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -155,9 +155,11 @@ executables: []
155
155
  extensions: []
156
156
  extra_rdoc_files: []
157
157
  files:
158
+ - ".github/auto-assign-issues.yml"
158
159
  - ".gitignore"
159
160
  - ".travis.yml"
160
161
  - Appraisals
162
+ - CODEOWNERS
161
163
  - Gemfile
162
164
  - MIT-LICENSE
163
165
  - README.md
@@ -193,8 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
195
  - !ruby/object:Gem::Version
194
196
  version: '0'
195
197
  requirements: []
196
- rubyforge_project: redis-rack
197
- rubygems_version: 2.6.14
198
+ rubygems_version: 3.0.3
198
199
  signing_key:
199
200
  specification_version: 4
200
201
  summary: Redis Store for Rack