From 9cca38f85dce497d81ad49d7e818b5a97537abf1 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 13 Feb 2010 17:19:57 -0800 Subject: [PATCH] Disable the parse method with a decent error message. It should only be used internally now. --- lib/compass/configuration/serialization.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/compass/configuration/serialization.rb b/lib/compass/configuration/serialization.rb index ade505df..ed93686b 100644 --- a/lib/compass/configuration/serialization.rb +++ b/lib/compass/configuration/serialization.rb @@ -10,7 +10,7 @@ module Compass module ClassMethods def new_from_file(config_file) data = Data.new(config_file) - data.parse(config_file) + data._parse(config_file) data end @@ -22,8 +22,12 @@ module Compass end module InstanceMethods - # parses a configuration file which is a ruby script def parse(config_file) + raise Compass::Error, "Compass.configuration.parse(filename) has been removed. Please call Compass.add_project_configuration(filename) instead." + end + + # parses a configuration file which is a ruby script + def _parse(config_file) unless File.readable?(config_file) raise Compass::Error, "Configuration file, #{config_file}, not found or not readable." end