jarrett-quarto 1.2.1 → 1.3.0
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.
- data/VERSION +1 -1
- data/lib/quarto.rb +1 -0
- data/lib/quarto/generator.rb +4 -2
- data/lib/quarto/rails_helper.rb +7 -0
- data/lib/quarto/rendering.rb +0 -2
- data/quarto.gemspec +3 -2
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/lib/quarto.rb
CHANGED
data/lib/quarto/generator.rb
CHANGED
@@ -130,9 +130,11 @@ module Quarto
|
|
130
130
|
def render_to_s(template, locals, options = {})
|
131
131
|
require urls_file_path
|
132
132
|
|
133
|
+
mixins = [Quarto::ProjectUrls, Quarto::RailsHelper, Quarto::UrlHelper]
|
134
|
+
|
133
135
|
page_template_path = "#{@project_path}/pages/#{template}"
|
134
136
|
page_template = ERB.new(File.read(page_template_path))
|
135
|
-
page_content = Rendering.render(page_template, locals,
|
137
|
+
page_content = Rendering.render(page_template, locals, mixins)
|
136
138
|
|
137
139
|
if options.has_key?(:layout)
|
138
140
|
layout = options[:layout]
|
@@ -149,7 +151,7 @@ module Quarto
|
|
149
151
|
layout_template_path = "#{@project_path}/layouts/#{layout}"
|
150
152
|
raise ArgumentError, "Template doesn't exist: #{layout_template_path}" unless File.exists?(layout_template_path)
|
151
153
|
layout_template = ERB.new(File.read(layout_template_path))
|
152
|
-
Rendering.render(layout_template, locals,
|
154
|
+
Rendering.render(layout_template, locals, mixins) do
|
153
155
|
page_content
|
154
156
|
end
|
155
157
|
else
|
data/lib/quarto/rendering.rb
CHANGED
data/quarto.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{quarto}
|
5
|
-
s.version = "1.
|
5
|
+
s.version = "1.3.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jarrett Colby"]
|
9
|
-
s.date = %q{2009-06-
|
9
|
+
s.date = %q{2009-06-10}
|
10
10
|
s.default_executable = %q{quarto}
|
11
11
|
s.description = %q{Quarto is a Ruby framework for generating collections of documents from XML. It steps in where XSLT just won't cut it. Potential applications include web sites and e-books. It's built on top of ERB and REXML.}
|
12
12
|
s.email = %q{jarrett@uchicago.edu}
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"lib/quarto/generator.rb",
|
27
27
|
"lib/quarto/inheritable_attributes.rb",
|
28
28
|
"lib/quarto/init_project.rb",
|
29
|
+
"lib/quarto/rails_helper.rb",
|
29
30
|
"lib/quarto/rendering.rb",
|
30
31
|
"lib/quarto/url_helper.rb",
|
31
32
|
"lib/quarto/xml_doc.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jarrett-quarto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarrett Colby
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-10 00:00:00 -07:00
|
13
13
|
default_executable: quarto
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -42,6 +42,7 @@ files:
|
|
42
42
|
- lib/quarto/generator.rb
|
43
43
|
- lib/quarto/inheritable_attributes.rb
|
44
44
|
- lib/quarto/init_project.rb
|
45
|
+
- lib/quarto/rails_helper.rb
|
45
46
|
- lib/quarto/rendering.rb
|
46
47
|
- lib/quarto/url_helper.rb
|
47
48
|
- lib/quarto/xml_doc.rb
|