Skip to content

Commit 81d9c69

Browse files
committed
Supported individual dest image path.
1 parent 056d3f9 commit 81d9c69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/css_sprite/sprite.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def initialize(options={})
1313
end
1414

1515
@image_path = File.expand_path(File.join(Rails.root, @config['image_path'] || 'public/images'))
16+
@dest_image_path=File.expand_path(File.join(Rails.root, @config['dest_image_path'] || 'public/images'))
1617
@stylesheet_path = File.expand_path(File.join(Rails.root, @config['stylesheet_path'] || 'public/stylesheets'))
1718

1819
@css_images_path = @config['css_images_path'] ||= "images"
@@ -304,7 +305,7 @@ def all_images(directory)
304305

305306
# destination css sprite image path
306307
def dest_image_path(directory)
307-
directory + "." + @format
308+
File.join(@dest_image_path,File.basename(directory))+"."+@format
308309
end
309310

310311
# destination css sprite image name

0 commit comments

Comments
 (0)