Skip to content
Browse files

updated docs, added test for new feature, merged retr0hs additions

  • Loading branch information...
1 parent a808ee1 commit 34bb19560357febcbb787c56e3875b66ec59a8af @grosser grosser committed Mar 25, 2009
Showing with 14 additions and 4 deletions.
  1. +7 −4 README.markdown
  2. +1 −0 lib/smusher.rb
  3. +6 −0 spec/smusher_spec.rb
View
11 README.markdown
@@ -62,8 +62,11 @@ ALTERNATIVES
============
If you want to lossless reduce images and minify css + js, try [reduce](http://github.com/grosser/reduce).
-Author
+Authors
======
-Michael Grosser
-grosser.michael@gmail.com
-Hereby placed under public domain, do what you want, just do not hold me accountable...
+###Contributors
+ - [retr0h](http://geminstallthat.wordpress.com/)
+
+[Michael Grosser](http://pragmatig.wordpress.com)
+grosser.michael@gmail.com
+Hereby placed under public domain, do what you want, just do not hold me accountable...
View
1 lib/smusher.rb
@@ -11,6 +11,7 @@ module Smusher
# optimize the given image
# converts gif to png, if size is lower
+ # can be called with a file-path or an array of files-paths
def optimize_image(files,options={})
files.each do |file|
check_options(options)
View
6 spec/smusher_spec.rb
@@ -28,6 +28,12 @@ def size
size.should < original_size
end
+ it "can be called with an array of files" do
+ original_size = size
+ Smusher.optimize_image([@file])
+ size.should < original_size
+ end
+
it "it does nothing if size stayed the same" do
original_size = size
Smusher.expects(:optimized_image_data_for).returns File.read(@file)

0 comments on commit 34bb195

Please sign in to comment.
Something went wrong with that request. Please try again.