auto_sprite 1.1.0 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
 
2
2
  =AutoSprite 1.1.0
3
3
 
4
- An easy, automated CSS image sprite creator.
4
+ An easy, automated CSS image sprite creator. Ruby 1.9 and Rails 3.0 Compatible!
5
5
 
6
6
  Suppose you have 10 images on your homepage. Rather than downloading 10 seperate images one at a time, 1 image is downloaded and we use CSS to show different parts of that image when we need to. This speeds up your page load time. It can be hard to manage this manually since you need to keep appending images to a sprite file and updating your css file with the correct offsets, etc. Auto Sprite lets you get back to more important things.
7
7
 
@@ -1,8 +1,7 @@
1
- spec = Gem::Specification.new do |s|
2
-
3
1
  require 'fileutils'
2
+ spec = Gem::Specification.new do |s|
4
3
  s.name = "auto_sprite"
5
- s.version = "1.1.0"
4
+ s.version = "1.1.3"
6
5
  s.author = "Stephen Blackstone"
7
6
  s.email = "sblackstone@gmail.com"
8
7
  s.homepage = "http://github.com/sblackstone/auto_sprite"
@@ -52,7 +52,7 @@ module AutoSprite
52
52
  pos = pos + img.rows;
53
53
  end
54
54
  f << all_class_names.join(",")
55
- f << "{display:inline-block;background-image:url('#{SPRITE_IMG_URL}');background-repeat:no-repeat;}"
55
+ f << "{display:inline-block;background-image:url('#{SPRITE_IMG_URL}?#{File.mtime(SPRITE_IMG_PATH).to_i}');background-repeat:no-repeat;}"
56
56
  end
57
57
  end
58
58
  end
@@ -65,9 +65,8 @@ module AutoSprite::Helpers
65
65
  base.class_eval do
66
66
  def image_tag(source, options = {})
67
67
  src = path_to_image(source)
68
- title = (options[:title].nil? or options[:title].empty?) ? "" : "title='#{options[:title]}'"
69
68
  if src =~ /\/images\/sprites/
70
- "<span #{title} class='#{AutoSprite.generate_css_name(src)}'></span>"
69
+ content_tag :span, '', options.merge(:class => AutoSprite.generate_css_name(src))
71
70
  else
72
71
  super(source,options)
73
72
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_sprite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ hash: 21
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 3
10
+ version: 1.1.3
5
11
  platform: ruby
6
12
  authors:
7
13
  - Stephen Blackstone
@@ -9,7 +15,7 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-02-19 00:00:00 -05:00
18
+ date: 2010-08-30 00:00:00 -04:00
13
19
  default_executable:
14
20
  dependencies: []
15
21
 
@@ -37,21 +43,27 @@ rdoc_options: []
37
43
  require_paths:
38
44
  - lib
39
45
  required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
40
47
  requirements:
41
48
  - - ">="
42
49
  - !ruby/object:Gem::Version
50
+ hash: 3
51
+ segments:
52
+ - 0
43
53
  version: "0"
44
- version:
45
54
  required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
46
56
  requirements:
47
57
  - - ">="
48
58
  - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
49
62
  version: "0"
50
- version:
51
63
  requirements: []
52
64
 
53
65
  rubyforge_project:
54
- rubygems_version: 1.3.5
66
+ rubygems_version: 1.3.7
55
67
  signing_key:
56
68
  specification_version: 3
57
69
  summary: A fully-Automagic Sprite Builder