redis-rails 4.0.0 → 5.0.0.pre

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: eb1407ec107ab559e756f66f1fec960b9815e037
4
- data.tar.gz: e22c7a912f4c0bb974cf5c35715874880593b1db
3
+ metadata.gz: 25eefcb74b16fcf63b3cc84713e747015510fce0
4
+ data.tar.gz: 74c9e478f4bf3ae3e0d684d18069674c25336a83
5
5
  SHA512:
6
- metadata.gz: b9ee4ca7ae3a6a5d9b4c7577ca5a42c2e435f08f3f38e83c0da9eff4f910e16f28ca80fcfbee188e955ba0fc34b361971fd568ff748168b7e56dd15175066f3e
7
- data.tar.gz: 84f7c3bfd292e747985d811f76d948b5321a3036ac6cc1f9126a3275e382226688259af80813aaf52b9f52b21021df692405441e8142627a2fbf9dc16ce03120
6
+ metadata.gz: 117e4d6a18dce4d91d5006ab36f8e13347cca9f5a48612faaa9500a4f49fe22f4b8694780d44054c8e2baa627fae2c0ee9927d83a14681c7ece4223306d84e4c
7
+ data.tar.gz: 19e828bda343ec02b9e09c4e48534956c3c22f267aa8232e0e5a660a9e170e85e180e83e2f0eca26eccc22396e5c1d58261cf61b5b667876fb41cf9574ff3d61
data/.gitignore CHANGED
@@ -1,5 +1,3 @@
1
- *.gem
2
- .bundle
3
1
  Gemfile.lock
