middleman 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -4
- data/VERSION +1 -1
- data/lib/middleman/base.rb +2 -0
- data/lib/middleman/template/views/index.html.haml +1 -1
- data/lib/middleman/template/views/layout.haml +4 -2
- data/lib/middleman/template/views/stylesheets/site.css.sass +11 -1
- data/middleman.gemspec +1 -1
- data/spec/generator_spec.rb +7 -0
- metadata +1 -1
data/Rakefile
CHANGED
@@ -25,10 +25,6 @@ begin
|
|
25
25
|
gem.add_development_dependency("sdoc")
|
26
26
|
end
|
27
27
|
|
28
|
-
Jeweler::RubyforgeTasks.new do |rubyforge|
|
29
|
-
rubyforge.doc_task = "rdoc"
|
30
|
-
end
|
31
|
-
|
32
28
|
Jeweler::GemcutterTasks.new
|
33
29
|
rescue LoadError
|
34
30
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.3
|
data/lib/middleman/base.rb
CHANGED
@@ -70,6 +70,8 @@ module Middleman
|
|
70
70
|
path << options.index_file if path.match(%r{/$})
|
71
71
|
path.gsub!(%r{^/}, '')
|
72
72
|
|
73
|
+
# layout(:"layout.html") # Insert the .html into the layout name like the rest of the templates
|
74
|
+
|
73
75
|
# If the enabled renderers succeed, return the content, mime-type and an HTTP 200
|
74
76
|
if content = render_path(path)
|
75
77
|
content_type media_type(File.extname(path)), :charset => 'utf-8'
|
data/middleman.gemspec
CHANGED
data/spec/generator_spec.rb
CHANGED
@@ -18,6 +18,13 @@ describe "Generator" do
|
|
18
18
|
FileUtils.rm_rf(@root_dir)
|
19
19
|
end
|
20
20
|
|
21
|
+
it "should use layout file" do
|
22
|
+
build_cmd = project_file("bin", "mm-build")
|
23
|
+
`cd #{@root_dir} && #{build_cmd}`
|
24
|
+
File.exists?("#{@root_dir}/build/index.html").should be_true
|
25
|
+
File.read("#{@root_dir}/build/index.html").should include("Comment in layout")
|
26
|
+
end
|
27
|
+
|
21
28
|
it "should copy template files" do
|
22
29
|
template_dir = project_file("lib", "template", "**/*")
|
23
30
|
Dir[template_dir].each do |f|
|