lib/compass-sass.rb in capucine-0.2.1 vs lib/compass-sass.rb in capucine-0.2.2
- old
+ new
@@ -25,18 +25,19 @@
end
end
end
def update_config
- require 'tempfile'
- require 'digest/md5'
+ # require 'tempfile'
+ # require 'digest/md5'
template_file = File.join @cap.settings.content_dir, 'templates', 'compass_config.erb'
+ tmp = File.join @cap.settings.working_dir, '.compass_config.rb'
- md5 = Digest::MD5.hexdigest(@cap.settings.working_dir.to_s)
- tmp = Tempfile.new('capucine_'+md5)
- @tmp_config = tmp.path
+ # md5 = Digest::MD5.hexdigest(@cap.settings.working_dir.to_s)
+ # tmp = Tempfile.new('capucine_'+md5)
+ @tmp_config = tmp
@cap.settings.conf['compass_plugins_list'] = []
plugins_gems = []
plugins = @cap.settings.conf['compass_plugins']
@@ -60,11 +61,11 @@
f.write(result)
f.close
self.update_plugins plugins_gems
- return tmp.path
+ return @tmp_config
end
def import_css
import_dir = File.join @cap.settings.working_dir, @cap.settings.conf['sass_import_css_dir']
@@ -93,12 +94,13 @@
end
end
def run_watch
conf = self.update_config
+ working_dir = @cap.settings.working_dir
self.import_css if @cap.settings.conf['sass_import_css']
- compass_args = ['watch', '--config', conf, @cap.settings.working_dir]
+ compass_args = ['watch', '--config', conf, working_dir]
compass_args = compass_args.join(' ')
proc_watch = Thread.new { self.exec_compass compass_args }
return proc_watch
end