diff --git a/features/command_line.feature b/features/command_line.feature index 6aa615c7..800c2253 100644 --- a/features/command_line.feature +++ b/features/command_line.feature @@ -77,9 +77,8 @@ Feature: Command Line Scenario: Initializing a rails project Given I'm in a newly created rails project: my_rails_project When I initialize a project using: compass init rails --sass-dir app/stylesheets --css-dir public/stylesheets/compiled - Then a config file config/compass.config is reported created - Then a config file config/compass.config is created - And a ruby file config/compass.config is created + Then a config file config/compass.rb is reported created + Then a config file config/compass.rb is created And a sass file config/initializers/compass.rb is created And a sass file app/stylesheets/screen.sass is created And a sass file app/stylesheets/print.sass is created diff --git a/lib/compass/app_integration/rails/installer.rb b/lib/compass/app_integration/rails/installer.rb index 863ad3ff..ece81ea2 100644 --- a/lib/compass/app_integration/rails/installer.rb +++ b/lib/compass/app_integration/rails/installer.rb @@ -22,8 +22,10 @@ module Compass end def write_configuration_files(config_file = nil) - config_file ||= targetize('config/compass.config') + config_file ||= targetize('config/compass.rb') + directory File.dirname(config_file) write_file config_file, config_contents + directory File.dirname(targetize('config/initializers/compass.rb')) write_file targetize('config/initializers/compass.rb'), initializer_contents end diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index 18bd60ac..edcfb40c 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -76,7 +76,7 @@ module Compass end # TODO: Deprecate the src/config.rb location. - KNOWN_CONFIG_LOCATIONS = [".compass/config.rb", "config/compass.config", "config.rb", "src/config.rb"] + KNOWN_CONFIG_LOCATIONS = ['config/compass.rb', ".compass/config.rb", "config/compass.config", "config.rb", "src/config.rb"] # Finds the configuration file, if it exists in a known location. def detect_configuration_file(project_path = nil)