redis-rack 2.1.3 → 3.0.0

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
  SHA256:
3
- metadata.gz: 5f2e06d541ce7ff62d7050dc3191e5b975209c558de584ad5f9a5d09d3e837c8
4
- data.tar.gz: fe1d5072ca29a096a1e2ee2ea14c6b7cbf1282326c929a499bf90a0e30be51e6
3
+ metadata.gz: 4f857cc2c27d342862ab4a3008a73348bff629c16c6520f45e7d2cd00018c93c
4
+ data.tar.gz: b196046aeaa0baff1e387871499bde3e2768378c779f8f120ef3d9d2c91ef8c8
5
5
  SHA512:
6
- metadata.gz: c01e59a29fe6c2d589f7650de251facffbf49915bc91cda3bbf9b1cbabd6b03b574e1d509aea580af214e5aa5d9a395bbc8f6e74359768cc22548de403e47621
7
- data.tar.gz: f997ed68a47b214def068eb0ef0d8788af496523da9347dda26022df640dd6375d24a6407d3d6a9f72713c8b2811e28048dc2daf2b0ef493b1ff9e6bcde86235
6
+ metadata.gz: adc22c8d1e053309291d8649d86ed9b1811812418e62f9973a0416b10f950c0e7867b8b364c90bb377fd2b2e819a2e9b2f320e9676ebb8b4bf866a03373587f0
7
+ data.tar.gz: dd27364acbb9b7876fb3acb510d533fcc9ac4197d91eca2f98fad97b9cf7303a3a8bf256458b444ec4078cc163e2b88fcb5fb82ecab83e1f34e16bff515a0f00
@@ -0,0 +1,13 @@
1
+ changelog:
2
+ exclude:
3
+ labels: [dependencies]
4
+ authors: [renovate-bot]
5
+ categories:
6
+ - title: Breaking Changes
7
+ labels: [breaking]
8
+ - title: New Features
9
+ labels: [enhancement]
10
+ - title: Bug Fixes
11
+ labels: [bug]
12
+ - title: Other Changes
13
+ labels: ["*"]
@@ -0,0 +1,19 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches-ignore: [master]
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ matrix:
10
+ ruby-version: ["2.6", "2.7", "3.0", "3.1", "jruby"]
11
+
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - run: sudo apt-get install -y --no-install-recommends redis-server
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: ${{ matrix.ruby-version }}
18
+ bundler-cache: true
19
+ - run: bundle exec rake
@@ -0,0 +1,31 @@
1
+ name: Publish
2
+ on:
3
+ push:
4
+ tags: [v*]
5
+ permissions:
6
+ contents: write
7
+ concurrency:
8
+ group: ${{ github.workflow }}-${{ github.ref }}
9
+ cancel-in-progress: true
10
+ jobs:
11
+ release:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ bundler-cache: true
18
+ - run: |
19
+ mkdir -p ~/.gem
20
+ cat << EOF > ~/.gem/credentials
21
+ ---
22
+ :rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
23
+ EOF
24
+
25
+ chmod 0600 ~/.gem/credentials
26
+ - run: bundle exec rake release
27
+ - uses: softprops/action-gh-release@v1
28
+ with:
29
+ files: "*.gem"
30
+ generate_release_notes: true
31
+ prerelease: ${{ contains(github.ref, '.pre') }}
data/Gemfile CHANGED
@@ -1,5 +1,6 @@
1
1
  source 'https://rubygems.org'
2
+
2
3
  gemspec
3
- gem 'redis-store-testing', github: 'redis-store/testing'
4
4
 
5
- gem "appraisal", "~> 2.2"
5
+ gem 'redis-store-testing', github: 'redis-store/testing'
6
+ gem 'appraisal', '~> 2.2'
data/README.md CHANGED
@@ -8,7 +8,7 @@ See the main [redis-store readme] for general guidelines.
8
8
  as a backend store for the `Rack::Cache` HTTP cache. All this gem does
9
9
  is store the Rack session within Redis.
10
10
 
