css_sprite 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.textile CHANGED
@@ -42,6 +42,8 @@ If you install it as a plugin, you can skip this step
42
42
 
43
43
  You can stop the css_sprite server by <code>rake css_sprite:stop</code>
44
44
 
45
+ You can restart the css_sprite server by <code>rake css_sprite:start</code>
46
+
45
47
  Or you can just do the css sprite manually by <code>rake css_sprite:build</code>
46
48
 
47
49
  **************************************************************************
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.3
1
+ 1.3.4
data/css_sprite.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{css_sprite}
8
- s.version = "1.3.3"
8
+ s.version = "1.3.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Richard Huang"]
@@ -87,6 +87,7 @@ class Sprite
87
87
  unless results.empty?
88
88
  dest_image_name = dest_image_name(directory)
89
89
  dest_css_path = dest_css_path(directory)
90
+ dest_image_time = File.new(dest_image_path(directory)).mtime
90
91
  File.open(dest_css_path, 'w') do |f|
91
92
  if @config['suffix']
92
93
  @config['suffix'].each do |key, value|
@@ -101,7 +102,7 @@ class Sprite
101
102
  end
102
103
 
103
104
  f.print class_names(results).join(",\n")
104
- f.print " \{\n background: url('/images/#{dest_image_name}?#{Time.now.to_i}') no-repeat;\n\}\n"
105
+ f.print " \{\n background: url('/images/#{dest_image_name}?#{dest_image_time.to_i}') no-repeat;\n\}\n"
105
106
 
106
107
  results.each do |result|
107
108
  f.print "#{class_name(result[:name])} \{"
@@ -120,6 +121,7 @@ class Sprite
120
121
  unless results.empty?
121
122
  dest_image_name = dest_image_name(directory)
122
123
  dest_sass_path = dest_sass_path(directory)
124
+ dest_image_time = File.new(dest_image_path(directory)).mtime
123
125
  File.open(dest_sass_path, 'w') do |f|
124
126
  if @config['suffix']
125
127
  @config['suffix'].each do |key, value|
@@ -134,7 +136,7 @@ class Sprite
134
136
  end
135
137
 
136
138
  f.print class_names(results).join(",\n")
137
- f.print " \n background: url('/images/#{dest_image_name}?#{Time.now.to_i}') no-repeat\n"
139
+ f.print " \n background: url('/images/#{dest_image_name}?#{dest_image_time.to_i}') no-repeat\n"
138
140
 
139
141
  results.each do |result|
140
142
  f.print "#{class_name(result[:name])}\n"
@@ -6,6 +6,9 @@ namespace :css_sprite do
6
6
  require File.join(File.dirname(__FILE__), '../lib/css_sprite/sprite.rb')
7
7
  Sprite.new.build
8
8
  end
9
+
10
+ desc "restart css sprite server"
11
+ task :restart => [:stop, :start]
9
12
 
10
13
  desc "start css sprite server"
11
14
  task :start do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 3
8
- - 3
9
- version: 1.3.3
8
+ - 4
9
+ version: 1.3.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Richard Huang