staticpress 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,7 +38,16 @@ module Staticpress::Content
38
38
  regex = /#{regex_frontmatter}#{regex_text}/
39
39
 
40
40
  c = template_path_content
41
- @content = c.match(regex_frontmatter) ? c.match(regex) : c.match(regex_text)
41
+
42
+ @content = if Tilt.mappings.include?(template_path.extname[1..-1])
43
+ c.match(regex_frontmatter) ? c.match(regex) : c.match(regex_text)
44
+ else
45
+ reply = { :text => c }
46
+ def reply.names
47
+ keys.map &:to_s
48
+ end
49
+ reply
50
+ end
42
51
  end
43
52
 
44
53
  def content_type
@@ -2,7 +2,7 @@ module Staticpress
2
2
  class Version
3
3
  extend Comparable
4
4
 
5
- SIGNATURE = [0, 6, 1]
5
+ SIGNATURE = [0, 6, 2]
6
6
 
7
7
  def self.<=>(other)
8
8
  other = other.split('.').map(&:to_i) if other.respond_to? :split
@@ -13,4 +13,8 @@ class SiteTest < TestCase
13
13
  assert_equal post, site.find_content_by_env(env('/2011/07/20/hello'))
14
14
  assert_nil site.find_content_by_env(env('/i/dont/exist'))
15
15
  end
16
+
17
+ def test_save
18
+ refute_raises(ArgumentError) { site.save }
19
+ end
16
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: staticpress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
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: 2012-11-01 00:00:00.000000000 Z
12
+ date: 2012-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aruba