From a9b6d8cfde6f4450be7c0896381a846b8ebdda3d Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Mon, 21 Mar 2011 18:37:24 -0400 Subject: [PATCH] file cleanup --- Gemfile.lock | 4 +++- lib/compass/sass_extensions.rb | 1 + lib/compass/sass_extensions/functions/sprites.rb | 3 --- lib/compass/sass_extensions/sprites.rb | 12 ++++++++++++ lib/compass/sprites.rb | 1 + spec/spec_helper.rb | 1 - spec/sprites_spec.rb | 8 ++++---- 7 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 lib/compass/sass_extensions/sprites.rb diff --git a/Gemfile.lock b/Gemfile.lock index a86923d6..f385792e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - compass (0.11.beta.3.691c671) + compass (0.11.beta.3.01b9cd3) chunky_png (~> 1.1.0) sass (>= 3.1.0.alpha.249) @@ -109,6 +109,7 @@ GEM rspec-core (~> 2.0.1) rspec-expectations (~> 2.0.1) ruby-json (1.1.2) + ruby-prof (0.9.2) rubyzip (0.9.4) sass (3.1.0.alpha.249) term-ansicolor (1.0.5) @@ -131,5 +132,6 @@ DEPENDENCIES rails (~> 3.0.0.rc) rcov rspec (~> 2.0.0) + ruby-prof rubyzip sass (= 3.1.0.alpha.249) diff --git a/lib/compass/sass_extensions.rb b/lib/compass/sass_extensions.rb index 182717b1..0b89610d 100644 --- a/lib/compass/sass_extensions.rb +++ b/lib/compass/sass_extensions.rb @@ -3,3 +3,4 @@ end require 'compass/sass_extensions/functions' require 'compass/sass_extensions/monkey_patches' +require 'compass/sass_extensions/sprites' diff --git a/lib/compass/sass_extensions/functions/sprites.rb b/lib/compass/sass_extensions/functions/sprites.rb index d51c3395..ba40afd0 100644 --- a/lib/compass/sass_extensions/functions/sprites.rb +++ b/lib/compass/sass_extensions/functions/sprites.rb @@ -1,6 +1,3 @@ -require 'digest/md5' -require 'compass/sass_extensions/sprites/base' - module Compass::SassExtensions::Functions::Sprites ZERO = Sass::Script::Number::new(0) diff --git a/lib/compass/sass_extensions/sprites.rb b/lib/compass/sass_extensions/sprites.rb new file mode 100644 index 00000000..0bf1f30d --- /dev/null +++ b/lib/compass/sass_extensions/sprites.rb @@ -0,0 +1,12 @@ +require 'digest/md5' +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 diff --git a/lib/compass/sprites.rb b/lib/compass/sprites.rb index c3ac2d55..26e48159 100644 --- a/lib/compass/sprites.rb +++ b/lib/compass/sprites.rb @@ -46,6 +46,7 @@ $#{name}-sprite-dimensions: false !default; $#{name}-position: 0% !default; $#{name}-spacing: 0 !default; $#{name}-repeat: no-repeat !default; +$#{name}-prefix: '' !default; #{skip_overrides ? "$#{name}-sprites: sprite-map(\"#{uri}\");" : generate_overrides(uri, name, images) } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4877c67b..ccc17e29 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,5 @@ $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) - require 'rubygems' require 'compass' require 'rspec' diff --git a/spec/sprites_spec.rb b/spec/sprites_spec.rb index 700610eb..94349518 100644 --- a/spec/sprites_spec.rb +++ b/spec/sprites_spec.rb @@ -88,7 +88,7 @@ describe Compass::Sprites do } CSS image_size('squares-*.png').should == [20, 30] - image_md5('squares-*.png').should == 'd1aff60ac2f10dcc9859309d36f7e9a0' + image_md5('squares-*.png').should == 'fcc93d7b279c2ad6898fbca49cbd01e1' end it "should generate sprite classes with dimensions" do @@ -311,7 +311,7 @@ describe Compass::Sprites do } CSS image_size('squares-*.png').should == [20, 30] - image_md5('squares-*.png').should == 'd1aff60ac2f10dcc9859309d36f7e9a0' + image_md5('squares-*.png').should == '652b67f5e9092520d6f26caae7e18012' end it "should use position adjustments in mixins" do @@ -349,7 +349,7 @@ describe Compass::Sprites do } CSS image_size('squares-*.png').should == [20, 30] - image_md5('squares-*.png').should == 'd1aff60ac2f10dcc9859309d36f7e9a0' + image_md5('squares-*.png').should == '652b67f5e9092520d6f26caae7e18012' end it "should repeat the image" do @@ -396,7 +396,7 @@ describe Compass::Sprites do } CSS image_size('squares-*.png').should == [30, 30] - image_md5('squares-*.png').should == '33b385d541ce887441606e75467fd7ef' + image_md5('squares-*.png').should == '2fb19ef9c83018c93c6f147af3a56cb2' end it "should provide a nice errors for lemonade's old users" do