poly-cms 0.1.1 → 0.1.2

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: d189bbff7e2bba6fca89650d50307131114d36c3
4
- data.tar.gz: ae64c24afff2ef3e26b41dbd3036d80e74cb017c
3
+ metadata.gz: 404e812b2160be59be76886608051ca17f98a49c
4
+ data.tar.gz: a0faf79943399a9354a7dc7a60c23019c3879cb6
5
5
  SHA512:
6
- metadata.gz: 20e2f27ec6193cb9ab048191266d537a104b466a45d809971774519aa84e67ee71253e4ae84ea47577d1c33887d715d66d88194d0326d5bf807e264e14563c58
7
- data.tar.gz: bd1a4c1e163a8c18209bfd4d07a517842ee8678d466447e1653c4e05d0e6481e25a0e3198dd040433ae401de10ca4bd24f38474bd9a5de12edc998b06790af1f
6
+ metadata.gz: a4cc128ab110cc6d65bb3316572e083111ee49b0c996591e8164dd1931ae01a680e0ad2a261626d5aa789c2afd650297cba6ff7251d28473c61ac17df07e4201
7
+ data.tar.gz: a213be18ddd1590717d6f86eefc1595810ae89829fc3322b6d2a030072850a5d71988387d12b2a96d3a8d47367cf5fe5a378a827db165ceeeb8c9ce1a474143d
@@ -26,7 +26,10 @@ module Poly
26
26
  read(path)
27
27
  @path = path
28
28
 
29
- raise Sinatra::NotFound if (@raw.nil? and !quiet)
29
+ if (!@raw and !quiet)
30
+ @html = false
31
+ return
32
+ end
30
33
 
31
34
  @scope = current_scope
32
35
  @scope.instance_variable_set :@page, self
@@ -36,7 +39,7 @@ module Poly
36
39
  end
37
40
 
38
41
  def read(path)
39
- @raw ||= Cabi.read( Poly::Lib::Path.path(path) ) || Cabi.read( Poly::Lib::Path.page_path(path) )
42
+ @raw ||= Cabi.read( Poly::Lib::Path.path(path) ) || Cabi.read( Poly::Lib::Path.page_path(path) ) || false
40
43
  end
41
44
 
42
45
  def parse_else
@@ -11,7 +11,11 @@ module Poly
11
11
  def render_page(path)
12
12
  # Grab the page & render it.
13
13
  page = Poly::Lib::Page.new(path, self)
14
- page.html
14
+ if page.html
15
+ page.html
16
+ else
17
+ raise Sinatra::NotFound
18
+ end
15
19
  end
16
20
 
17
21
  def partial(path, locals={})
@@ -27,16 +27,16 @@ module Poly
27
27
  before do
28
28
  if Sinatra::Base.production?
29
29
 
30
- file = Poly::Lib::CachedFile.find(request.path_info)
30
+ # file = Poly::Lib::CachedFile.find(request.path_info)
31
31
 
32
- if file
33
- if (env['HTTP_PRAGMA'] == 'no-cache') or request.path.match Regexp.new(CACHE_BLACKLIST.join("|"))
34
- # don't send cached file.
35
- else
36
- last_modified File.mtime(file)
37
- send_file(file)
38
- end
39
- end
32
+ # if file
33
+ # if (env['HTTP_PRAGMA'] == 'no-cache') or request.path.match Regexp.new(CACHE_BLACKLIST.join("|"))
34
+ # # don't send cached file.
35
+ # else
36
+ # last_modified File.mtime(file)
37
+ # send_file(file)
38
+ # end
39
+ # end
40
40
 
41
41
  end
42
42
  end
@@ -3,7 +3,7 @@ require 'bundler'
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'poly-cms'
6
- gem.version = '0.1.1'
6
+ gem.version = '0.1.2'
7
7
  gem.summary = 'A simple way to manage your content.'
8
8
 
9
9
  gem.description = <<-EOS
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poly-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Gonzalez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-01 00:00:00.000000000 Z
11
+ date: 2013-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor