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

apparently newlines don't work with ruby 1.8

This commit is contained in:
tdreyno 2009-11-11 14:10:07 -08:00
parent 58a6777ee4
commit 5476bc05f7
2 changed files with 2 additions and 3 deletions

View file

@ -5,7 +5,7 @@ trap("TSTP") do
fork do fork do
require "open3" require "open3"
first_run = true first_run = true
Open3.popen3(%Q{cd "#{Dir.pwd}" && mm-build | grep FORCED}) do |stdin, stdout, stderr| Open3.popen3(%Q{cd "#{Dir.pwd}" && #{File.join(File.dirname(__FILE__), "mm-build")} | grep FORCED}) do |stdin, stdout, stderr|
puts "\n== Building the site..." puts "\n== Building the site..."
stdout.readlines.each do |l| stdout.readlines.each do |l|
puts "== Updated:" if first_run puts "== Updated:" if first_run

View file

@ -29,8 +29,7 @@ module Middleman
def self.file(name, *args, &block) def self.file(name, *args, &block)
if (args[0] === args[1]) if (args[0] === args[1])
args[1] = args[0].gsub("#{File.basename(Middleman::Base.views)}/", "") args[1] = args[0].gsub("#{File.basename(Middleman::Base.views)}/", "").gsub("#{File.basename(Middleman::Base.public)}/", "")
.gsub("#{File.basename(Middleman::Base.public)}/", "")
end end
super(name, *args, &block) super(name, *args, &block)
end end