11
- [![Build Status](https://secure.travis-ci.org/redis-store/redis-rack.png?branch=master)](http://travis-ci.org/redis-store/redis-rack?branch=master)
11
+ [![Build Status](https://github.com/redis-store/redis-rack/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/redis-store/redis-rack/actions/workflows/ruby.yml?query=branch%3Amaster)
12
12
  [![Code Climate](https://codeclimate.com/github/redis-store/redis-store.png)](https://codeclimate.com/github/redis-store/redis-rack)
13
13
  [![Gem Version](https://badge.fury.io/rb/redis-rack.png)](http://badge.fury.io/rb/redis-rack)
14
14
 
@@ -66,7 +66,7 @@ module Rack
66
66
  end
67
67
 
68
68
  def with_lock(req, default = nil)
69
- @mutex.lock if req.multithread? && threadsafe?
69
+ @mutex.lock if threadsafe?
70
70
  yield
71
71
  rescue Errno::ECONNREFUSED
72
72
  if $VERBOSE
@@ -1,6 +1,8 @@
1
1
  class Redis
2
2
  module Rack
3
3
  class Connection
4
+ POOL_KEYS = %i[pool pool_size pool_timeout].freeze
5
+
4
6
  def initialize(options = {})
5
7
  @options = options
6
8
  @store = options[:redis_store]
@@ -24,7 +26,9 @@ class Redis
24
26
  end
25
27
 
26
28
  def pooled?
27
- [:pool, :pool_size, :pool_timeout].any? { |key| @options.key?(key) }
29
+ return @pooled if defined?(@pooled)
30
+
31
+ @pooled = POOL_KEYS.any? { |key| @options.key?(key) }
28
32
  end
29
33
 
30
34
  def pool
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  module Rack
3
- VERSION = '2.1.3'
3
+ VERSION = '3.0.0'
4
4
  end
5
5
  end
data/redis-rack.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
 
20
20
  s.add_runtime_dependency 'redis-store', ['< 2', '>= 1.2']
21
- s.add_runtime_dependency 'rack', '>= 2.0.8', '< 3'
21
+ s.add_runtime_dependency 'rack-session', '>= 0.2.0'
22
22
 
23
23
  s.add_development_dependency 'rake', '>= 12.3.3'
24
24
  s.add_development_dependency 'bundler', '> 1', '< 3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-11 00:00:00.000000000 Z
11
+ date: 2023-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-store
@@ -31,25 +31,19 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '1.2'
33
33
  - !ruby/object:Gem::Dependency
34
- name: rack
34
+ name: rack-session
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 2.0.8
40
- - - "<"
41
- - !ruby/object:Gem::Version
42
- version: '3'
39
+ version: 0.2.0
43
40
  type: :runtime
44
41
  prerelease: false
45
42
  version_requirements: !ruby/object:Gem::Requirement
46
43
  requirements:
47
44
  - - ">="
48
45
  - !ruby/object:Gem::Version
49
- version: 2.0.8
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: '3'
46
+ version: 0.2.0
53
47
  - !ruby/object:Gem::Dependency
54
48
  name: rake
55
49
  requirement: !ruby/object:Gem::Requirement
@@ -134,9 +128,11 @@ extensions: []
134
128
  extra_rdoc_files: []
135
129
  files:
136
130
  - ".github/auto-assign-issues.yml"
131
+ - ".github/release.yml"
132
+ - ".github/workflows/ci.yml"
133
+ - ".github/workflows/publish.yml"
137
134
  - ".gitignore"
138
135
  - ".ruby-version"
139
- - ".travis.yml"
140
136
  - CHANGELOG.md
141
137
  - CODEOWNERS
142
138
  - Gemfile
@@ -172,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
172
168
  - !ruby/object:Gem::Version
173
169
  version: '0'
174
170
  requirements: []
175
- rubygems_version: 3.1.2
171
+ rubygems_version: 3.3.16
176
172
  signing_key:
177
173
  specification_version: 4
178
174
  summary: Redis Store for Rack
data/.travis.yml DELETED
@@ -1,23 +0,0 @@
1
- language: ruby
2
- script: bundle exec rake
3
- rvm:
4
- - 2.2
5
- - 2.3
6
- - 2.4
7
- - 2.5
8
- - 2.6
9
- - 2.7
10
- - ruby-head
11
- - jruby-head
12
- matrix:
13
- allow_failures:
14
- - rvm: jruby-head
15
- - rvm: ruby-head
16
- deploy:
17
- provider: rubygems
18
- api_key:
19
- secure: VTosVmCdLWUGK8KyzovYri7ySfd7fACtfL8MClEBBHnI+m2cLCpmtCJ7Z1X7z9BXlj974EDaF8V9iRKzfksXIf8aaPfVQw9AW94fLJZbfSB8YGOGyNbPu9YECoZQB1aZ2lw9s/aEdfwCbmqizO/fYpG3YoPKJdm1ZJpNOFR37Xk=
20
- gem: redis-rack
21
- on:
22
- tags: true
23
- repo: redis-store/redis-rack