From ef89be163d9c96de7dd354b3f2a28903461b3a2b Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Wed, 13 Jul 2011 17:34:41 -0700 Subject: [PATCH] fix sprockets test --- lib/middleman/core_extensions/sprockets.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/middleman/core_extensions/sprockets.rb b/lib/middleman/core_extensions/sprockets.rb index aebe398e..f28902d5 100644 --- a/lib/middleman/core_extensions/sprockets.rb +++ b/lib/middleman/core_extensions/sprockets.rb @@ -17,7 +17,10 @@ module Middleman::CoreExtensions::Sprockets class MiddlemanEnvironment < Sprockets::Environment def initialize(app) - super File.expand_path(app.views) + full_path = app.views + full_path = File.join(app.root, app.views) unless app.views.include?(app.root) + + super File.expand_path(full_path) end end @@ -31,8 +34,7 @@ module Middleman::CoreExtensions::Sprockets self.js_compressor = app.settings.js_compressor # configure search paths - javascripts_path = File.join(File.expand_path(app.views), app.js_dir) - append_path javascripts_path + append_path app.js_dir end end