tiny_site 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  class TinySite
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/lib/tiny_site.rb CHANGED
@@ -7,7 +7,7 @@ class TextileParts
7
7
  def self.parse(tp, image_path='')
8
8
  return {:title => '404 not found'} unless tp
9
9
 
10
- vars, *parts = tp.split(/^\+{4}|\+{4}$/)
10
+ vars, *parts = tp.split(/^\+{4}([\w\d\-_]+)\+{4}$/)
11
11
 
12
12
  vars = YAML.load(vars) || {}
13
13
 
@@ -70,14 +70,14 @@ end
70
70
 
71
71
  class TinySite
72
72
  def initialize(opts)
73
- @file_path = opts[:file_path]
74
- @file_ending = opts[:file_ending] || 'textile'
75
- @image_path = opts[:image_path] || File.join(@file_path, 'images')
76
- @cache_buster = opts[:cache_buster] || 'bust'
73
+ @file_path = opts[:file_path]
74
+ @file_extension = opts[:file_extension] || 'textile'
75
+ @image_path = opts[:image_path] || File.join(@file_path, 'images')
76
+ @cache_buster = opts[:cache_buster] || 'bust'
77
77
  end
78
78
 
79
79
  def remote_file_url_for(filename)
80
- File.join @file_path, "#{filename}.#{@file_ending}"
80
+ File.join @file_path, "#{filename}.#{@file_extension}"
81
81
  end
82
82
 
83
83
  def render
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: tiny_site
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Niko Dittmann
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-28 00:00:00 +01:00
13
+ date: 2011-03-03 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency