From 0933a1665ecd83f37719f70305a0d896d33d89f7 Mon Sep 17 00:00:00 2001 From: jsilver Date: Thu, 17 Dec 2009 19:03:02 -0700 Subject: [PATCH] fixed win32 sudo incompatibility issue in the rails template --- .../rails/templates/compass-install-rails.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/compass/app_integration/rails/templates/compass-install-rails.rb b/lib/compass/app_integration/rails/templates/compass-install-rails.rb index ca9a0b49..f7e32485 100644 --- a/lib/compass/app_integration/rails/templates/compass-install-rails.rb +++ b/lib/compass/app_integration/rails/templates/compass-install-rails.rb @@ -50,14 +50,23 @@ gem "haml", :lib => "haml", :version => ">=2.2.0" gem "chriseppstein-compass", :source => "http://gems.github.com/", :lib => "compass" # install and unpack -rake "gems:install GEM=haml", :sudo => true -rake "gems:install GEM=chriseppstein-compass", :sudo => true +unless RUBY_PLATFORM =~ /(win|w)32$/ # true if win32, cygwin or mingw32 + rake "gems:install GEM=haml", :sudo => true + rake "gems:install GEM=chriseppstein-compass", :sudo => true +else + rake "gems:install GEM=haml" + rake "gems:install GEM=chriseppstein-compass" +end rake "gems:unpack GEM=chriseppstein-compass" # load any compass framework plugins if css_framework =~ /960/ gem "chriseppstein-compass-960-plugin", :source => "http://gems.github.com", :lib => "ninesixty" - rake "gems:install GEM=chriseppstein-compass-960-plugin", :sudo => true + unless RUBY_PLATFORM =~ /(win|w)32$/ + rake "gems:install GEM=chriseppstein-compass-960-plugin", :sudo => true + else + rake "gems:install GEM=chriseppstein-compass-960-plugin" + end rake "gems:unpack GEM=chriseppstein-compass-960-plugin" css_framework = "960" # rename for command plugin_require = "-r ninesixty"