rename sprite_search_path to sprite_load_path for consistancy

This commit is contained in:
Scott Davis 2011-07-26 17:53:56 -04:00
parent 5e89865192
commit 71494cecfe
6 changed files with 7 additions and 8 deletions

View File

@ -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)

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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')}