redis-rails 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -5
- data/CHANGELOG +62 -0
- data/Gemfile +13 -13
- data/README.md +41 -22
- data/lib/redis-rails/version.rb +1 -1
- data/redis-rails.gemspec +4 -4
- metadata +42 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c28295dd548f82d448ffb6bf39160e24b872f0a0
|
4
|
+
data.tar.gz: 024eb1f43ebe50644bfdce24a4392cd8850721d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44f916d620ccd8f26624766c2a40743b40fba9966c9cc1182c5cdb9731cb33ae325f5b69e9bb7f459589a58d5d7ae5f3ba9e25e1f610b5d7571ad784a58a5acf
|
7
|
+
data.tar.gz: 4fc86036eae3b3caabf4ef4d027344babc9d377336b903db4d75baa9259d8244736dd7248404325680cdf9d4dd1ef9e62280d0de2653af92e6dcf74289b0054a
|
data/.travis.yml
CHANGED
data/CHANGELOG
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 5.0.1
|
4
|
+
|
5
|
+
Breaking changes
|
6
|
+
|
7
|
+
- None
|
8
|
+
|
9
|
+
Added
|
10
|
+
|
11
|
+
- None
|
12
|
+
|
13
|
+
Fixed
|
14
|
+
|
15
|
+
- Use non-prerelease versions of dependencies
|
16
|
+
|
17
|
+
## 5.0.0
|
18
|
+
|
19
|
+
Breaking changes
|
20
|
+
|
21
|
+
- None
|
22
|
+
|
23
|
+
Added
|
24
|
+
|
25
|
+
- Begin testing against ruby 2.1.2, 2.2, and 2.3
|
26
|
+
- Bump dependencies to support Rails 5
|
27
|
+
|
28
|
+
Fixed
|
29
|
+
|
30
|
+
- Various documentation improvements
|
31
|
+
|
32
|
+
## 4.0.0
|
33
|
+
|
34
|
+
Not documented yet. Contributions welcome.
|
35
|
+
|
36
|
+
## 3.2.4
|
37
|
+
|
38
|
+
Not documented yet. Contributions welcome.
|
39
|
+
|
40
|
+
## 3.2.3
|
41
|
+
|
42
|
+
Not documented yet. Contributions welcome.
|
43
|
+
|
44
|
+
## 3.2.2
|
45
|
+
|
46
|
+
Not documented yet. Contributions welcome.
|
47
|
+
|
48
|
+
## 3.2.1
|
49
|
+
|
50
|
+
Not documented yet. Contributions welcome.
|
51
|
+
|
52
|
+
## 3.1.5
|
53
|
+
|
54
|
+
Not documented yet. Contributions welcome.
|
55
|
+
|
56
|
+
## 3.1.4
|
57
|
+
|
58
|
+
Not documented yet. Contributions welcome.
|
59
|
+
|
60
|
+
## 3.1.3
|
61
|
+
|
62
|
+
Not documented yet. Contributions welcome.
|
data/Gemfile
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
gemspec
|
3
3
|
|
4
|
-
if ::File.directory?(gem_path = "../redis-store")
|
5
|
-
|
6
|
-
end
|
4
|
+
# if ::File.directory?(gem_path = "../redis-store")
|
5
|
+
# gem "redis-store", [">= 1.2.0", "< 1.4"], path: gem_path
|
6
|
+
# end
|
7
7
|
|
8
|
-
if ::File.directory?(gem_path = "../redis-rack")
|
9
|
-
|
10
|
-
end
|
8
|
+
# if ::File.directory?(gem_path = "../redis-rack")
|
9
|
+
# gem "redis-rack", "~> 2.0.0.pre", path: gem_path
|
10
|
+
# end
|
11
11
|
|
12
|
-
if ::File.directory?(gem_path = "../redis-activesupport")
|
13
|
-
|
14
|
-
end
|
12
|
+
# if ::File.directory?(gem_path = "../redis-activesupport")
|
13
|
+
# gem "redis-activesupport", '>= 4.0.0', '< 5.1', path: gem_path
|
14
|
+
# end
|
15
15
|
|
16
|
-
if ::File.directory?(gem_path = "../redis-actionpack")
|
17
|
-
|
18
|
-
end
|
16
|
+
# if ::File.directory?(gem_path = "../redis-actionpack")
|
17
|
+
# gem "redis-actionpack", ">= 4.0.0", '< 5.1', path: gem_path
|
18
|
+
# end
|
19
19
|
|
20
|
-
version = ENV["RAILS_VERSION"] ||
|
20
|
+
version = ENV["RAILS_VERSION"] || '5'
|
21
21
|
|
22
22
|
rails = case version
|
23
23
|
when "master"
|
data/README.md
CHANGED
@@ -4,9 +4,16 @@ __`redis-rails`__ provides a full set of stores (*Cache*, *Session*, *HTTP Cache
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
+
Add the following to your Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'redis-rails'
|
11
|
+
```
|
12
|
+
|
13
|
+
To use with Rails 4.0+, pin the gem to the latest 4.0 version:
|
14
|
+
|
7
15
|
```ruby
|
8
|
-
|
9
|
-
gem "redis-rails" # Will install several other redis-* gems
|
16
|
+
gem 'redis-rails', '~> 4'
|
10
17
|
```
|
11
18
|
|
12
19
|
## Usage
|
@@ -16,34 +23,42 @@ gem "redis-rails" # Will install several other redis-* gems
|
|
16
23
|
config.cache_store = :redis_store, "redis://localhost:6379/0/cache", { expires_in: 90.minutes }
|
17
24
|
```
|
18
25
|
|
26
|
+
(**NOTE:** The `:expires_in` option can also be written as `:expire_in` and `:expire_after`)
|
27
|
+
|
19
28
|
Configuration values at the end are optional. If you want to use Redis as a backend for sessions, you will also need to set:
|
20
29
|
|
21
30
|
```ruby
|
22
31
|
# config/initializers/session_store.rb
|
23
|
-
MyApplication::Application.config.session_store :redis_store, servers: "redis://localhost:6379/0/session"
|
32
|
+
MyApplication::Application.config.session_store :redis_store, servers: ["redis://localhost:6379/0/session"]
|
24
33
|
```
|
25
34
|
|
26
35
|
You can also provide a hash instead of a URL
|
27
36
|
|
28
37
|
```ruby
|
29
|
-
config.cache_store = :redis_store, {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
config.cache_store = :redis_store, {
|
39
|
+
host: "localhost",
|
40
|
+
port: 6379,
|
41
|
+
db: 0,
|
42
|
+
password: "mysecret",
|
43
|
+
namespace: "cache"
|
44
|
+
}
|
35
45
|
```
|
36
46
|
|
37
47
|
And similarly for the session store:
|
38
48
|
|
39
49
|
```ruby
|
40
|
-
MyApplication::Application.config.session_store :redis_store,
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
50
|
+
MyApplication::Application.config.session_store :redis_store, {
|
51
|
+
servers: [
|
52
|
+
{
|
53
|
+
host: "localhost",
|
54
|
+
port: 6379,
|
55
|
+
db: 0,
|
56
|
+
password: "mysecret",
|
57
|
+
namespace: "session"
|
58
|
+
},
|
59
|
+
],
|
60
|
+
expire_after: 90.minutes
|
61
|
+
}
|
47
62
|
```
|
48
63
|
|
49
64
|
And if you would like to use Redis as a rack-cache backend for HTTP caching, add [`redis-rack-cache`](https://github.com/redis-store/redis-rack-cache) to your Gemfile and add:
|
@@ -83,9 +98,11 @@ config.cache_store = :redis_store, sentinel_config.merge(
|
|
83
98
|
# configure sessions, setting the sentinel config as the
|
84
99
|
# servers value, merging opts with the sentinel conf.
|
85
100
|
config.session_store :redis_store, {
|
86
|
-
servers:
|
87
|
-
|
88
|
-
|
101
|
+
servers: [
|
102
|
+
sentinel_config.merge(
|
103
|
+
namespace: "sessions"
|
104
|
+
)
|
105
|
+
],
|
89
106
|
expires_in: 2.days
|
90
107
|
}
|
91
108
|
```
|
@@ -96,15 +113,17 @@ config.session_store :redis_store, {
|
|
96
113
|
gem install bundler
|
97
114
|
git clone git://github.com/redis-store/redis-rails.git
|
98
115
|
cd redis-rails
|
99
|
-
bundle install
|
100
|
-
bundle exec rake
|
116
|
+
RAILS_VERSION=5.0.1 bundle install
|
117
|
+
RAILS_VERSION=5.0.1 bundle exec rake
|
101
118
|
```
|
102
119
|
|
103
120
|
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
|
104
121
|
|
105
122
|
## Status
|
106
123
|
|
107
|
-
[![Gem Version](https://badge.fury.io/rb/redis-rails.png)](http://badge.fury.io/rb/redis-rails)
|
124
|
+
[![Gem Version](https://badge.fury.io/rb/redis-rails.png)](http://badge.fury.io/rb/redis-rails)
|
125
|
+
[![Build Status](https://secure.travis-ci.org/redis-store/redis-rails.png?branch=master)](http://travis-ci.org/redis-store/redis-rails?branch=master)
|
126
|
+
[![Code Climate](https://codeclimate.com/github/redis-store/redis-rails.png)](https://codeclimate.com/github/redis-store/redis-rails)
|
108
127
|
|
109
128
|
## Copyright
|
110
129
|
|
data/lib/redis-rails/version.rb
CHANGED
data/redis-rails.gemspec
CHANGED
@@ -19,13 +19,13 @@ 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_dependency "redis-store", "
|
23
|
-
s.add_dependency "redis-activesupport", "
|
24
|
-
s.add_dependency "redis-actionpack", "
|
22
|
+
s.add_dependency "redis-store", [">= 1.2", "< 2"]
|
23
|
+
s.add_dependency "redis-activesupport", [">= 5.0", "< 6"]
|
24
|
+
s.add_dependency "redis-actionpack", [">= 5.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", [">= 4.2", "< 6"]
|
30
30
|
s.add_development_dependency "redis-store-testing"
|
31
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
@@ -9,50 +9,68 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis-store
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '1.2'
|
21
|
+
- - "<"
|
19
22
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
23
|
+
version: '2'
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
|
-
- - "
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '1.2'
|
31
|
+
- - "<"
|
26
32
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
33
|
+
version: '2'
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: redis-activesupport
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
31
37
|
requirements:
|
32
|
-
- - "
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
41
|
+
- - "<"
|
33
42
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
43
|
+
version: '6'
|
35
44
|
type: :runtime
|
36
45
|
prerelease: false
|
37
46
|
version_requirements: !ruby/object:Gem::Requirement
|
38
47
|
requirements:
|
39
|
-
- - "
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '5.0'
|
51
|
+
- - "<"
|
40
52
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
53
|
+
version: '6'
|
42
54
|
- !ruby/object:Gem::Dependency
|
43
55
|
name: redis-actionpack
|
44
56
|
requirement: !ruby/object:Gem::Requirement
|
45
57
|
requirements:
|
46
|
-
- - "
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '5.0'
|
61
|
+
- - "<"
|
47
62
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
63
|
+
version: '6'
|
49
64
|
type: :runtime
|
50
65
|
prerelease: false
|
51
66
|
version_requirements: !ruby/object:Gem::Requirement
|
52
67
|
requirements:
|
53
|
-
- - "
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '5.0'
|
71
|
+
- - "<"
|
54
72
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
73
|
+
version: '6'
|
56
74
|
- !ruby/object:Gem::Dependency
|
57
75
|
name: rake
|
58
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,16 +117,22 @@ dependencies:
|
|
99
117
|
name: minitest
|
100
118
|
requirement: !ruby/object:Gem::Requirement
|
101
119
|
requirements:
|
102
|
-
- - "
|
120
|
+
- - ">="
|
103
121
|
- !ruby/object:Gem::Version
|
104
122
|
version: '4.2'
|
123
|
+
- - "<"
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '6'
|
105
126
|
type: :development
|
106
127
|
prerelease: false
|
107
128
|
version_requirements: !ruby/object:Gem::Requirement
|
108
129
|
requirements:
|
109
|
-
- - "
|
130
|
+
- - ">="
|
110
131
|
- !ruby/object:Gem::Version
|
111
132
|
version: '4.2'
|
133
|
+
- - "<"
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '6'
|
112
136
|
- !ruby/object:Gem::Dependency
|
113
137
|
name: redis-store-testing
|
114
138
|
requirement: !ruby/object:Gem::Requirement
|
@@ -133,6 +157,7 @@ extra_rdoc_files: []
|
|
133
157
|
files:
|
134
158
|
- ".gitignore"
|
135
159
|
- ".travis.yml"
|
160
|
+
- CHANGELOG
|
136
161
|
- Gemfile
|
137
162
|
- MIT-LICENSE
|
138
163
|
- README.md
|
@@ -162,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
187
|
version: '0'
|
163
188
|
requirements: []
|
164
189
|
rubyforge_project: redis-rails
|
165
|
-
rubygems_version: 2.
|
190
|
+
rubygems_version: 2.6.10
|
166
191
|
signing_key:
|
167
192
|
specification_version: 4
|
168
193
|
summary: Redis for Ruby on Rails
|