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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65654a38dfe3eaf36ed6e87e29aefadac3ec47b4
4
- data.tar.gz: 8afc245e00073202262222dffe2843fbd604b9eb
3
+ metadata.gz: 59627cfdc613fe35ccea320cf56dc326836acb55
4
+ data.tar.gz: ad04d5d983808d2ac51fe44ca878f274b3d5ee2b
5
5
  SHA512:
6
- metadata.gz: 3768572cbcc000bdb1b7351c9608e4ec0269d1353640274c9c261d1f8ee7f198ebb78d027bd9ab83ef4ea1d9e5a3dcc766315c177e6152098321822379b7b0eb
7
- data.tar.gz: 868a2760aab3aef051878033d1ada20bbaa41840327bfbba14d828edeb16af3df53b71f1c1492af44648a62ddb6e1782d4f9da0785e7e01ebd2af45813b7371c
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 "/(page/:page)", :cache => true, :page => /\d+/ do
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.5
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: 2014-04-14 00:00:00.000000000 Z
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.2.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: