lib/compass-sass.rb in capucine-0.2.5 vs lib/compass-sass.rb in capucine-0.2.9
- old
+ new
@@ -25,22 +25,34 @@
end
end
end
def update_config
- # 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
+ @cap.settings.conf['compass_custom'] = {}
+ boolean = %w{disable_warnings line_comments relative_assets sass_options}
+ symbol = %w{output_style}
+
+ for k, v in @cap.settings.conf['compass']
+ if boolean.include?(k)
+ v = "#{v}"
+ elsif symbol.include?(k)
+ v = ":#{v}"
+ else
+ v = "\"#{v}\""
+ end
+ @cap.settings.conf['compass_custom'][k] = v
+
+ end
+
@cap.settings.conf['compass_plugins_list'] = []
plugins_gems = []
-
plugins = @cap.settings.conf['compass_plugins']
if plugins.size > 0
plugins.each do |p|
p = p.split('|')