From 3110fc5d9e0055c2b6da3c300133349937719a64 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Fri, 23 Dec 2011 16:23:05 -0800 Subject: [PATCH] Support for new versions of sass where the callback name changed. --- lib/compass/configuration/helpers.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index b6396bc1..12a49030 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -67,9 +67,13 @@ module Compass end end unless @callbacks_loaded - - Sass::Plugin.on_updated_stylesheet do |sass_file, css_file| - Compass.configuration.run_stylesheet_saved(css_file) + on_saved = Proc.new do |sass_file, css_file| + Compass.configuration.run_stylesheet_saved(css_file) + end + if Sass::Plugin.respond_to?(:on_updated_stylesheet) + Sass::Plugin.on_updated_stylesheet(&on_saved) + else + Sass::Plugin.on_updating_stylesheet(&on_saved) end Sass::Plugin.on_compilation_error do |e, filename, css|