lib/sprite/image_writer.rb in amikula-sprite-0.1.8.1 vs lib/sprite/image_writer.rb in amikula-sprite-0.1.9
- old
+ new
@@ -18,10 +18,12 @@
# get the disk path for a location within the image output folder
def image_output_path(name, format, relative = false)
path_parts = []
path_parts << Config.chop_trailing_slash(@config['image_output_path']) if Config.path_present?(@config['image_output_path'])
- path_parts << "#{name}.#{format}"
+
+ cache_buster = "-#{@config['cache_buster']}" if @config['cache_buster']
+ path_parts << "#{name}#{cache_buster}.#{format}"
Config.new(@config).public_path(File.join(*path_parts), relative)
end
end
end