wheelhouse-blog 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/handlers/blog/blog_handler.rb +5 -1
- data/lib/blog/wheelhouse_route_constraints.rb +2 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59627cfdc613fe35ccea320cf56dc326836acb55
|
4
|
+
data.tar.gz: ad04d5d983808d2ac51fe44ca878f274b3d5ee2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81860936c6c180d903fb3868f9766447c8aa8d2346f9f7b185b197155a976d67cd4441c46e8e27ec36b5402e49d0ae399a330d161adc542ce850898d5fac9cd2
|
7
|
+
data.tar.gz: fc0b199f4f9f837c49affa13be098cf2536f56482d8135a0adc4e020b324093c355b7f8b01f337b0d82ae21caaad1a27376f1b9edb0c098fd8cc6f958e8580af
|
@@ -1,7 +1,11 @@
|
|
1
1
|
class Blog::BlogHandler < Wheelhouse::ResourceHandler
|
2
2
|
extend Blog::WheelhouseRouteConstraints
|
3
|
+
|
4
|
+
get :cache => true do
|
5
|
+
@posts = paginate(@blog.posts)
|
6
|
+
end
|
3
7
|
|
4
|
-
get "/
|
8
|
+
get "/page/:page", :cache => true, :page => /\d+/ do
|
5
9
|
@posts = paginate(@blog.posts)
|
6
10
|
end
|
7
11
|
|
@@ -5,6 +5,8 @@ module Blog
|
|
5
5
|
def define_action(path, action_name, method, options={}, &block)
|
6
6
|
define_method(action_name, &block)
|
7
7
|
_mapper.match(path, { :via => method, :to => action(action_name) }.merge(options))
|
8
|
+
|
9
|
+
caches_page(action_name) if options[:cache]
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wheelhouse-blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Pohlenz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wheelhouse
|
@@ -111,8 +111,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: 1.3.6
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.4.6
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: Wheelhouse CMS Blog Plugin
|
118
118
|
test_files: []
|
119
|
+
has_rdoc:
|