module Sinatra::Exstatic::Formats
Extends the Asset
class, for using types of format other than mtime_int Just require this file and then use the format of your choice. @example
require 'sinatra/exstatic_assets/formats' configure do # Set all timestamps to use SHA1 of the file. app.set :timestamp_format, :sha1 end # or just call it on an individual basis: stylesheet_tag "css/main.css", timestamp_format: :sha1
Public Instance Methods
sha1()
click to toggle source
# File lib/sinatra/exstatic_assets/formats.rb, line 21 def sha1 Digest::SHA1.file(fullpath).hexdigest end