diff --git a/Gemfile.lock b/Gemfile.lock index cf128fe3..b373ae96 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GIT PATH remote: . specs: - compass (0.11.beta.3.de86610) + compass (0.11.beta.3.2041ed0) chunky_png (~> 1.1.0) sass (>= 3.1.0.alpha.249) diff --git a/lib/compass/configuration/helpers.rb b/lib/compass/configuration/helpers.rb index 37fc478a..c10bfffa 100644 --- a/lib/compass/configuration/helpers.rb +++ b/lib/compass/configuration/helpers.rb @@ -65,11 +65,14 @@ module Compass Sass::Plugin.add_template_location sass_dir, css_dir end end - Sass::Plugin.on_updating_stylesheet do |sass_file, css_file| - Compass.configuration.run_callback(:stylesheet_saved, css_file) - end - Sass::Plugin.on_compilation_error do |e, filename, css| - Compass.configuration.run_callback(:stylesheet_error, filename, e.message) + unless defined?(CallbacksSetup) + Sass::Plugin.on_updating_stylesheet do |sass_file, css_file| + Compass.configuration.run_callback(:stylesheet_saved, css_file) + end + Sass::Plugin.on_compilation_error do |e, filename, css| + Compass.configuration.run_callback(:stylesheet_error, filename, e.message) + end + const_set('CallbacksSetup', true) end end diff --git a/spec/sprites_spec.rb b/spec/sprites_spec.rb index ec6555ea..d8944c03 100644 --- a/spec/sprites_spec.rb +++ b/spec/sprites_spec.rb @@ -6,7 +6,7 @@ describe Compass::Sprites do before :each do @images_src_path = File.join(File.dirname(__FILE__), 'test_project', 'public', 'images') @images_tmp_path = File.join(File.dirname(__FILE__), 'test_project', 'public', 'images-tmp') - FileUtils.cp_r @images_src_path, @images_tmp_path + ::FileUtils.cp_r @images_src_path, @images_tmp_path file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n") Compass.add_configuration(file, "sprite_config") Compass.configure_sass_plugin!