Skip to content

Commit 6a220e1

Browse files
committed
Fixing CSS image display bug
1 parent a06d1f1 commit 6a220e1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.2
1+
0.1.3

lib/sprite/builder.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def output_image(image)
5757
return unless sources.length > 0
5858

5959
name = image['name']
60+
format = image['format'] || config["default_format"]
6061
spaced_by = image['spaced_by'] || 0
6162

6263
combiner = ImageCombiner.new
@@ -77,12 +78,12 @@ def output_image(image)
7778
end
7879

7980
# set up path
80-
path = image_output_path(name, image['format'] || config["default_format"])
81+
path = image_output_path(name, format)
8182
FileUtils.mkdir_p(File.dirname(path))
8283

8384
# write sprite image file to disk
8485
dest_image.write(path)
85-
@output[name] = results
86+
@output["#{name}.#{format}"] = results
8687
end
8788

8889
def output_file

sprite.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
Gem::Specification.new do |s|
77
s.name = %q{sprite}
8-
s.version = "0.1.1"
8+
s.version = "0.1.2"
99

1010
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
1111
s.authors = ["Jacques Crocker", "Richard Huang"]

0 commit comments

Comments
 (0)