redis-actionpack 5.0.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +7 -8
- data/Gemfile +0 -8
- data/README.md +3 -1
- data/lib/redis/actionpack/version.rb +1 -1
- data/redis-actionpack.gemspec +4 -4
- data/test/gemfiles/Gemfile.rails-4.0.x +3 -7
- data/test/gemfiles/Gemfile.rails-4.1.x +3 -7
- data/test/gemfiles/Gemfile.rails-4.2.x +3 -7
- data/test/gemfiles/Gemfile.rails-5.0.x +3 -9
- data/test/integration/redis_store_integration_test.rb +44 -44
- metadata +26 -16
- data/test/redis/actionpack/version_test.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4372ed1017dfad6a583f6b759134e465612cac1
|
4
|
+
data.tar.gz: 2bdf95ee3cc854af1dc008ca0034d80b6462bedd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 886c02951f763d866f9163727cf58608e44b47dc4d55f38b029cb8d9569c7d46223f2eb1ab02e8ced4b18d8be2b42d4064c31871152b7a20773ffaa68a20a173
|
7
|
+
data.tar.gz: 71400d65a5db56b45f8a8d6660e7791b84c11d544fb695173cf165eefeb61a22959ff430b6a0b3d2e247707d1997972d95d939f5f4346e4cb520569d0141de7c
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -3,13 +3,11 @@ before_install: gem install bundler
|
|
3
3
|
script: 'bundle exec rake'
|
4
4
|
rvm:
|
5
5
|
- 1.9.3
|
6
|
-
- 2.0
|
6
|
+
- 2.0
|
7
7
|
- 2.1
|
8
8
|
- 2.2.4
|
9
|
-
- 2.3.
|
9
|
+
- 2.3.1
|
10
10
|
- ruby-head
|
11
|
-
- jruby-19mode
|
12
|
-
- jruby-head
|
13
11
|
|
14
12
|
gemfile:
|
15
13
|
- test/gemfiles/Gemfile.rails-4.0.x
|
@@ -21,12 +19,13 @@ matrix:
|
|
21
19
|
exclude:
|
22
20
|
- rvm: 1.9.3
|
23
21
|
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
24
|
-
- rvm: 2.0
|
22
|
+
- rvm: 2.0
|
25
23
|
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
26
24
|
- rvm: 2.1
|
27
25
|
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
28
|
-
- rvm:
|
29
|
-
gemfile: test/gemfiles/Gemfile.rails-
|
26
|
+
- rvm: ruby-head
|
27
|
+
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
28
|
+
- rvm: ruby-head
|
29
|
+
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
30
30
|
allow_failures:
|
31
|
-
- rvm: jruby-head
|
32
31
|
- rvm: ruby-head
|
data/Gemfile
CHANGED
@@ -1,10 +1,2 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec
|
3
|
-
|
4
|
-
if ::File.directory?(gem_path = '../redis-store')
|
5
|
-
gem 'redis-store', '~> 1.2.0.pre', path: gem_path
|
6
|
-
end
|
7
|
-
|
8
|
-
if ::File.directory?(gem_path = '../redis-rack')
|
9
|
-
gem 'redis-rack', '~> 2.0.0.pre', path: gem_path
|
10
|
-
end
|
data/README.md
CHANGED
@@ -31,7 +31,9 @@ If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bun
|
|
31
31
|
|
32
32
|
## Status
|
33
33
|
|
34
|
-
[![Gem Version](https://badge.fury.io/rb/redis-actionpack.png)](http://badge.fury.io/rb/redis-actionpack)
|
34
|
+
[![Gem Version](https://badge.fury.io/rb/redis-actionpack.png)](http://badge.fury.io/rb/redis-actionpack)
|
35
|
+
[![Build Status](https://secure.travis-ci.org/redis-store/redis-actionpack.png?branch=master)](http://travis-ci.org/redis-store/redis-actionpack?branch=master)
|
36
|
+
[![Code Climate](https://codeclimate.com/github/redis-store/redis-actionpack.png)](https://codeclimate.com/github/redis-store/redis-actionpack)
|
35
37
|
|
36
38
|
## Copyright
|
37
39
|
|
data/redis-actionpack.gemspec
CHANGED
@@ -19,14 +19,14 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ['lib']
|
21
21
|
|
22
|
-
s.add_runtime_dependency 'redis-store', '
|
23
|
-
s.add_runtime_dependency 'redis-rack', '
|
24
|
-
s.add_runtime_dependency 'actionpack', '>= 4.0
|
22
|
+
s.add_runtime_dependency 'redis-store', '>= 1.1.0', '< 1.4.0'
|
23
|
+
s.add_runtime_dependency 'redis-rack', '>= 1', '< 3'
|
24
|
+
s.add_runtime_dependency 'actionpack', '>= 4.0', '< 6'
|
25
25
|
|
26
26
|
s.add_development_dependency 'rake', '~> 10'
|
27
27
|
s.add_development_dependency 'bundler', '~> 1.3'
|
28
28
|
s.add_development_dependency 'mocha', '~> 0.14.0'
|
29
|
-
s.add_development_dependency 'minitest-
|
29
|
+
s.add_development_dependency 'minitest-rails'
|
30
30
|
s.add_development_dependency 'tzinfo'
|
31
31
|
# s.add_development_dependency 'mini_backtrace'
|
32
32
|
s.add_development_dependency 'redis-store-testing'
|
@@ -1,14 +1,10 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec :path => './../..'
|
3
3
|
|
4
|
-
|
5
|
-
gem 'redis-store', '~> 1.1.0', path: gem_path
|
6
|
-
end
|
4
|
+
gem 'redis-store', '~> 1.1.0'
|
7
5
|
|
8
|
-
|
9
|
-
gem 'redis-rack', '~> 1.5.0', path: gem_path
|
10
|
-
end
|
6
|
+
gem 'redis-rack', '~> 1.5.0'
|
11
7
|
|
12
8
|
gem 'actionpack', '~> 4.0.0'
|
13
9
|
|
14
|
-
gem 'minitest-
|
10
|
+
gem 'minitest-rails', '~> 1.0.0'
|
@@ -1,14 +1,10 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec :path => './../..'
|
3
3
|
|
4
|
-
|
5
|
-
gem 'redis-store', '~> 1.1.0', path: gem_path
|
6
|
-
end
|
4
|
+
gem 'redis-store', '~> 1.1.0'
|
7
5
|
|
8
|
-
|
9
|
-
gem 'redis-rack', '~> 1.5.0', path: gem_path
|
10
|
-
end
|
6
|
+
gem 'redis-rack', '~> 1.5.0'
|
11
7
|
|
12
8
|
gem 'actionpack', '~> 4.1.0'
|
13
9
|
|
14
|
-
gem 'minitest-
|
10
|
+
gem 'minitest-rails', '~> 2.2.0'
|
@@ -1,14 +1,10 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec :path => './../..'
|
3
3
|
|
4
|
-
|
5
|
-
gem 'redis-store', '~> 1.1.0', path: gem_path
|
6
|
-
end
|
4
|
+
gem 'redis-store', '~> 1.1.0'
|
7
5
|
|
8
|
-
|
9
|
-
gem 'redis-rack', '~> 1.5.0', path: gem_path
|
10
|
-
end
|
6
|
+
gem 'redis-rack', '~> 1.5.0'
|
11
7
|
|
12
8
|
gem 'actionpack', '~> 4.2.0'
|
13
9
|
|
14
|
-
gem 'minitest-
|
10
|
+
gem 'minitest-rails', '~> 2.2.0'
|
@@ -1,17 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec :path => './../..'
|
3
3
|
|
4
|
-
gem 'redis-store'
|
5
|
-
#if ::File.directory?(gem_path = '../redis-store')
|
6
|
-
# gem 'redis-store', '~> 1.1.0', path: gem_path
|
7
|
-
#end
|
4
|
+
gem 'redis-store'
|
8
5
|
|
9
6
|
gem 'redis-rack', github: 'redis-store/redis-rack'
|
10
|
-
#if ::File.directory?(gem_path = '../redis-rack')
|
11
|
-
# gem 'redis-rack', '~> 1.5.0', path: gem_path
|
12
|
-
#end
|
13
7
|
|
14
|
-
gem '
|
8
|
+
gem 'actionpack', '~> 5.0.0'
|
15
9
|
|
16
|
-
gem 'minitest-
|
10
|
+
gem 'minitest-rails'
|
17
11
|
|
@@ -7,82 +7,82 @@ class RedisStoreIntegrationTest < ::ActionDispatch::IntegrationTest
|
|
7
7
|
test "reads the data" do
|
8
8
|
with_test_route_set do
|
9
9
|
get '/set_session_value'
|
10
|
-
|
11
|
-
cookies['_session_id'].
|
10
|
+
assert_response :success
|
11
|
+
assert cookies['_session_id'].present?
|
12
12
|
|
13
13
|
get '/get_session_value'
|
14
|
-
|
15
|
-
response.body
|
14
|
+
assert_response :success
|
15
|
+
assert_equal response.body, 'foo: "bar"'
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
19
|
test "should get nil session value" do
|
20
20
|
with_test_route_set do
|
21
21
|
get '/get_session_value'
|
22
|
-
|
23
|
-
|
22
|
+
assert_response :success
|
23
|
+
assert_equal 'foo: nil', response.body
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
27
|
test "should delete the data after session reset" do
|
28
28
|
with_test_route_set do
|
29
29
|
get '/set_session_value'
|
30
|
-
|
31
|
-
cookies['_session_id'].
|
30
|
+
assert_response :success
|
31
|
+
assert cookies['_session_id'].present?
|
32
32
|
session_cookie = cookies.send(:hash_for)['_session_id']
|
33
33
|
|
34
34
|
get '/call_reset_session'
|
35
|
-
|
36
|
-
headers['Set-Cookie'].
|
35
|
+
assert_response :success
|
36
|
+
assert !headers['Set-Cookie'].blank?
|
37
37
|
|
38
38
|
cookies << session_cookie
|
39
39
|
|
40
40
|
get '/get_session_value'
|
41
|
-
|
42
|
-
|
41
|
+
assert_response :success
|
42
|
+
assert_equal 'foo: nil', response.body
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
46
|
test "should not send cookies on write, not read" do
|
47
47
|
with_test_route_set do
|
48
48
|
get '/get_session_value'
|
49
|
-
|
50
|
-
|
51
|
-
cookies['_session_id'].
|
49
|
+
assert_response :success
|
50
|
+
assert_equal 'foo: nil', response.body
|
51
|
+
assert cookies['_session_id'].nil?
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
55
|
test "should set session value after session reset" do
|
56
56
|
with_test_route_set do
|
57
57
|
get '/set_session_value'
|
58
|
-
|
59
|
-
cookies['_session_id'].
|
58
|
+
assert_response :success
|
59
|
+
assert cookies['_session_id'].present?
|
60
60
|
session_id = cookies['_session_id']
|
61
61
|
|
62
62
|
get '/call_reset_session'
|
63
|
-
|
64
|
-
headers['Set-Cookie'].
|
63
|
+
assert_response :success
|
64
|
+
assert !headers['Set-Cookie'].blank?
|
65
65
|
|
66
66
|
get '/get_session_value'
|
67
|
-
|
68
|
-
|
67
|
+
assert_response :success
|
68
|
+
assert_equal 'foo: nil', response.body
|
69
69
|
|
70
70
|
get '/get_session_id'
|
71
|
-
|
72
|
-
response.body
|
71
|
+
assert_response :success
|
72
|
+
assert(response.body != session_id)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
76
|
test "should be able to read session id without accessing the session hash" do
|
77
77
|
with_test_route_set do
|
78
78
|
get '/set_session_value'
|
79
|
-
|
80
|
-
cookies['_session_id'].
|
79
|
+
assert_response :success
|
80
|
+
assert cookies['_session_id'].present?
|
81
81
|
session_id = cookies['_session_id']
|
82
82
|
|
83
83
|
get '/get_session_id'
|
84
|
-
|
85
|
-
response.body
|
84
|
+
assert_response :success
|
85
|
+
assert_equal response.body, session_id
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -90,8 +90,8 @@ class RedisStoreIntegrationTest < ::ActionDispatch::IntegrationTest
|
|
90
90
|
with_test_route_set do
|
91
91
|
with_autoload_path "session_autoload_test" do
|
92
92
|
get '/set_serialized_session_value'
|
93
|
-
|
94
|
-
cookies['_session_id'].
|
93
|
+
assert_response :success
|
94
|
+
assert cookies['_session_id'].present?
|
95
95
|
end
|
96
96
|
|
97
97
|
with_autoload_path "session_autoload_test" do
|
@@ -101,8 +101,8 @@ class RedisStoreIntegrationTest < ::ActionDispatch::IntegrationTest
|
|
101
101
|
|
102
102
|
with_autoload_path "session_autoload_test" do
|
103
103
|
get '/get_session_value'
|
104
|
-
|
105
|
-
response.body
|
104
|
+
assert_response :success
|
105
|
+
assert_equal response.body, 'foo: #<SessionAutoloadTest::Foo bar:"baz">'
|
106
106
|
end
|
107
107
|
end
|
108
108
|
end
|
@@ -110,44 +110,44 @@ class RedisStoreIntegrationTest < ::ActionDispatch::IntegrationTest
|
|
110
110
|
test "should not resend the cookie again if session_id cookie is already exists" do
|
111
111
|
with_test_route_set do
|
112
112
|
get '/set_session_value'
|
113
|
-
|
114
|
-
cookies['_session_id'].
|
113
|
+
assert_response :success
|
114
|
+
assert cookies['_session_id'].present?
|
115
115
|
|
116
116
|
get '/get_session_value'
|
117
|
-
|
118
|
-
headers['Set-Cookie'].
|
117
|
+
assert_response :success
|
118
|
+
assert headers['Set-Cookie'].nil?
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
122
|
test "should prevent session fixation" do
|
123
123
|
with_test_route_set do
|
124
124
|
get '/get_session_value'
|
125
|
-
|
126
|
-
|
125
|
+
assert_response :success
|
126
|
+
assert_equal 'foo: nil', response.body
|
127
127
|
session_id = cookies['_session_id']
|
128
128
|
|
129
129
|
reset!
|
130
130
|
|
131
131
|
get '/set_session_value', :_session_id => session_id
|
132
|
-
|
133
|
-
cookies['_session_id']
|
132
|
+
assert_response :success
|
133
|
+
assert(cookies['_session_id'] != session_id)
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
137
|
test "should write the data with expiration time" do
|
138
138
|
with_test_route_set do
|
139
139
|
get '/set_session_value_with_expiry'
|
140
|
-
|
140
|
+
assert_response :success
|
141
141
|
|
142
142
|
get '/get_session_value'
|
143
|
-
|
144
|
-
response.body
|
143
|
+
assert_response :success
|
144
|
+
assert_equal response.body, 'foo: "bar"'
|
145
145
|
|
146
146
|
sleep 1
|
147
147
|
|
148
148
|
get '/get_session_value'
|
149
|
-
|
150
|
-
|
149
|
+
assert_response :success
|
150
|
+
assert_equal 'foo: nil', response.body
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
metadata
CHANGED
@@ -1,50 +1,62 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-actionpack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-04 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
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.1.0
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
22
|
+
version: 1.4.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.0
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
32
|
+
version: 1.4.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: redis-rack
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1'
|
40
|
+
- - "<"
|
32
41
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
42
|
+
version: '3'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1'
|
50
|
+
- - "<"
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
52
|
+
version: '3'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: actionpack
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
57
|
- - ">="
|
46
58
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.0
|
59
|
+
version: '4.0'
|
48
60
|
- - "<"
|
49
61
|
- !ruby/object:Gem::Version
|
50
62
|
version: '6'
|
@@ -54,7 +66,7 @@ dependencies:
|
|
54
66
|
requirements:
|
55
67
|
- - ">="
|
56
68
|
- !ruby/object:Gem::Version
|
57
|
-
version: 4.0
|
69
|
+
version: '4.0'
|
58
70
|
- - "<"
|
59
71
|
- !ruby/object:Gem::Version
|
60
72
|
version: '6'
|
@@ -101,7 +113,7 @@ dependencies:
|
|
101
113
|
- !ruby/object:Gem::Version
|
102
114
|
version: 0.14.0
|
103
115
|
- !ruby/object:Gem::Dependency
|
104
|
-
name: minitest-
|
116
|
+
name: minitest-rails
|
105
117
|
requirement: !ruby/object:Gem::Requirement
|
106
118
|
requirements:
|
107
119
|
- - ">="
|
@@ -174,7 +186,6 @@ files:
|
|
174
186
|
- test/gemfiles/Gemfile.rails-4.2.x
|
175
187
|
- test/gemfiles/Gemfile.rails-5.0.x
|
176
188
|
- test/integration/redis_store_integration_test.rb
|
177
|
-
- test/redis/actionpack/version_test.rb
|
178
189
|
- test/test_helper.rb
|
179
190
|
homepage: http://redis-store.org/redis-actionpack
|
180
191
|
licenses:
|
@@ -196,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
207
|
version: '0'
|
197
208
|
requirements: []
|
198
209
|
rubyforge_project: redis-actionpack
|
199
|
-
rubygems_version: 2.
|
210
|
+
rubygems_version: 2.6.6
|
200
211
|
signing_key:
|
201
212
|
specification_version: 4
|
202
213
|
summary: Redis session store for ActionPack
|
@@ -216,5 +227,4 @@ test_files:
|
|
216
227
|
- test/gemfiles/Gemfile.rails-4.2.x
|
217
228
|
- test/gemfiles/Gemfile.rails-5.0.x
|
218
229
|
- test/integration/redis_store_integration_test.rb
|
219
|
-
- test/redis/actionpack/version_test.rb
|
220
230
|
- test/test_helper.rb
|