Fixed a regression in the rails installer.

This commit is contained in:
Chris Eppstein 2010-05-31 13:12:05 -07:00
parent 10804a24af
commit a7b6ae0d50
3 changed files with 7 additions and 5 deletions

View File

@ -28,7 +28,9 @@ module Compass
end end
def add_project_configuration def add_project_configuration
Compass.add_project_configuration(options[:configuration_file]) Compass.add_project_configuration(options[:configuration_file]) do
options[:project_type]
end
end end
def projectize(path) def projectize(path)

View File

@ -78,7 +78,7 @@ module Compass
options = args.last.is_a?(Hash) ? args.pop : {} options = args.last.is_a?(Hash) ? args.pop : {}
configuration_file_path = args.shift || detect_configuration_file configuration_file_path = args.shift || detect_configuration_file
raise ArgumentError, "Too many arguments" if args.any? raise ArgumentError, "Too many arguments" if args.any?
if configuration_file_path if configuration_file_path && File.exists?(configuration_file_path)
data = configuration_for(configuration_file_path) data = configuration_for(configuration_file_path)
@ -92,7 +92,7 @@ module Compass
add_configuration(data) add_configuration(data)
else else
add_configuration(options[:project_type] || configuration.project_type || :stand_alone) add_configuration(options[:project_type] || configuration.project_type_without_default || (yield if block_given?) || :stand_alone)
end end
end end

View File

@ -15,7 +15,7 @@ class RailsIntegrationTest < Test::Unit::TestCase
end end
def test_rails_install def test_rails_install
# within_tmp_directory do within_tmp_directory do
begin begin
generate_rails_app_directories("compass_rails") generate_rails_app_directories("compass_rails")
Dir.chdir "compass_rails" do Dir.chdir "compass_rails" do
@ -30,7 +30,7 @@ class RailsIntegrationTest < Test::Unit::TestCase
ensure ensure
FileUtils.rm_rf "compass_rails" FileUtils.rm_rf "compass_rails"
end end
#end end
rescue LoadError rescue LoadError
puts "Skipping rails test. Couldn't Load rails" puts "Skipping rails test. Couldn't Load rails"
end end