refactored to fix relative path bug with the compile command

This commit is contained in:
Scott Davis 2011-04-01 11:14:30 -04:00
parent da2af62f47
commit f83f85406c
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ GIT
PATH PATH
remote: . remote: .
specs: specs:
compass (0.11.beta.5.0cf4fcd) compass (0.11.beta.5.da2af62)
chunky_png (~> 1.1.0) chunky_png (~> 1.1.0)
sass (>= 3.1.0.alpha.249) sass (>= 3.1.0.alpha.249)

View File

@ -7,7 +7,7 @@ module Compass
def initialize(working_path, from, to, options) def initialize(working_path, from, to, options)
self.working_path = working_path self.working_path = working_path
self.from, self.to = from, to self.from, self.to = from.gsub('./', ''), to
self.logger = options.delete(:logger) self.logger = options.delete(:logger)
self.options = options self.options = options
self.options[:cache_location] ||= determine_cache_location self.options[:cache_location] ||= determine_cache_location
@ -30,7 +30,7 @@ module Compass
end end
def stylesheet_name(sass_file) def stylesheet_name(sass_file)
%r(#{from}\/(.+)\.(.+)).match(sass_file)[1] sass_file.gsub(%r{#{from}/}, '')[0..-6]
end end
def css_files def css_files