redis-rails 0.0.0 → 3.1.3.rc
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.
- data/.gitignore +1 -0
- data/Gemfile +5 -0
- data/MIT-LICENSE +20 -0
- data/README.md +64 -0
- data/Rakefile +13 -1
- data/lib/redis-rails.rb +5 -2
- data/lib/redis-rails/version.rb +2 -2
- data/redis-rails.gemspec +9 -3
- data/test/redis-rails/version_test.rb +7 -0
- data/test/redis_rails_test.rb +11 -0
- data/test/test_helper.rb +6 -0
- metadata +157 -15
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,2 +1,7 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
gemspec
|
3
|
+
|
4
|
+
gem 'redis-store', '1.1.0.rc', :path => File.expand_path('../../redis-store', __FILE__)
|
5
|
+
gem 'redis-activesupport', '3.1.3.rc', :path => File.expand_path('../../redis-activesupport', __FILE__)
|
6
|
+
gem 'redis-actionpack', '3.1.3.rc', :path => File.expand_path('../../redis-actionpack', __FILE__)
|
7
|
+
gem 'redis-rack-cache', '1.1.rc', :path => File.expand_path('../../redis-rack-cache', __FILE__)
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 - 2011 Luca Guidi
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# Redis stores for Ruby on Rails
|
2
|
+
|
3
|
+
__`redis-rails`__ provides a full set of stores (*Cache*, *Session*, *HTTP Cache*) for __Ruby on Rails__. It natively supports object marshalling, timeouts, single or multiple nodes and namespaces.
|
4
|
+
|
5
|
+
## Redis Installation
|
6
|
+
|
7
|
+
### Option 1: Homebrew
|
8
|
+
|
9
|
+
MacOS X users should use [Homebrew](https://github.com/mxcl/homebrew) to install Redis:
|
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.5.tar.gz
|
18
|
+
tar -zxf redis-2.4.5.tar.gz
|
19
|
+
mv redis-2.4.5 redis
|
20
|
+
cd redis
|
21
|
+
make
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
# Gemfile
|
26
|
+
gem 'redis-rails'
|
27
|
+
|
28
|
+
### Cache Store:
|
29
|
+
|
30
|
+
# config/environments/production.rb
|
31
|
+
config.cache_store = :redis_store # { ... optional configuration ... }
|
32
|
+
|
33
|
+
### Session Store:
|
34
|
+
|
35
|
+
# config/initializers/session_store.rb
|
36
|
+
MyApplication::Application.config.session_store :redis_store
|
37
|
+
|
38
|
+
### HTTP Cache
|
39
|
+
|
40
|
+
# config.ru
|
41
|
+
require 'rack'
|
42
|
+
require 'rack/cache'
|
43
|
+
require 'redis-rack-cache'
|
44
|
+
|
45
|
+
use Rack::Cache,
|
46
|
+
:metastore => 'redis://localhost:6379/0/metastore',
|
47
|
+
:entitystore => 'redis://localhost:6380/0/entitystore'
|
48
|
+
|
49
|
+
#### Configuration
|
50
|
+
|
51
|
+
For advanced configuration options, please check the [Redis Store Wiki](https://github.com/jodosha/redis-store/wiki).
|
52
|
+
|
53
|
+
## Running tests
|
54
|
+
|
55
|
+
git clone git://github.com/jodosha/redis-store.git
|
56
|
+
cd redis-store/redis-rails
|
57
|
+
gem install bundler --pre # required version: 1.1.rc
|
58
|
+
bundle exec rake
|
59
|
+
|
60
|
+
If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
|
61
|
+
|
62
|
+
## Copyright
|
63
|
+
|
64
|
+
(c) 2009 - 2011 Luca Guidi - [http://lucaguidi.com](http://lucaguidi.com), released under the MIT license
|
data/Rakefile
CHANGED
@@ -1 +1,13 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler'
|
2
|
+
Bundler.setup
|
3
|
+
require 'rake'
|
4
|
+
require 'bundler/gem_tasks'
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'rdoc/task'
|
8
|
+
rescue LoadError
|
9
|
+
require 'rake/rdoctask'
|
10
|
+
end
|
11
|
+
|
12
|
+
load 'tasks/redis.tasks.rb'
|
13
|
+
task :default => 'redis:test:suite'
|
data/lib/redis-rails.rb
CHANGED
data/lib/redis-rails/version.rb
CHANGED
data/redis-rails.gemspec
CHANGED
@@ -18,7 +18,13 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
s.add_dependency 'redis-store', '1.1.0.rc'
|
22
|
+
s.add_dependency 'redis-activesupport', '3.1.3.rc'
|
23
|
+
s.add_dependency 'redis-actionpack', '3.1.3.rc'
|
24
|
+
|
25
|
+
s.add_development_dependency 'rake', '~> 0.9.2.2'
|
26
|
+
s.add_development_dependency 'bundler', '~> 1.1.rc'
|
27
|
+
s.add_development_dependency 'mocha', '~> 0.10.0'
|
28
|
+
s.add_development_dependency 'minitest', '~> 2.8.0'
|
29
|
+
s.add_development_dependency 'purdytest', '~> 1.0.0'
|
24
30
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
describe Redis::Rails do
|
4
|
+
it "must require ActiveSupport dependency" do
|
5
|
+
assert defined?(ActiveSupport::Cache::RedisStore)
|
6
|
+
end
|
7
|
+
|
8
|
+
it "must require ActionPack dependency" do
|
9
|
+
assert defined?(ActionDispatch::Session::RedisSessionStore)
|
10
|
+
end
|
11
|
+
end
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 7712046
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
|
7
|
+
- 3
|
8
|
+
- 1
|
9
|
+
- 3
|
10
|
+
- rc
|
11
|
+
version: 3.1.3.rc
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Luca Guidi
|
@@ -15,9 +16,140 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2011-
|
19
|
-
dependencies:
|
20
|
-
|
19
|
+
date: 2011-12-30 00:00:00 Z
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: redis-store
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - "="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 7712002
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 1
|
33
|
+
- 0
|
34
|
+
- rc
|
35
|
+
version: 1.1.0.rc
|
36
|
+
type: :runtime
|
37
|
+
version_requirements: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: redis-activesupport
|
40
|
+
prerelease: false
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - "="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 7712046
|
47
|
+
segments:
|
48
|
+
- 3
|
49
|
+
- 1
|
50
|
+
- 3
|
51
|
+
- rc
|
52
|
+
version: 3.1.3.rc
|
53
|
+
type: :runtime
|
54
|
+
version_requirements: *id002
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: redis-actionpack
|
57
|
+
prerelease: false
|
58
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - "="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
hash: 7712046
|
64
|
+
segments:
|
65
|
+
- 3
|
66
|
+
- 1
|
67
|
+
- 3
|
68
|
+
- rc
|
69
|
+
version: 3.1.3.rc
|
70
|
+
type: :runtime
|
71
|
+
version_requirements: *id003
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: rake
|
74
|
+
prerelease: false
|
75
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
76
|
+
none: false
|
77
|
+
requirements:
|
78
|
+
- - ~>
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
hash: 11
|
81
|
+
segments:
|
82
|
+
- 0
|
83
|
+
- 9
|
84
|
+
- 2
|
85
|
+
- 2
|
86
|
+
version: 0.9.2.2
|
87
|
+
type: :development
|
88
|
+
version_requirements: *id004
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: bundler
|
91
|
+
prerelease: false
|
92
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 7712070
|
98
|
+
segments:
|
99
|
+
- 1
|
100
|
+
- 1
|
101
|
+
- rc
|
102
|
+
version: 1.1.rc
|
103
|
+
type: :development
|
104
|
+
version_requirements: *id005
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
name: mocha
|
107
|
+
prerelease: false
|
108
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ~>
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 55
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
- 10
|
117
|
+
- 0
|
118
|
+
version: 0.10.0
|
119
|
+
type: :development
|
120
|
+
version_requirements: *id006
|
121
|
+
- !ruby/object:Gem::Dependency
|
122
|
+
name: minitest
|
123
|
+
prerelease: false
|
124
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
126
|
+
requirements:
|
127
|
+
- - ~>
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
hash: 47
|
130
|
+
segments:
|
131
|
+
- 2
|
132
|
+
- 8
|
133
|
+
- 0
|
134
|
+
version: 2.8.0
|
135
|
+
type: :development
|
136
|
+
version_requirements: *id007
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: purdytest
|
139
|
+
prerelease: false
|
140
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
142
|
+
requirements:
|
143
|
+
- - ~>
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
hash: 23
|
146
|
+
segments:
|
147
|
+
- 1
|
148
|
+
- 0
|
149
|
+
- 0
|
150
|
+
version: 1.0.0
|
151
|
+
type: :development
|
152
|
+
version_requirements: *id008
|
21
153
|
description: Redis for Ruby on Rails
|
22
154
|
email:
|
23
155
|
- guidi.luca@gmail.com
|
@@ -30,10 +162,15 @@ extra_rdoc_files: []
|
|
30
162
|
files:
|
31
163
|
- .gitignore
|
32
164
|
- Gemfile
|
165
|
+
- MIT-LICENSE
|
166
|
+
- README.md
|
33
167
|
- Rakefile
|
34
168
|
- lib/redis-rails.rb
|
35
169
|
- lib/redis-rails/version.rb
|
36
170
|
- redis-rails.gemspec
|
171
|
+
- test/redis-rails/version_test.rb
|
172
|
+
- test/redis_rails_test.rb
|
173
|
+
- test/test_helper.rb
|
37
174
|
homepage: http://jodosha.github.com/redis-store
|
38
175
|
licenses: []
|
39
176
|
|
@@ -54,12 +191,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
54
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
192
|
none: false
|
56
193
|
requirements:
|
57
|
-
- - "
|
194
|
+
- - ">"
|
58
195
|
- !ruby/object:Gem::Version
|
59
|
-
hash:
|
196
|
+
hash: 25
|
60
197
|
segments:
|
61
|
-
-
|
62
|
-
|
198
|
+
- 1
|
199
|
+
- 3
|
200
|
+
- 1
|
201
|
+
version: 1.3.1
|
63
202
|
requirements: []
|
64
203
|
|
65
204
|
rubyforge_project: redis-rails
|
@@ -67,5 +206,8 @@ rubygems_version: 1.8.6
|
|
67
206
|
signing_key:
|
68
207
|
specification_version: 3
|
69
208
|
summary: Redis for Ruby on Rails
|
70
|
-
test_files:
|
71
|
-
|
209
|
+
test_files:
|
210
|
+
- test/redis-rails/version_test.rb
|
211
|
+
- test/redis_rails_test.rb
|
212
|
+
- test/test_helper.rb
|
213
|
+
has_rdoc:
|