auto_sprite 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- =AutoSprite
2
+ =AutoSprite 1.0.4
3
3
 
4
4
 
5
5
  An easy, automated CSS image sprite creator.
@@ -32,6 +32,11 @@ Suppose you have 10 images on your homepage. Rather than downloading 10 seperat
32
32
  <%= image_tag 'sprites/logo.png' %>
33
33
  <%= image_tag 'sprites/icon1.jpg' %>
34
34
 
35
+ As of Auto Sprite 1.0.4 image_tag can be passed a :title giving icons a hover text..
36
+
37
+ <%= image_tag "sprites/stuff.png", :title => "I like Ice Cream" %>
38
+
39
+
35
40
  5. Reload after adding any new images to sprites/ and enjoy your now faster rendering website.
36
41
 
37
42
 
@@ -43,6 +48,7 @@ You'll notice that should auto_sprite be removed, your application will still wo
43
48
  - Any image format supported by RMagick should work.
44
49
  - Images of mixed sizes are not a problem.
45
50
 
51
+
46
52
  =Details
47
53
 
48
54
  Whenever rails reloads, it will automatically generate two files:
@@ -51,12 +57,10 @@ Whenever rails reloads, it will automatically generate two files:
51
57
  RAILS_ROOT/public/images/auto_sprite.png
52
58
 
53
59
 
54
- The image tag will automatically generate a SPAN tag for any images located in the sprite directory.
60
+ The image tag will automatically generate a div tag for any images located in the sprite directory.
55
61
 
56
62
  <span class="_as_logo_png"></span> instead of <img src="/images/sprites/logo.png" />
57
63
 
58
- Note: before 1.0.3, div tags were generated but this sometimes generated invalid HTML.
59
-
60
64
 
61
65
  Here is an exmplmple of the stylehseet that would be generated if you had two files face3.png and face4.png
62
66
 
data/auto_sprite.gemspec CHANGED
@@ -2,10 +2,10 @@ spec = Gem::Specification.new do |s|
2
2
 
3
3
  require 'fileutils'
4
4
  s.name = "auto_sprite"
5
- s.version = "1.0.3"
5
+ s.version = "1.0.4"
6
6
  s.author = "Stephen Blackstone"
7
7
  s.email = "sblackstone@gmail.com"
8
- s.homepage = "http://github.com/sblackstone/auto_sprite"
8
+ s.homepage = "http://fargle.org/auto_sprite"
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.summary = "A fully-Automagic Sprite Builder"
11
11
  s.description = "CSS Sprites can get you down, don't let them. This gem automatically creates the CSS, Sprite and HTML tags so you don't have to"
data/lib/auto_sprite.rb CHANGED
@@ -57,8 +57,9 @@ module AutoSprite::Helpers
57
57
  base.class_eval do
58
58
  def image_tag(source, options = {})
59
59
  src = path_to_image(source)
60
+ title = (options[:title].nil? or options[:title].empty?) ? "" : "title='#{options[:title]}'"
60
61
  if src =~ /\/images\/sprites/
61
- "<span class='#{AutoSprite.generate_css_name(src)}'></span>"
62
+ "<span #{title} class='#{AutoSprite.generate_css_name(src)}'></span>"
62
63
  else
63
64
  super(source,options)
64
65
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_sprite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Blackstone
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-24 00:00:00 -05:00
12
+ date: 2010-01-26 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -28,7 +28,7 @@ files:
28
28
  - ./rails/init.rb
29
29
  - ./lib/auto_sprite.rb
30
30
  has_rdoc: true
31
- homepage: http://github.com/sblackstone/auto_sprite
31
+ homepage: http://fargle.org/auto_sprite
32
32
  licenses: []
33
33
 
34
34
  post_install_message: