From d5f44081ef459f1fd5268af6f1bcd344d524dcbd Mon Sep 17 00:00:00 2001 From: Lee Nussbaum Date: Fri, 10 Apr 2009 02:20:57 +0800 Subject: [PATCH] Set compass environment in plugin based on RAILS_ENV (currently used to set line_comments option). Fix line_comments option for plugin. Signed-off-by: Chris Eppstein --- lib/compass/configuration.rb | 2 +- lib/compass/installers/rails.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compass/configuration.rb b/lib/compass/configuration.rb index db412ed4..12c7a306 100644 --- a/lib/compass/configuration.rb +++ b/lib/compass/configuration.rb @@ -143,7 +143,7 @@ module Compass end plugin_opts = {:template_location => locations} plugin_opts[:style] = output_style if output_style - engine_opts[:line_comments] = default_line_comments if environment + plugin_opts[:line_comments] = default_line_comments if environment plugin_opts end diff --git a/lib/compass/installers/rails.rb b/lib/compass/installers/rails.rb index 06b4190f..44dc9099 100644 --- a/lib/compass/installers/rails.rb +++ b/lib/compass/installers/rails.rb @@ -83,6 +83,7 @@ Emit compiled stylesheets to #{recommended_location}/? (Y/n) } %Q{require 'compass' # If you have any compass plugins, require them here. Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config")) +Compass.configuration.environment = RAILS_ENV.to_sym Compass.configure_sass_plugin! } end