dimples 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dimples/configuration.rb +1 -3
- data/lib/dimples/publishable.rb +19 -5
- data/lib/dimples/version.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd2d51dbcbd0c10c03542661f809574871431fba
|
4
|
+
data.tar.gz: ee382f7f2b50192068d97de6d9610ecbae179f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c13dd73aec1705d44b4fcbe166ed503f9574912a36e70efc30dfd46831156286ca36f07036d7f08bce4209341bec2d2b0f2b7abafb204617dfe26b2027f3358a
|
7
|
+
data.tar.gz: f5b69ede0e4303853b5e6f5ac759ce7e688573e7244414d2b1e83af8f80e6383c322a3923ca8c85ce8af1c71efef1dbc11dbc8c92b4f2621bb4a4d03ece71143
|
data/lib/dimples/publishable.rb
CHANGED
@@ -17,14 +17,28 @@ module Dimples
|
|
17
17
|
context[:site] = @site unless context[:site]
|
18
18
|
context[:this] = self unless context[:this]
|
19
19
|
|
20
|
+
proc = Proc.new { |template| contents() }
|
21
|
+
|
22
|
+
renderer = if @path
|
23
|
+
extension = File.extname(@path)[1..-1]
|
24
|
+
options = @site.config['rendering'][extension] || {}
|
25
|
+
|
26
|
+
Tilt.new(@path, options, &proc)
|
27
|
+
else
|
28
|
+
Tilt::StringTemplate.new(&proc)
|
29
|
+
end
|
30
|
+
|
20
31
|
begin
|
21
|
-
proc = Proc.new { |template| contents() }
|
22
|
-
renderer = @path ? Tilt.new(@path, &proc) : Tilt::StringTemplate.new(&proc)
|
23
32
|
output = renderer.render(nil, context) { body }.strip
|
24
|
-
|
25
33
|
@rendered_contents = output
|
26
|
-
rescue RuntimeError, TypeError, NoMethodError => e
|
27
|
-
|
34
|
+
rescue RuntimeError, TypeError, NoMethodError, SyntaxError => e
|
35
|
+
problem_file = if @path
|
36
|
+
@path.gsub(@site.source_paths[:root], '')
|
37
|
+
else
|
38
|
+
"dynamic #{type}"
|
39
|
+
end
|
40
|
+
|
41
|
+
raise "Failed to render #{problem_file} - #{e}"
|
28
42
|
end
|
29
43
|
|
30
44
|
if use_layout && @layout && @site.templates[@layout]
|
data/lib/dimples/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dimples
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Bogan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|
@@ -24,8 +24,7 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
-
description:
|
28
|
-
usesthis.com.
|
27
|
+
description: A very, very, very simple gem for building static websites.
|
29
28
|
email:
|
30
29
|
- d+dimples@waferbaby.com
|
31
30
|
executables: []
|
@@ -64,5 +63,5 @@ rubyforge_project:
|
|
64
63
|
rubygems_version: 2.2.2
|
65
64
|
signing_key:
|
66
65
|
specification_version: 4
|
67
|
-
summary: A
|
66
|
+
summary: A basic static site generator
|
68
67
|
test_files: []
|