diff --git a/lib/compass/app_integration.rb b/lib/compass/app_integration.rb index 60b1c92f..a8e1beb9 100644 --- a/lib/compass/app_integration.rb +++ b/lib/compass/app_integration.rb @@ -5,10 +5,26 @@ end module Compass module AppIntegration module Helpers - def lookup(project_type) - eval "Compass::AppIntegration::#{camelize(project_type)}" - rescue NameError - raise Compass::Error, "No application integration exists for #{project_type}" + attr_accessor :project_types + DEAFULT_PROJECT_TYPES = { + :merb => "Compass::AppIntegration::Merb", + :stand_alone => "Compass::AppIntegration::StandAlone" + } + + def init + @project_types ||= DEAFULT_PROJECT_TYPES + end + + def lookup(type) + unless @project_types[type].nil? + eval @project_types[type] + else + raise Compass::Error, "No application integration exists for #{type}" + end + end + + def register(type, klass) + @project_types[type] = klass end protected @@ -20,5 +36,6 @@ module Compass end extend Helpers + init end end diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index b6396bc1..5e5b874e 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -80,13 +80,6 @@ module Compass end end - def configure_rails!(app) - return unless app.config.respond_to?(:sass) - app.config.compass.to_sass_engine_options.each do |key, value| - app.config.sass.send(:"#{key}=", value) - end - end - def sass_engine_options configuration.to_sass_engine_options end