From f83f85406ce2b12c897b155ad66f1156c924a5f7 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Fri, 1 Apr 2011 11:14:30 -0400 Subject: [PATCH] refactored to fix relative path bug with the compile command --- Gemfile.lock | 2 +- lib/compass/compiler.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d6e36fc4..929bec58 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GIT PATH remote: . specs: - compass (0.11.beta.5.0cf4fcd) + compass (0.11.beta.5.da2af62) chunky_png (~> 1.1.0) sass (>= 3.1.0.alpha.249) diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index bf3f7f3e..837b3dab 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -7,7 +7,7 @@ module Compass def initialize(working_path, from, to, options) self.working_path = working_path - self.from, self.to = from, to + self.from, self.to = from.gsub('./', ''), to self.logger = options.delete(:logger) self.options = options self.options[:cache_location] ||= determine_cache_location @@ -30,7 +30,7 @@ module Compass end def stylesheet_name(sass_file) - %r(#{from}\/(.+)\.(.+)).match(sass_file)[1] + sass_file.gsub(%r{#{from}/}, '')[0..-6] end def css_files