def self.normalize_options(options)
options = DEFAULT_OPTIONS.merge(options.reject {|k, v| v.nil?})
options[:importer] ||= options[:filesystem_importer].new(".") if options[:filename]
options[:original_filename] ||= options[:filename]
options[:cache_store] ||= Sass::CacheStores::Chain.new(
Sass::CacheStores::Memory.new, Sass::CacheStores::Filesystem.new(options[:cache_location]))
options[:line_comments] ||= options[:line_numbers]
options[:load_paths] = (options[:load_paths] + Sass.load_paths).map do |p|
next p unless p.is_a?(String) || (defined?(Pathname) && p.is_a?(Pathname))
options[:filesystem_importer].new(p.to_s)
end
options[:property_syntax] ||= options[:attribute_syntax]
case options[:property_syntax]
when :alternate; options[:property_syntax] = :new
when :normal; options[:property_syntax] = :old
end
options
end