4
- pkg/*
5
- tmp/*
2
+ *.gem
3
+ tmp/
@@ -0,0 +1,17 @@
1
+ language: ruby
2
+ before_install: gem install bundler
3
+ script: 'bundle exec rake'
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - 2.1
8
+ - 2.2
9
+ - 2.3.0
10
+ - ruby-head
11
+ - jruby-19mode
12
+ - jruby-head
13
+
14
+ matrix:
15
+ allow_failures:
16
+ - rvm: jruby-head
17
+ - rvm: ruby-head
data/Gemfile CHANGED
@@ -1,10 +1,21 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
- gem 'redis-store', '~> 1.1.0', path: '../redis-store'
5
- gem 'redis-rack', '~> 1.5.0', path: '../redis-rack'
6
- gem 'redis-activesupport', '4.0.0', path: '../redis-activesupport'
7
- gem 'redis-actionpack', '4.0.0', path: '../redis-actionpack'
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
11
+
12
+ if ::File.directory?(gem_path = "../redis-activesupport")
13
+ gem "redis-activesupport", '>= 4.0.0', '< 5.1', path: gem_path
14
+ end
15
+
16
+ if ::File.directory?(gem_path = "../redis-actionpack")
17
+ gem "redis-actionpack", ">= 4.0.0", '< 5.1', path: gem_path
18
+ end
8
19
 
9
20
  version = ENV["RAILS_VERSION"] || "4"
10
21
 
data/README.md CHANGED
@@ -1,42 +1,111 @@
1
1
  # Redis stores for Ruby on Rails
2
2
 
3
- __`redis-rails`__ provides a full set of stores (*Cache*, *Session*, *HTTP Cache*) for __Ruby on Rails__. See the main [redis-store readme](https://github.com/jodosha/redis-store) for general guidelines.
3
+ __`redis-rails`__ provides a full set of stores (*Cache*, *Session*, *HTTP Cache*) for __Ruby on Rails__. See the main [redis-store readme](https://github.com/redis-store/redis-store) for general guidelines.
4
4
 
5
5
  ## Installation
6
6
 
7
- # Gemfile
8
- gem 'redis-rails' # Will install several other redis- gems
7
+ ```ruby
8
+ # Gemfile
9
+ gem "redis-rails" # Will install several other redis-* gems
10
+ ```
9
11
 
10
- ### Usage
12
+ ## Usage
11
13
 
12
- For Rails 3.2:
13
-
14
- # config/application.rb
15
- config.cache_store = :redis_store, "redis://localhost:6379/0/cache", { expires_in: 90.minutes }
14
+ ```ruby
15
+ # config/application.rb
16
+ config.cache_store = :redis_store, "redis://localhost:6379/0/cache", { expires_in: 90.minutes }
17
+ ```
16
18
 
17
19
  Configuration values at the end are optional. If you want to use Redis as a backend for sessions, you will also need to set:
18
20
 
19
- # config/initializers/session_store.rb
20
- MyApplication::Application.config.session_store :redis_store
21
+ ```ruby
22
+ # config/initializers/session_store.rb
23
+ MyApplication::Application.config.session_store :redis_store, servers: "redis://localhost:6379/0/session"
24
+ ```
25
+
26
+ You can also provide a hash instead of a URL
27
+
28
+ ```ruby
29
+ config.cache_store = :redis_store, { host: "localhost",
30
+ port: 6379,
31
+ db: 0,
32
+ password: "mysecret",
33
+ namespace: "cache",
34
+ expires_in: 90.minutes }
35
+ ```
36
+
37
+ And similarly for the session store:
38
+
39
+ ```ruby
40
+ MyApplication::Application.config.session_store :redis_store, servers: { host: "localhost",
41
+ port: 6379,
42
+ db: 0,
43
+ password: "mysecret",
44
+ namespace: "session"
45
+ },
46
+ expires_in: 90.minutes
47
+ ```
48
+
49
+ 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:
21
50
 
22
- And if you would like to use Redis as a rack-cache backend for HTTP caching:
51
+ ```ruby
52
+ # config/environments/production.rb
53
+ config.action_dispatch.rack_cache = {
54
+ metastore: "redis://localhost:6379/1/metastore",
55
+ entitystore: "redis://localhost:6379/1/entitystore"
56
+ }
57
+ ```
23
58
 
24
- # config/environments/production.rb
25
- config.action_dispatch.rack_cache = {
26
- metastore: "redis://localhost:6379/1/metastore",
27
- entitystore: "redis://localhost:6379/1/entitystore"
28
- }
59
+ ## Usage with Redis Sentinel
60
+
61
+ ```ruby
62
+ sentinel_config = {
63
+ url: "redis://mymaster/0",
64
+ role: "master",
65
+ sentinels: [{
66
+ host: "127.0.0.1",
67
+ port: 26379
68
+ },{
69
+ host: "127.0.0.1",
70
+ port: 26380
71
+ },{
72
+ host: "127.0.0.1",
73
+ port: 26381
74
+ }]
75
+ }
76
+
77
+ # configure cache, merging opts with sentinel conf
78
+ config.cache_store = :redis_store, sentinel_config.merge(
79
+ namespace: "cache",
80
+ expires_in: 1.days
81
+ )
82
+
83
+ # configure sessions, setting the sentinel config as the
84
+ # servers value, merging opts with the sentinel conf.
85
+ config.session_store :redis_store, {
86
+ servers: sentinel_config.merge(
87
+ namespace: "sessions"
88
+ ),
89
+ expires_in: 2.days
90
+ }
91
+ ```
29
92
 
30
93
  ## Running tests
31
94
 
32
- gem install bundler
33
- git clone git://github.com/jodosha/redis-store.git
34
- cd redis-store/redis-rails
35
- bundle install
36
- bundle exec rake
95
+ ```shell
96
+ gem install bundler
97
+ git clone git://github.com/redis-store/redis-rails.git
98
+ cd redis-rails
99
+ bundle install
100
+ bundle exec rake
101
+ ```
37
102
 
38
103
  If you are on **Snow Leopard** you have to run `env ARCHFLAGS="-arch x86_64" bundle exec rake`
39
104
 
105
+ ## Status
106
+
107
+ [![Gem Version](https://badge.fury.io/rb/redis-rails.png)](http://badge.fury.io/rb/redis-rails) [![Build Status](https://secure.travis-ci.org/redis-store/redis-rails.png?branch=master)](http://travis-ci.org/jodosha/redis-rails?branch=master) [![Code Climate](https://codeclimate.com/github/jodosha/redis-store.png)](https://codeclimate.com/github/redis-store/redis-rails)
108
+
40
109
  ## Copyright
41
110
 
42
- (c) 2009 - 2011 Luca Guidi - [http://lucaguidi.com](http://lucaguidi.com), released under the MIT license
111
+ 2009 - 2011 Luca Guidi - [http://lucaguidi.com](http://lucaguidi.com), released under the MIT license
data/Rakefile CHANGED
@@ -1,7 +1,4 @@
1
- require 'bundler'
2
- Bundler.setup
3
- require 'rake'
4
- require 'bundler/gem_tasks'
5
-
6
- load 'tasks/redis.tasks.rb'
7
- task :default => 'redis:test:suite'
1
+ require "bundler/setup"
2
+ require "rake"
3
+ require "bundler/gem_tasks"
4
+ require "redis-store/testing/tasks"
@@ -1,7 +1,7 @@
1
- require 'redis-store'
2
- require 'redis-rails/version'
3
- require 'redis-activesupport'
4
- require 'redis-actionpack'
1
+ require "redis-store"
2
+ require "redis-rails/version"
3
+ require "redis-activesupport"
4
+ require "redis-actionpack"
5
5
 
6
6
  class Redis
7
7
  module Rails
@@ -1,5 +1,5 @@
1
1
  class Redis
2
2
  module Rails
3
- VERSION = '4.0.0'
3
+ VERSION = "5.0.0.pre"
4
4
  end
5
5
  end
@@ -5,11 +5,12 @@ require "redis-rails/version"
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "redis-rails"
7
7
  s.version = Redis::Rails::VERSION
8
- s.authors = ["Luca Guidi"]
9
- s.email = ["me@lucaguidi.com"]
8
+ s.authors = ["Luca Guidi", "Ryan Bigg"]
9
+ s.email = ["me@lucaguidi.com", "me@ryanbigg.com"]
10
10
  s.homepage = "http://redis-store.org/redis-rails"
11
11
  s.summary = %q{Redis for Ruby on Rails}
12
12
  s.description = %q{Redis for Ruby on Rails}
13
+ s.license = 'MIT'
13
14
 
14
15
  s.rubyforge_project = "redis-rails"
15
16
 
@@ -18,12 +19,13 @@ Gem::Specification.new do |s|
18
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
20
  s.require_paths = ["lib"]
20
21
 
21
- s.add_dependency 'redis-store', '~> 1.1.0'
22
- s.add_dependency 'redis-activesupport', '~> 4'
23
- s.add_dependency 'redis-actionpack', '~> 4'
22
+ s.add_dependency "redis-store", "~> 1.2.0.pre"
23
+ s.add_dependency "redis-activesupport", "~> 5.0.0.pre"
24
+ s.add_dependency "redis-actionpack", "~> 5.0.0.pre"
24
25
 
25
- s.add_development_dependency 'rake', '~> 10'
26
- s.add_development_dependency 'bundler', '~> 1.3'
27
- s.add_development_dependency 'mocha', '~> 0.14.0'
28
- s.add_development_dependency 'minitest', '~> 4.2'
26
+ s.add_development_dependency "rake", "~> 10"
27
+ s.add_development_dependency "bundler", "~> 1.3"
28
+ s.add_development_dependency "mocha", "~> 0.14.0"
29
+ s.add_development_dependency "minitest", "~> 4.2"
30
+ s.add_development_dependency "redis-store-testing"
29
31
  end
@@ -1,4 +1,4 @@
1
- require 'test_helper'
1
+ require "test_helper"
2
2
 
3
3
  describe Redis::Rails do
4
4
  it "must require ActiveSupport dependency" do
@@ -1,4 +1,4 @@
1
- require 'bundler/setup'
2
- require 'minitest/autorun'
3
- require 'mocha/setup'
4
- require 'redis-rails'
1
+ require "bundler/setup"
2
+ require "minitest/autorun"
3
+ require "mocha/setup"
4
+ require "redis-rails"
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 5.0.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luca Guidi
8
+ - Ryan Bigg
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-08-20 00:00:00.000000000 Z
12
+ date: 2016-05-09 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: redis-store
@@ -16,42 +17,42 @@ dependencies:
16
17
  requirements:
17
18
  - - ~>
18
19
  - !ruby/object:Gem::Version
19
- version: 1.1.0
20
+ version: 1.2.0.pre
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ~>
25
26
  - !ruby/object:Gem::Version
26
- version: 1.1.0
27
+ version: 1.2.0.pre
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: redis-activesupport
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
32
  - - ~>
32
33
  - !ruby/object:Gem::Version
33
- version: '4'
34
+ version: 5.0.0.pre
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
39
  - - ~>
39
40
  - !ruby/object:Gem::Version
40
- version: '4'
41
+ version: 5.0.0.pre
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: redis-actionpack
43
44
  requirement: !ruby/object:Gem::Requirement
44
45
  requirements:
45
46
  - - ~>
46
47
  - !ruby/object:Gem::Version
47
- version: '4'
48
+ version: 5.0.0.pre
48
49
  type: :runtime
49
50
  prerelease: false
50
51
  version_requirements: !ruby/object:Gem::Requirement
51
52
  requirements:
52
53
  - - ~>
53
54
  - !ruby/object:Gem::Version
54
- version: '4'
55
+ version: 5.0.0.pre
55
56
  - !ruby/object:Gem::Dependency
56
57
  name: rake
57
58
  requirement: !ruby/object:Gem::Requirement
@@ -108,14 +109,30 @@ dependencies:
108
109
  - - ~>
109
110
  - !ruby/object:Gem::Version
110
111
  version: '4.2'
112
+ - !ruby/object:Gem::Dependency
113
+ name: redis-store-testing
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
111
126
  description: Redis for Ruby on Rails
112
127
  email:
113
128
  - me@lucaguidi.com
129
+ - me@ryanbigg.com
114
130
  executables: []
115
131
  extensions: []
116
132
  extra_rdoc_files: []
117
133
  files:
118
134
  - .gitignore
135
+ - .travis.yml
119
136
  - Gemfile
120
137
  - MIT-LICENSE
121
138
  - README.md
@@ -123,11 +140,11 @@ files:
123
140
  - lib/redis-rails.rb
124
141
  - lib/redis-rails/version.rb
125
142
  - redis-rails.gemspec
126
- - test/redis-rails/version_test.rb
127
143
  - test/redis_rails_test.rb
128
144
  - test/test_helper.rb
129
145
  homepage: http://redis-store.org/redis-rails
130
- licenses: []
146
+ licenses:
147
+ - MIT
131
148
  metadata: {}
132
149
  post_install_message:
133
150
  rdoc_options: []
@@ -140,16 +157,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
157
  version: '0'
141
158
  required_rubygems_version: !ruby/object:Gem::Requirement
142
159
  requirements:
143
- - - '>='
160
+ - - '>'
144
161
  - !ruby/object:Gem::Version
145
- version: '0'
162
+ version: 1.3.1
146
163
  requirements: []
147
164
  rubyforge_project: redis-rails
148
- rubygems_version: 2.0.3
165
+ rubygems_version: 2.5.2
149
166
  signing_key:
150
167
  specification_version: 4
151
168
  summary: Redis for Ruby on Rails
152
169
  test_files:
153
- - test/redis-rails/version_test.rb
154
170
  - test/redis_rails_test.rb
155
171
  - test/test_helper.rb
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- describe Redis::Rails::VERSION do
4
- it 'returns current version' do
5
- Redis::Rails::VERSION.must_equal '4.0.0'
6
- end
7
- end