iron_cache_rails 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -1,28 +1,37 @@
|
|
1
|
-
IronCache Rails Support Client
|
2
|
-
-------------
|
1
|
+
# IronCache Rails Support Client
|
3
2
|
|
3
|
+
## Getting Started
|
4
4
|
|
5
|
-
|
6
|
-
====================
|
5
|
+
You'll need an account at [Iron.io](http://www.iron.io) first.
|
7
6
|
|
8
|
-
|
7
|
+
Then add this gem to your Gemfile:
|
9
8
|
|
10
|
-
|
9
|
+
```ruby
|
10
|
+
gem 'iron_cache_rails'
|
11
|
+
```
|
11
12
|
|
12
|
-
|
13
|
+
## Using As Rails Store
|
14
|
+
|
15
|
+
You can use IronCache as any other rails store. Put iron.json into your project's config dir, add iron_cache_rails to Gemfile and you are ready to go.
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
config.cache_store = :iron_cache
|
19
|
+
```
|
13
20
|
|
14
|
-
|
21
|
+
Alternatively, you can supply project_id and token in code.
|
15
22
|
|
23
|
+
```ruby
|
24
|
+
config.cache_store = :iron_cache, project_id: 'XXX', token: 'YYY'
|
25
|
+
```
|
16
26
|
|
17
|
-
Using As Rails Session Store
|
18
|
-
====================
|
27
|
+
## Using As Rails Session Store
|
19
28
|
|
20
|
-
You can use IronCache as any other rails session store. Put iron.json into your project's config dir, add
|
29
|
+
You can use IronCache as any other rails session store. Put iron.json into your project's config dir, add iron_cache_rails to Gemfile and you are ready to go.
|
21
30
|
|
22
31
|
`config/initializers/session_store.rb` :
|
23
32
|
|
24
33
|
```ruby
|
25
|
-
AppName::Application.config.session_store :
|
34
|
+
AppName::Application.config.session_store :iron_cache
|
26
35
|
```
|
27
36
|
|
28
37
|
Alternatively, you can supply project_id and token in code.
|
data/iron_cache_rails.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "iron_cache_rails"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version =
|
15
|
+
gem.version = IronCacheRails::VERSION
|
16
16
|
|
17
17
|
gem.required_rubygems_version = ">= 1.3.6"
|
18
18
|
gem.required_ruby_version = Gem::Requirement.new(">= 1.9")
|
@@ -3,12 +3,12 @@ require 'base64'
|
|
3
3
|
|
4
4
|
module ActiveSupport
|
5
5
|
module Cache
|
6
|
-
class
|
6
|
+
class IronCache < ActiveSupport::Cache::Store
|
7
7
|
|
8
8
|
def initialize(options = nil)
|
9
9
|
super(options)
|
10
10
|
|
11
|
-
@client = IronCache::Client.new(@options)
|
11
|
+
@client = ::IronCache::Client.new(@options)
|
12
12
|
|
13
13
|
extend ActiveSupport::Cache::Strategy::LocalCache
|
14
14
|
end
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module
|
2
|
-
VERSION = "0.1.
|
1
|
+
module IronCacheRails
|
2
|
+
VERSION = "0.1.1"
|
3
3
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_cache_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: iron_cache
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- Rakefile
|
106
106
|
- iron_cache_rails.gemspec
|
107
107
|
- lib/action_dispatch/session/iron_cache.rb
|
108
|
-
- lib/active_support/cache/
|
108
|
+
- lib/active_support/cache/iron_cache.rb
|
109
109
|
- lib/iron_cache_rails.rb
|
110
110
|
- lib/iron_cache_rails/version.rb
|
111
111
|
homepage: https://github.com/iron-io/iron_cache_rails
|