[Rails] Move most of the contents of the compass initializer back to the compass codebase. Discover compass extensions automatically during boot.

This commit is contained in:
Chris Eppstein 2010-07-23 22:54:23 -07:00
parent 755b9a3a11
commit 5864f2aeab
2 changed files with 9 additions and 4 deletions

View File

@ -34,6 +34,13 @@ module Compass
end
end
def initialize!
rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s
Compass.add_project_configuration(File.join(root, "config", "compass.rb"))
Compass.discover_extensions!
Compass.configure_sass_plugin!
Compass.handle_configuration_change!
end
end
end
end

View File

@ -105,10 +105,8 @@ NEXTSTEPS
def initializer_contents
%Q{require 'compass'
|rails_root = (defined?(Rails) ? Rails.root : RAILS_ROOT).to_s
|Compass.add_project_configuration(File.join(rails_root, "config", "compass.rb"))
|Compass.configure_sass_plugin!
|Compass.handle_configuration_change!
|require 'compass/app_integration/rails'
|Compass::AppIntegration::Rails.initialize!
|}.gsub(/^\s+\|/,'')
end