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.
- data/lib/tiny_site/version.rb +1 -1
- data/lib/tiny_site.rb +6 -6
- metadata +2 -2
data/lib/tiny_site/version.rb
CHANGED
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}
|
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
|
74
|
-
@
|
75
|
-
@image_path
|
76
|
-
@cache_buster
|
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}.#{@
|
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
|
+
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-
|
13
|
+
date: 2011-03-03 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|