This commit is contained in:
Scott Davis 2011-03-25 01:05:13 -04:00
commit fccd5d91e9
3 changed files with 10 additions and 7 deletions

View File

@ -7,7 +7,7 @@ GIT
PATH PATH
remote: . remote: .
specs: specs:
compass (0.11.beta.3.de86610) compass (0.11.beta.3.2041ed0)
chunky_png (~> 1.1.0) chunky_png (~> 1.1.0)
sass (>= 3.1.0.alpha.249) sass (>= 3.1.0.alpha.249)

View File

@ -65,11 +65,14 @@ module Compass
Sass::Plugin.add_template_location sass_dir, css_dir Sass::Plugin.add_template_location sass_dir, css_dir
end end
end end
Sass::Plugin.on_updating_stylesheet do |sass_file, css_file| unless defined?(CallbacksSetup)
Compass.configuration.run_callback(:stylesheet_saved, css_file) Sass::Plugin.on_updating_stylesheet do |sass_file, css_file|
end Compass.configuration.run_callback(:stylesheet_saved, css_file)
Sass::Plugin.on_compilation_error do |e, filename, css| end
Compass.configuration.run_callback(:stylesheet_error, filename, e.message) 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
end end

View File

@ -6,7 +6,7 @@ describe Compass::Sprites do
before :each do before :each do
@images_src_path = File.join(File.dirname(__FILE__), 'test_project', 'public', 'images') @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') @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") file = StringIO.new("images_path = #{@images_tmp_path.inspect}\n")
Compass.add_configuration(file, "sprite_config") Compass.add_configuration(file, "sprite_config")
Compass.configure_sass_plugin! Compass.configure_sass_plugin!