redis-rack 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +2 -4
- data/.travis.yml +14 -0
- data/Gemfile +4 -3
- data/MIT-LICENSE +1 -1
- data/README.md +26 -34
- data/Rakefile +2 -6
- data/lib/rack/session/redis.rb +2 -2
- data/lib/redis/rack/version.rb +1 -1
- data/redis-rack.gemspec +10 -9
- data/test/redis/rack/version_test.rb +2 -2
- data/test/test_helper.rb +2 -4
- metadata +27 -43
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0875819787ed6a3bc60770ed250109988d8f2d22
|
4
|
+
data.tar.gz: 07fee019c95dcbd252b2b9a172f47fc252c21b6d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3d09089df5052ab9ff4164d928c1647c71d9b9b774c4e1517c5ce7afabb7efead6c35c2807cfb9273085a0dd7cf9bab48f39686cecd1d6eddc05faa04bfebd14
|
7
|
+
data.tar.gz: bb2f2e77cf1a1d13a3c3e2a161d7c55d951fa7cca49220ef40bbc5f93872e80fab6bb277b259c69e42734d1621968ad118863191afc8f31128f253307d3f99d0
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
source
|
1
|
+
source 'https://rubygems.org'
|
2
2
|
gemspec
|
3
3
|
|
4
|
-
|
5
|
-
gem '
|
4
|
+
if ::File.directory?(gem_path = '../redis-store')
|
5
|
+
gem 'redis-store', '~> 1.1.0', path: gem_path
|
6
|
+
end
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,51 +1,43 @@
|
|
1
1
|
# Redis stores for Rack
|
2
2
|
|
3
|
-
__`redis-rack`__ provides a Redis backed session store __Rack__.
|
3
|
+
__`redis-rack`__ provides a Redis backed session store __Rack__. See the main [redis-store readme](https://github.com/redis-store/redis-store) for general guidelines.
|
4
4
|
|
5
|
-
##
|
5
|
+
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
brew install redis
|
12
|
-
|
13
|
-
### Option 2: From Source
|
14
|
-
|
15
|
-
Download and install Redis from [http://redis.io](http://redis.io/)
|
16
|
-
|
17
|
-
wget http://redis.googlecode.com/files/redis-2.4.15.tar.gz
|
18
|
-
tar -zxf redis-2.4.15.tar.gz
|
19
|
-
mv redis-2.4.15 redis
|
20
|
-
cd redis
|
21
|
-
make
|
7
|
+
```ruby
|
8
|
+
# Gemfile
|
9
|
+
gem 'redis-rack'
|
10
|
+
```
|
22
11
|
|
23
12
|
## Usage
|
24
13
|
|
25
|
-
|
26
|
-
gem 'redis-rack'
|
14
|
+
If you are using redis-store with Rails, consider using the [redis-rails gem](https://github.com/redis-store/redis-rails) instead. For standalone usage:
|
27
15
|
|
28
|
-
|
16
|
+
```ruby
|
17
|
+
# config.ru
|
18
|
+
require 'rack'
|
19
|
+
require 'rack/session/redis'
|
29
20
|
|
30
|
-
|
31
|
-
|
32
|
-
require 'rack/session/redis'
|
33
|
-
|
34
|
-
use Rack::Session::Redis
|
35
|
-
|
36
|
-
#### Configuration
|
37
|
-
|
38
|
-
For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
|
21
|
+
use Rack::Session::Redis
|
22
|
+
```
|
39
23
|
|
40
24
|
## Running tests
|
41
25
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
26
|
+
```shell
|
27
|
+
gem install bundler
|
28
|
+
git clone git://github.com/redis-store/redis-rack.git
|
29
|
+
cd redis-rack
|
30
|
+
git checkout -t origin/1.4.x
|
31
|
+
bundle install
|
32
|
+
bundle exec rake
|
33
|
+
```
|
46
34
|
|
47
35
|
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
|
48
36
|
|
37
|
+
## Status
|
38
|
+
|
39
|
+
[![Build Status](https://secure.travis-ci.org/redis-store/redis-rack.png?branch=1.4.x)](http://travis-ci.org/jodosha/redis-rack?branch=1.4.x)
|
40
|
+
|
49
41
|
## Copyright
|
50
42
|
|
51
|
-
|
43
|
+
2009 - 2013 Luca Guidi - [http://lucaguidi.com](http://lucaguidi.com), released under the MIT license
|
data/Rakefile
CHANGED
data/lib/rack/session/redis.rb
CHANGED
@@ -14,7 +14,7 @@ module Rack
|
|
14
14
|
super
|
15
15
|
|
16
16
|
@mutex = Mutex.new
|
17
|
-
@pool = ::Redis::Factory.create @default_options[:redis_server]
|
17
|
+
@pool = ::Redis::Store::Factory.create @default_options[:redis_server]
|
18
18
|
end
|
19
19
|
|
20
20
|
def generate_sid
|
@@ -28,7 +28,7 @@ module Rack
|
|
28
28
|
with_lock(env, [nil, {}]) do
|
29
29
|
unless sid and session = @pool.get(sid)
|
30
30
|
sid, session = generate_sid, {}
|
31
|
-
unless /^OK/ =~ @pool.set(sid, session)
|
31
|
+
unless /^OK/ =~ @pool.set(sid, session, @default_options)
|
32
32
|
raise "Session collision on '#{sid.inspect}'"
|
33
33
|
end
|
34
34
|
end
|
data/lib/redis/rack/version.rb
CHANGED
data/redis-rack.gemspec
CHANGED
@@ -5,11 +5,12 @@ require 'redis/rack/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'redis-rack'
|
7
7
|
s.version = Redis::Rack::VERSION
|
8
|
-
s.authors = ['Luca Guidi'
|
8
|
+
s.authors = ['Luca Guidi']
|
9
9
|
s.email = ['me@lucaguidi.com']
|
10
|
-
s.homepage =
|
10
|
+
s.homepage = 'http://redis-store.org/redis-rack'
|
11
11
|
s.summary = %q{Redis Store for Rack}
|
12
|
-
s.description = %q{Redis Store for Rack}
|
12
|
+
s.description = %q{Redis Store for Rack applications}
|
13
|
+
s.license = 'MIT'
|
13
14
|
|
14
15
|
s.rubyforge_project = 'redis-rack'
|
15
16
|
|
@@ -19,12 +20,12 @@ Gem::Specification.new do |s|
|
|
19
20
|
s.require_paths = ["lib"]
|
20
21
|
|
21
22
|
s.add_runtime_dependency 'redis-store', '~> 1.1.0'
|
22
|
-
s.add_runtime_dependency 'rack', '~> 1.4.
|
23
|
+
s.add_runtime_dependency 'rack', '~> 1.4.0'
|
23
24
|
|
24
|
-
s.add_development_dependency 'rake',
|
25
|
-
s.add_development_dependency 'bundler',
|
26
|
-
s.add_development_dependency 'mocha',
|
27
|
-
s.add_development_dependency 'minitest',
|
28
|
-
s.add_development_dependency '
|
25
|
+
s.add_development_dependency 'rake', '~> 10'
|
26
|
+
s.add_development_dependency 'bundler', '~> 1.3'
|
27
|
+
s.add_development_dependency 'mocha', '~> 0.14.0'
|
28
|
+
s.add_development_dependency 'minitest', '~> 5'
|
29
|
+
s.add_development_dependency 'redis-store-testing'
|
29
30
|
end
|
30
31
|
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,21 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
5
|
-
prerelease:
|
4
|
+
version: 1.4.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Luca Guidi
|
9
|
-
- Matt Horan
|
10
8
|
autorequire:
|
11
9
|
bindir: bin
|
12
10
|
cert_chain: []
|
13
|
-
date:
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
14
12
|
dependencies:
|
15
13
|
- !ruby/object:Gem::Dependency
|
16
14
|
name: redis-store
|
17
15
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
16
|
requirements:
|
20
17
|
- - ~>
|
21
18
|
- !ruby/object:Gem::Version
|
@@ -23,7 +20,6 @@ dependencies:
|
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
23
|
requirements:
|
28
24
|
- - ~>
|
29
25
|
- !ruby/object:Gem::Version
|
@@ -31,100 +27,88 @@ dependencies:
|
|
31
27
|
- !ruby/object:Gem::Dependency
|
32
28
|
name: rack
|
33
29
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
30
|
requirements:
|
36
31
|
- - ~>
|
37
32
|
- !ruby/object:Gem::Version
|
38
|
-
version: 1.4.
|
33
|
+
version: 1.4.0
|
39
34
|
type: :runtime
|
40
35
|
prerelease: false
|
41
36
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
37
|
requirements:
|
44
38
|
- - ~>
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: 1.4.
|
40
|
+
version: 1.4.0
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: rake
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
44
|
requirements:
|
52
45
|
- - ~>
|
53
46
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
47
|
+
version: '10'
|
55
48
|
type: :development
|
56
49
|
prerelease: false
|
57
50
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
51
|
requirements:
|
60
52
|
- - ~>
|
61
53
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
54
|
+
version: '10'
|
63
55
|
- !ruby/object:Gem::Dependency
|
64
56
|
name: bundler
|
65
57
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
58
|
requirements:
|
68
59
|
- - ~>
|
69
60
|
- !ruby/object:Gem::Version
|
70
|
-
version: '1.
|
61
|
+
version: '1.3'
|
71
62
|
type: :development
|
72
63
|
prerelease: false
|
73
64
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
65
|
requirements:
|
76
66
|
- - ~>
|
77
67
|
- !ruby/object:Gem::Version
|
78
|
-
version: '1.
|
68
|
+
version: '1.3'
|
79
69
|
- !ruby/object:Gem::Dependency
|
80
70
|
name: mocha
|
81
71
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
72
|
requirements:
|
84
73
|
- - ~>
|
85
74
|
- !ruby/object:Gem::Version
|
86
|
-
version: 0.
|
75
|
+
version: 0.14.0
|
87
76
|
type: :development
|
88
77
|
prerelease: false
|
89
78
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
79
|
requirements:
|
92
80
|
- - ~>
|
93
81
|
- !ruby/object:Gem::Version
|
94
|
-
version: 0.
|
82
|
+
version: 0.14.0
|
95
83
|
- !ruby/object:Gem::Dependency
|
96
84
|
name: minitest
|
97
85
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
86
|
requirements:
|
100
87
|
- - ~>
|
101
88
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
89
|
+
version: '5'
|
103
90
|
type: :development
|
104
91
|
prerelease: false
|
105
92
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
93
|
requirements:
|
108
94
|
- - ~>
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
96
|
+
version: '5'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: redis-store-testing
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
|
-
none: false
|
115
100
|
requirements:
|
116
|
-
- -
|
101
|
+
- - '>='
|
117
102
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
103
|
+
version: '0'
|
119
104
|
type: :development
|
120
105
|
prerelease: false
|
121
106
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
107
|
requirements:
|
124
|
-
- -
|
108
|
+
- - '>='
|
125
109
|
- !ruby/object:Gem::Version
|
126
|
-
version:
|
127
|
-
description: Redis Store for Rack
|
110
|
+
version: '0'
|
111
|
+
description: Redis Store for Rack applications
|
128
112
|
email:
|
129
113
|
- me@lucaguidi.com
|
130
114
|
executables: []
|
@@ -132,6 +116,7 @@ extensions: []
|
|
132
116
|
extra_rdoc_files: []
|
133
117
|
files:
|
134
118
|
- .gitignore
|
119
|
+
- .travis.yml
|
135
120
|
- Gemfile
|
136
121
|
- MIT-LICENSE
|
137
122
|
- README.md
|
@@ -143,32 +128,31 @@ files:
|
|
143
128
|
- test/rack/session/redis_test.rb
|
144
129
|
- test/redis/rack/version_test.rb
|
145
130
|
- test/test_helper.rb
|
146
|
-
homepage: http://
|
147
|
-
licenses:
|
131
|
+
homepage: http://redis-store.org/redis-rack
|
132
|
+
licenses:
|
133
|
+
- MIT
|
134
|
+
metadata: {}
|
148
135
|
post_install_message:
|
149
136
|
rdoc_options: []
|
150
137
|
require_paths:
|
151
138
|
- lib
|
152
139
|
required_ruby_version: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
140
|
requirements:
|
155
|
-
- -
|
141
|
+
- - '>='
|
156
142
|
- !ruby/object:Gem::Version
|
157
143
|
version: '0'
|
158
144
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
|
-
none: false
|
160
145
|
requirements:
|
161
|
-
- -
|
146
|
+
- - '>='
|
162
147
|
- !ruby/object:Gem::Version
|
163
148
|
version: '0'
|
164
149
|
requirements: []
|
165
150
|
rubyforge_project: redis-rack
|
166
|
-
rubygems_version:
|
151
|
+
rubygems_version: 2.0.3
|
167
152
|
signing_key:
|
168
|
-
specification_version:
|
153
|
+
specification_version: 4
|
169
154
|
summary: Redis Store for Rack
|
170
155
|
test_files:
|
171
156
|
- test/rack/session/redis_test.rb
|
172
157
|
- test/redis/rack/version_test.rb
|
173
158
|
- test/test_helper.rb
|
174
|
-
has_rdoc:
|