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 PATH
remote: . remote: .
specs: specs:
compass (0.12.0.alpha.0.3f72a54) compass (0.12.0.alpha.0.5e89865)
chunky_png (~> 1.2) chunky_png (~> 1.2)
fssm (>= 0.2.7) fssm (>= 0.2.7)
sass (~> 3.1) sass (~> 3.1)

View File

@ -24,7 +24,7 @@ module Compass
attributes_for_directory(:fonts), attributes_for_directory(:fonts),
attributes_for_directory(:extensions, nil), attributes_for_directory(:extensions, nil),
# Compilation options # Compilation options
:sprite_search_path, :sprite_load_path,
:output_style, :output_style,
:environment, :environment,
:relative_assets, :relative_assets,

View File

@ -89,7 +89,7 @@ module Compass
top_level.images_dir top_level.images_dir
end end
def default_sprite_search_path def default_sprite_load_path
[top_level.images_path] [top_level.images_path]
end end

View File

@ -66,7 +66,7 @@ module Compass
# Returns the Glob of image files for the uri # Returns the Glob of image files for the uri
def self.files(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 files = Dir[File.join(folder, uri)].sort
next if files.empty? next if files.empty?
return files return files

View File

@ -29,11 +29,11 @@ class ImporterTest < Test::Unit::TestCase
end end
config = Compass::Configuration::Data.new('config') config = Compass::Configuration::Data.new('config')
config.images_path = @images_tmp_path 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") Compass.add_configuration(config, "sprite_config")
importer = Compass::SpriteImporter.new importer = Compass::SpriteImporter.new
assert_equal 2, Compass.configuration.sprite_search_path.compact.size assert_equal 2, Compass.configuration.sprite_load_path.compact.size
assert Compass.configuration.sprite_search_path.include?(other_folder) assert Compass.configuration.sprite_load_path.include?(other_folder)
assert_equal ["bar", "my"], Compass::SpriteImporter.sprite_names(uri) assert_equal ["bar", "my"], Compass::SpriteImporter.sprite_names(uri)
FileUtils.rm_rf other_folder 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 FileUtils.cp_r @images_src_path, @images_tmp_path
config = Compass::Configuration::Data.new('config') config = Compass::Configuration::Data.new('config')
config.images_path = @images_tmp_path config.images_path = @images_tmp_path
config.sprite_search_path = [@images_tmp_path]
Compass.add_configuration(config) Compass.add_configuration(config)
Compass.configure_sass_plugin! Compass.configure_sass_plugin!
@options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')} @options = {'cleanup' => Sass::Script::Bool.new(true), 'layout' => Sass::Script::String.new('vertical')}