Skip to content

Commit

Permalink
Don't need to override this anywhere anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Aug 20, 2011
1 parent 07ad499 commit be321b5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions lib/sprockets/digest.rb
Expand Up @@ -55,19 +55,13 @@ def version=(version)
# digests. Any change in the environment digest will affect all of
# its assets.
def digest
# Recompute digest for the first time or again after its been cleared
@digest ||= compute_digest
# Compute the initial digest using the implementation class. The
# Sprockets release version and custom environment version are
# mixed in. So any new releases will affect all your assets.
@digest ||= digest_class.new.update(VERSION).update(version.to_s)

# Returned a dupped copy so the caller can safely mutate it with `.update`
@digest.dup
end

protected
def compute_digest
# Compute the initial digest using the implementation
# class. The Sprockets release version and custom environment
# version are mixed in.
digest_class.new.update(VERSION).update(version.to_s)
end
end
end

0 comments on commit be321b5

Please sign in to comment.