1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

Merge pull request #177 from bhollis/master

Fix previous commit and a few other changes
This commit is contained in:
Thomas Reynolds 2011-11-30 22:11:58 -08:00
commit 46e6d37fff
3 changed files with 12 additions and 12 deletions

View file

@ -7,11 +7,11 @@ Cucumber::Rake::Task.new(:cucumber, 'Run features that should pass') do |t|
t.cucumber_opts = "--color --tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
end
require 'rake/testtask'
require 'rake/clean'
task :test => ["cucumber"]
desc "Build HTML documentation"
task :doc do
`bundle exec yard`
sh 'bundle exec yard'
end

View file

@ -20,11 +20,11 @@ module Middleman::CoreExtensions::Builder
self.class.build_reroute(&block)
end
def reroute_builder(desination, request_path)
result = [desination, request_path]
def reroute_builder(destination, request_path)
result = [destination, request_path]
build_reroute.each do |block|
output = instance_exec(desination, request_path, &block)
output = instance_exec(destination, request_path, &block)
if output
result = output
break

View file

@ -17,7 +17,7 @@ module Middleman::CoreExtensions::FrontMatter
frontmatter.touch_file(file)
end
file_deleted do |file|
file_deleted FrontMatter.matcher do |file|
frontmatter.remove_file(file)
end
@ -25,7 +25,7 @@ module Middleman::CoreExtensions::FrontMatter
relative_path = path.sub(source_dir, "")
data = if frontmatter.has_data?(relative_path)
frontmatter.data(relative_path).first
frontmatter.data(relative_path)
else
{}
end
@ -52,7 +52,7 @@ module Middleman::CoreExtensions::FrontMatter
class FrontMatter
class << self
def matcher
%r{^source/.*\.html}
%r{source/.*\.html}
end
end
@ -78,7 +78,7 @@ module Middleman::CoreExtensions::FrontMatter
if result
file = file.sub(@app.source_dir, "")
@local_data[file] = result
@local_data[file] = result[0]
path = File.join(@app.source_dir, file)
@app.cache.set([:raw_template, path], result[1])
end