Skip to content
Browse files

Change default digest to SHA1

  • Loading branch information...
1 parent 3a42e11 commit ae92dd8120d28cf86a4256b5f61c3b3fe34cf074 @josh josh committed Feb 9, 2014
Showing with 6 additions and 6 deletions.
  1. +4 −4 lib/sprockets/base.rb
  2. +2 −2 lib/sprockets/environment.rb
View
8 lib/sprockets/base.rb
@@ -15,14 +15,14 @@ class Base
# Returns a `Digest` implementation class.
#
- # Defaults to `Digest::MD5`.
+ # Defaults to `Digest::SHA1`.
attr_reader :digest_class
# Assign a `Digest` implementation class. This maybe any Ruby
- # `Digest::` implementation such as `Digest::MD5` or
- # `Digest::SHA1`.
+ # `Digest::` implementation such as `Digest::SHA1` or
+ # `Digest::MD5`.
#
- # environment.digest_class = Digest::SHA1
+ # environment.digest_class = Digest::MD5
#
def digest_class=(klass)
expire_index!
View
4 lib/sprockets/environment.rb
@@ -2,6 +2,7 @@
require 'sprockets/context'
require 'sprockets/index'
+require 'digest/sha1'
require 'hike'
require 'logger'
require 'pathname'
@@ -27,8 +28,7 @@ def initialize(root = ".")
@context_class = Class.new(Context)
# Set MD5 as the default digest
- require 'digest/md5'
- @digest_class = ::Digest::MD5
+ @digest_class = Digest::SHA1
@version = ''
@mime_types = Sprockets.registered_mime_types

0 comments on commit ae92dd8

Please sign in to comment.
Something went wrong with that request. Please try again.