diff --git a/Gemfile.lock b/Gemfile.lock index f5ce76db..6afb9c26 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - compass (0.12.0.alpha.0.3f72a54) + compass (0.12.0.alpha.0.5e89865) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) diff --git a/lib/compass/configuration.rb b/lib/compass/configuration.rb index 58ad570d..91793a5c 100644 --- a/lib/compass/configuration.rb +++ b/lib/compass/configuration.rb @@ -24,7 +24,7 @@ module Compass attributes_for_directory(:fonts), attributes_for_directory(:extensions, nil), # Compilation options - :sprite_search_path, + :sprite_load_path, :output_style, :environment, :relative_assets, diff --git a/lib/compass/configuration/defaults.rb b/lib/compass/configuration/defaults.rb index abdd3efd..99a68c61 100644 --- a/lib/compass/configuration/defaults.rb +++ b/lib/compass/configuration/defaults.rb @@ -89,7 +89,7 @@ module Compass top_level.images_dir end - def default_sprite_search_path + def default_sprite_load_path [top_level.images_path] end diff --git a/lib/compass/sprite_importer.rb b/lib/compass/sprite_importer.rb index 5307b2cd..6b8f2d94 100644 --- a/lib/compass/sprite_importer.rb +++ b/lib/compass/sprite_importer.rb @@ -66,7 +66,7 @@ module Compass # Returns the Glob of image files for the uri def self.files(uri) - Compass.configuration.sprite_search_path.each do |folder| + Compass.configuration.sprite_load_path.each do |folder| files = Dir[File.join(folder, uri)].sort next if files.empty? return files diff --git a/test/units/sprites/importer_test.rb b/test/units/sprites/importer_test.rb index 9d058704..a726a413 100644 --- a/test/units/sprites/importer_test.rb +++ b/test/units/sprites/importer_test.rb @@ -29,11 +29,11 @@ class ImporterTest < Test::Unit::TestCase end config = Compass::Configuration::Data.new('config') config.images_path = @images_tmp_path - config.sprite_search_path = [@images_tmp_path, other_folder] + config.sprite_load_path = [@images_tmp_path, other_folder] Compass.add_configuration(config, "sprite_config") importer = Compass::SpriteImporter.new - assert_equal 2, Compass.configuration.sprite_search_path.compact.size - assert Compass.configuration.sprite_search_path.include?(other_folder) + assert_equal 2, Compass.configuration.sprite_load_path.compact.size + assert Compass.configuration.sprite_load_path.include?(other_folder) assert_equal ["bar", "my"], Compass::SpriteImporter.sprite_names(uri) FileUtils.rm_rf other_folder diff --git a/test/units/sprites/sprite_map_test.rb b/test/units/sprites/sprite_map_test.rb index 25d5a98e..abb64542 100644 --- a/test/units/sprites/sprite_map_test.rb +++ b/test/units/sprites/sprite_map_test.rb @@ -10,7 +10,6 @@ class SpriteMapTest < Test::Unit::TestCase FileUtils.cp_r @images_src_path, @images_tmp_path config = Compass::Configuration::Data.new('config') config.images_path = @images_tmp_path - config.sprite_search_path = [@images_tmp_path] Compass.add_configuration(config) Compass.configure_sass_plugin! @options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')}