redis-rails 5.0.1 → 5.0.2.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +44 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fca7af26cf854139371ca90c6e3391d8a7aefbb2
|
4
|
+
data.tar.gz: e7acd340e1e88e440c7663473ae745e6ac267ba3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50424ba9d57f0823732cef9aadcbb540f4f0392c2164104714eb86fca55f315f9a04c6f76275484bfd723de0ffa9f4bb9553ce0c7d7e7d91def2990f4042034f
|
7
|
+
data.tar.gz: a2c83cfad102e9bc96362d620564fe833082eb34f30853938ca923c5a634a376917febab8a2cc85570cd37c609f3ce22484d45fec2fcb92391fb9578db9ecd9d
|
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
|
-
[](http://badge.fury.io/rb/redis-rails)
|
124
|
+
[](http://badge.fury.io/rb/redis-rails)
|
125
|
+
[](http://travis-ci.org/redis-store/redis-rails?branch=master)
|
126
|
+
[](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.pre
|
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
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 1.2
|
20
|
+
version: '1.2'
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::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
|
+
- - ">="
|
54
69
|
- !ruby/object:Gem::Version
|
55
|
-
version: 5.0
|
70
|
+
version: '5.0'
|
71
|
+
- - "<"
|
72
|
+
- !ruby/object:Gem::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
|
@@ -157,12 +182,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
157
182
|
version: '0'
|
158
183
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
184
|
requirements:
|
160
|
-
- - "
|
185
|
+
- - ">"
|
161
186
|
- !ruby/object:Gem::Version
|
162
|
-
version:
|
187
|
+
version: 1.3.1
|
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
|