diff --git a/lib/compass/sass_extensions/functions/sprites.rb b/lib/compass/sass_extensions/functions/sprites.rb index 69b7599e..0bd54ff5 100644 --- a/lib/compass/sass_extensions/functions/sprites.rb +++ b/lib/compass/sass_extensions/functions/sprites.rb @@ -10,7 +10,7 @@ module Compass::SassExtensions::Functions::Sprites end end - # Creates a Compass::SassExtensions::Sprites::Base object. A sprite map, when used in a property is the same + # Creates a Compass::SassExtensions::Sprites::SpriteMap object. A sprite map, when used in a property is the same # as calling sprite-url. So the following background properties are equivalent: # # $icons: sprite-map("icons/*.png"); @@ -21,7 +21,7 @@ module Compass::SassExtensions::Functions::Sprites # the first time it is converted to a url. Simply constructing it has no side-effects. def sprite_map(glob, kwargs = {}) kwargs.extend VariableReader - Compass::SassExtensions::Sprites::Base.from_uri(glob, self, kwargs) + Compass::SassExtensions::Sprites::SpriteMap.from_uri(glob, self, kwargs) end Sass::Script::Functions.declare :sprite_map, [:glob], :var_kwargs => true @@ -160,7 +160,7 @@ protected end def verify_map(map, error = "sprite") - unless map.is_a?(Compass::SassExtensions::Sprites::Base) + unless map.is_a?(Compass::SassExtensions::Sprites::SpriteMap) missing_sprite!(error) end end diff --git a/lib/compass/sass_extensions/sprites.rb b/lib/compass/sass_extensions/sprites.rb index 72a00efa..d22ab96b 100644 --- a/lib/compass/sass_extensions/sprites.rb +++ b/lib/compass/sass_extensions/sprites.rb @@ -1,13 +1,14 @@ require 'digest/md5' require 'compass/sprite_importer' -require 'compass/sass_extensions/sprites/image' -require 'compass/sass_extensions/sprites/base' -require 'compass/sass_extensions/sprites/engines' module Compass module SassExtensions module Sprites - end end -end \ No newline at end of file +end + +require 'compass/sass_extensions/sprites/image' +require 'compass/sass_extensions/sprites/sprite_map' +require 'compass/sass_extensions/sprites/engines' + diff --git a/lib/compass/sass_extensions/sprites/base.rb b/lib/compass/sass_extensions/sprites/sprite_map.rb similarity index 99% rename from lib/compass/sass_extensions/sprites/base.rb rename to lib/compass/sass_extensions/sprites/sprite_map.rb index bac3d821..2bdf905c 100644 --- a/lib/compass/sass_extensions/sprites/base.rb +++ b/lib/compass/sass_extensions/sprites/sprite_map.rb @@ -1,7 +1,7 @@ module Compass module SassExtensions module Sprites - class Base < Sass::Script::Literal + class SpriteMap < Sass::Script::Literal # Initialize a new sprite object from a relative file path diff --git a/test/units/sprites/image_test.rb b/test/units/sprites/image_test.rb index ae060c35..aa8dff32 100644 --- a/test/units/sprites/image_test.rb +++ b/test/units/sprites/image_test.rb @@ -20,7 +20,7 @@ class SpritesImageTest < Test::Unit::TestCase def parent importer = Compass::SpriteImporter.new(:uri => "selectors/*.png", :options => options) - @parent ||= Compass::SassExtensions::Sprites::Base.new(importer.sprite_names.map{|n| "selectors/#{n}.png"}, importer.path, importer.name, importer.sass_engine, importer.options) + @parent ||= Compass::SassExtensions::Sprites::SpriteMap.new(importer.sprite_names.map{|n| "selectors/#{n}.png"}, importer.path, importer.name, importer.sass_engine, importer.options) end let(:options) do diff --git a/test/units/sprites/base_test.rb b/test/units/sprites/sprite_map_test.rb similarity index 92% rename from test/units/sprites/base_test.rb rename to test/units/sprites/sprite_map_test.rb index f62ed0cf..0587657f 100644 --- a/test/units/sprites/base_test.rb +++ b/test/units/sprites/sprite_map_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class SpritesBaseTest < Test::Unit::TestCase +class SpriteMapTest < Test::Unit::TestCase def setup Hash.send(:include, Compass::SassExtensions::Functions::Sprites::VariableReader) @@ -17,7 +17,7 @@ class SpritesBaseTest < Test::Unit::TestCase def setup_map @importer = Compass::SpriteImporter.new(:uri => "selectors/*.png", :options => @options) - @base = Compass::SassExtensions::Sprites::Base.new(@importer.sprite_names.map{|n| "selectors/#{n}.png"}, @importer.path, @importer.name, @importer.sass_engine, @importer.options) + @base = Compass::SassExtensions::Sprites::SpriteMap.new(@importer.sprite_names.map{|n| "selectors/#{n}.png"}, @importer.path, @importer.name, @importer.sass_engine, @importer.options) end def teardown