less stuff in the rails config file... more stuff coming from defaults.

This commit is contained in:
Chris Eppstein 2010-08-29 02:56:26 -07:00
parent 8a7fdd6fa3
commit ee6d537999
2 changed files with 24 additions and 15 deletions

View File

@ -8,6 +8,8 @@ module Compass
end
def default_sass_dir
# XXX Maybe this should be: app/views/stylesheets
# or maybe layouts should be moved up a level.
File.join("app", "stylesheets")
end
@ -51,6 +53,18 @@ module Compass
File.join("tmp", "sass-cache")
end
def default_project_path
project_path = Compass::AppIntegration::Rails.root
end
def default_http_path
"/" # XXX Where is/was this stored in the Rails config?
end
def default_environment
Compass::AppIntegration::Rails.env
end
end
end
end

View File

@ -106,16 +106,11 @@ NEXTSTEPS
end
def config_contents
"# This configuration file works with both the Compass command line tool and within Rails.\n" +
Compass.configuration.serialize do |prop, value|
if prop == :project_path
"project_path = Compass::AppIntegration::Rails.root\n"
elsif prop == :environment
"environment = Compass::AppIntegration::Rails.env\n"
elsif prop == :output_style
""
end
end
project_path, Compass.configuration.project_path = Compass.configuration.project_path, nil
("# This configuration file works with both the Compass command line tool and within Rails.\n" +
Compass.configuration.serialize)
ensure
Compass.configuration.project_path = project_path
end
def initializer_contents