From 379118cb1e54aa532dddd67acf217884a85c2820 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 29 Aug 2009 12:09:32 -0700 Subject: [PATCH] Don't set the project type explicitly, instead default it to :stand_alone via the configuration object. --- lib/compass/commands/installer_command.rb | 2 +- lib/compass/configuration/defaults.rb | 4 ++++ lib/compass/exec.rb | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/compass/commands/installer_command.rb b/lib/compass/commands/installer_command.rb index 8d3c2441..c76c7b88 100644 --- a/lib/compass/commands/installer_command.rb +++ b/lib/compass/commands/installer_command.rb @@ -13,7 +13,7 @@ module Compass end def installer - @installer ||= case options[:project_type] + @installer ||= case Compass.configuration.project_type when :stand_alone StandAloneInstaller.new *installer_args when :rails diff --git a/lib/compass/configuration/defaults.rb b/lib/compass/configuration/defaults.rb index b646a412..400cccde 100644 --- a/lib/compass/configuration/defaults.rb +++ b/lib/compass/configuration/defaults.rb @@ -2,6 +2,10 @@ module Compass module Configuration module Defaults + def default_project_type + :stand_alone + end + def http_path_without_default "/" end diff --git a/lib/compass/exec.rb b/lib/compass/exec.rb index 9877e629..6596d2cf 100644 --- a/lib/compass/exec.rb +++ b/lib/compass/exec.rb @@ -68,7 +68,6 @@ module Compass end self.options[:command] ||= self.options[:project_name] ? :create_project : :update_project self.options[:framework] ||= :compass - self.options[:project_type] ||= :stand_alone end def trim_trailing_separator(path)