request_store 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -8
- data/lib/request_store.rb +1 -1
- data/lib/request_store/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -56,22 +56,27 @@ Yep, everywhere you used `Thread.current` just change it to
|
|
56
56
|
`RequestStore.store`. Now no matter what server you use, you'll get `1` every
|
57
57
|
time: the storage is local to that request.
|
58
58
|
|
59
|
-
###
|
59
|
+
### Rails 2 compatibility
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
61
|
+
The gem includes a Railtie that will configure everything properly for Rails 3+
|
62
|
+
apps, but if your app is tied to an older (2.x) version, you will have to
|
63
|
+
manually add the middleware yourself. Typically this should just be a matter
|
64
|
+
of adding:
|
64
65
|
|
65
66
|
```
|
66
|
-
use RequestStore::Middleware
|
67
|
+
config.middleware.use RequestStore::Middleware
|
67
68
|
```
|
68
69
|
|
69
|
-
|
70
|
+
into your config/environment.rb.
|
70
71
|
|
71
|
-
|
72
|
+
### No Rails? No Problem!
|
73
|
+
|
74
|
+
A Railtie is added that configures the Middleware for you, but if you're not
|
75
|
+
using Rails, no biggie! Just use the Middleware yourself, however you need.
|
76
|
+
You'll probably have to shove this somewhere:
|
72
77
|
|
73
78
|
```
|
74
|
-
RequestStore
|
79
|
+
use RequestStore::Middleware
|
75
80
|
```
|
76
81
|
|
77
82
|
## Contributing
|
data/lib/request_store.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: request_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
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:
|
12
|
+
date: 2013-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|