nomo 0.0.48 → 0.0.49
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +14 -2
- data/lib/nomo/conditional_get.rb +1 -1
- data/lib/nomo/version.rb +1 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Nomo
|
2
2
|
|
3
|
-
Nomo makes 304 Not Modified headers with Rails applications easy.
|
3
|
+
Nomo makes 304 Not Modified headers and real-time page updates with Rails applications easy.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,19 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
Nomo provides the `has_page` and `modifies` methods to ActiveRecord::Base models.
|
22
|
+
|
23
|
+
### has_page
|
24
|
+
|
25
|
+
Nomo pages are defined using the `has_page` method provided to ActiveRecord::Base models.
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
class Post
|
29
|
+
has_page :show
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
This will create `show_page` and `modify_show_page` methods for each Post instance (see Methods).
|
22
34
|
|
23
35
|
## Contributing
|
24
36
|
|
data/lib/nomo/conditional_get.rb
CHANGED
@@ -6,7 +6,7 @@ module Nomo
|
|
6
6
|
if record_or_options.is_a? Nomo::Page
|
7
7
|
nomo_page = record_or_options
|
8
8
|
|
9
|
-
record_or_options = { etag:
|
9
|
+
record_or_options = { etag: nomo_page.cache_key,
|
10
10
|
last_modified: nomo_page.last_modified }
|
11
11
|
|
12
12
|
if nomo_page.realtime?
|
data/lib/nomo/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nomo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.49
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
16
|
-
requirement: &
|
16
|
+
requirement: &70244350835480 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70244350835480
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: redis-namespace
|
27
|
-
requirement: &
|
27
|
+
requirement: &70244350835060 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70244350835060
|
36
36
|
description: 304 Not Modified Headers made easy.
|
37
37
|
email:
|
38
38
|
- sausman@stackd.com
|