Add config/compass.rb as a known config location. Default to config/compass.rb as the configuration file for rails projects.
This commit is contained in:
parent
57aae94511
commit
ba33c5a5a6
@ -77,9 +77,8 @@ Feature: Command Line
|
|||||||
Scenario: Initializing a rails project
|
Scenario: Initializing a rails project
|
||||||
Given I'm in a newly created rails project: my_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
|
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.rb is reported created
|
||||||
Then a config file config/compass.config is created
|
Then a config file config/compass.rb is created
|
||||||
And a ruby file config/compass.config is created
|
|
||||||
And a sass file config/initializers/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/screen.sass is created
|
||||||
And a sass file app/stylesheets/print.sass is created
|
And a sass file app/stylesheets/print.sass is created
|
||||||
|
@ -22,8 +22,10 @@ module Compass
|
|||||||
end
|
end
|
||||||
|
|
||||||
def write_configuration_files(config_file = nil)
|
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
|
write_file config_file, config_contents
|
||||||
|
directory File.dirname(targetize('config/initializers/compass.rb'))
|
||||||
write_file targetize('config/initializers/compass.rb'), initializer_contents
|
write_file targetize('config/initializers/compass.rb'), initializer_contents
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ module Compass
|
|||||||
end
|
end
|
||||||
|
|
||||||
# TODO: Deprecate the src/config.rb location.
|
# 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.
|
# Finds the configuration file, if it exists in a known location.
|
||||||
def detect_configuration_file(project_path = nil)
|
def detect_configuration_file(project_path = nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user