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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d21c1f07cedc57e09192d32a3a830ed24d13fbe9
4
- data.tar.gz: c521d6332175d3a43dba4a71aa94374955cf5df4
3
+ metadata.gz: f4372ed1017dfad6a583f6b759134e465612cac1
4
+ data.tar.gz: 2bdf95ee3cc854af1dc008ca0034d80b6462bedd
5
5
  SHA512:
6
- metadata.gz: fe731d34205cd805404216917d37fedf46cfb6d075fbb815ff0c2558daf9aa7e1bd6492dfe877d4ee8eb4f1b535c0048603d2b3d9fb128cf4f52d8914dc5c21c
7
- data.tar.gz: 668c3fc2c2aa45773e490a1e70852cf611c7345e9b9fc2dc5ef750b2ef0cfed5e9cf313d4b6ff5735e1a91a0bd735996923d78e221b83d1d0ee026fe8487b20f
6
+ metadata.gz: 886c02951f763d866f9163727cf58608e44b47dc4d55f38b029cb8d9569c7d46223f2eb1ab02e8ced4b18d8be2b42d4064c31871152b7a20773ffaa68a20a173
7
+ data.tar.gz: 71400d65a5db56b45f8a8d6660e7791b84c11d544fb695173cf165eefeb61a22959ff430b6a0b3d2e247707d1997972d95d939f5f4346e4cb520569d0141de7c
data/.gitignore CHANGED
@@ -2,3 +2,4 @@ Gemfile.lock
2
2
  test/gemfiles/*.lock
3
3
  *.gem
4
4
  tmp/
5
+ stdout
@@ -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.0
6
+ - 2.0
7
7
  - 2.1
8
8
  - 2.2.4
9
- - 2.3.0
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.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: jruby-19mode
29
- gemfile: test/gemfiles/Gemfile.rails-5.0.x
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) [![Build Status](https://secure.travis-ci.org/redis-store/redis-actionpack.png?branch=master)](http://travis-ci.org/jodosha/redis-actionpack?branch=master) [![Code Climate](https://codeclimate.com/github/jodosha/redis-store.png)](https://codeclimate.com/github/redis-store/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
 
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  module ActionPack
3
- VERSION = '5.0.0'
3
+ VERSION = '5.0.1'
4
4
  end
5
5
  end
@@ -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', '~> 1.2.0.pre'
23
- s.add_runtime_dependency 'redis-rack', '~> 2.0.0.pre'
24
- s.add_runtime_dependency 'actionpack', '>= 4.0.0', '< 6'
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-spec-rails'
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
- if ::File.directory?(gem_path = '../redis-store')
5
- gem 'redis-store', '~> 1.1.0', path: gem_path
6
- end
4
+ gem 'redis-store', '~> 1.1.0'
7
5
 
8
- if ::File.directory?(gem_path = '../redis-rack')
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-spec-rails', '~> 4.7'
10
+ gem 'minitest-rails', '~> 1.0.0'
@@ -1,14 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec :path => './../..'
3
3
 
4
- if ::File.directory?(gem_path = '../redis-store')
5
- gem 'redis-store', '~> 1.1.0', path: gem_path
6
- end
4
+ gem 'redis-store', '~> 1.1.0'
7
5
 
8
- if ::File.directory?(gem_path = '../redis-rack')
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-spec-rails'
10
+ gem 'minitest-rails', '~> 2.2.0'
@@ -1,14 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec :path => './../..'
3
3
 
4
- if ::File.directory?(gem_path = '../redis-store')
5
- gem 'redis-store', '~> 1.1.0', path: gem_path
6
- end
4
+ gem 'redis-store', '~> 1.1.0'
7
5
 
8
- if ::File.directory?(gem_path = '../redis-rack')
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-spec-rails'
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', github: 'redis-store/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 'rails', '5.0.0.beta3'
8
+ gem 'actionpack', '~> 5.0.0'
15
9
 
16
- gem 'minitest-spec-rails', '~> 5.3.0'
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
- response.must_be :success?
11
- cookies['_session_id'].wont_be_nil
10
+ assert_response :success
11
+ assert cookies['_session_id'].present?
12
12
 
13
13
  get '/get_session_value'
14
- response.must_be :success?
15
- response.body.must_equal 'foo: "bar"'
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
- response.must_be :success?
23
- response.body.must_equal 'foo: nil'
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
- response.must_be :success?
31
- cookies['_session_id'].wont_be_nil
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
- response.must_be :success?
36
- headers['Set-Cookie'].wont_equal []
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
- response.must_be :success?
42
- response.body.must_equal 'foo: nil'
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
- response.must_be :success?
50
- response.body.must_equal 'foo: nil'
51
- cookies['_session_id'].must_be_nil
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
- response.must_be :success?
59
- cookies['_session_id'].wont_be_nil
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
- response.must_be :success?
64
- headers['Set-Cookie'].wont_equal []
63
+ assert_response :success
64
+ assert !headers['Set-Cookie'].blank?
65
65
 
66
66
  get '/get_session_value'
67
- response.must_be :success?
68
- response.body.must_equal 'foo: nil'
67
+ assert_response :success
68
+ assert_equal 'foo: nil', response.body
69
69
 
70
70
  get '/get_session_id'
71
- response.must_be :success?
72
- response.body.wont_equal session_id
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
- response.must_be :success?
80
- cookies['_session_id'].wont_be_nil
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
- response.must_be :success?
85
- response.body.must_equal session_id
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
- response.must_be :success?
94
- cookies['_session_id'].wont_be_nil
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
- response.must_be :success?
105
- response.body.must_equal 'foo: #<SessionAutoloadTest::Foo bar:"baz">'
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
- response.must_be :success?
114
- cookies['_session_id'].wont_be_nil
113
+ assert_response :success
114
+ assert cookies['_session_id'].present?
115
115
 
116
116
  get '/get_session_value'
117
- response.must_be :success?
118
- headers['Set-Cookie'].must_be_nil
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
- response.must_be :success?
126
- response.body.must_equal 'foo: nil'
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
- response.must_be :success?
133
- cookies['_session_id'].wont_equal 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
- response.must_be :success?
140
+ assert_response :success
141
141
 
142
142
  get '/get_session_value'
143
- response.must_be :success?
144
- response.body.must_equal 'foo: "bar"'
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
- response.must_be :success?
150
- response.body.must_equal 'foo: nil'
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.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-07-06 00:00:00.000000000 Z
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.2.0.pre
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.2.0.pre
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: 2.0.0.pre
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: 2.0.0.pre
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.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.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-spec-rails
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.5.1
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
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- describe Redis::ActionPack::VERSION do
4
- it 'returns current version' do
5
- Redis::ActionPack::VERSION.must_equal '4.0.1'
6
- end
7
- end