lib/sproutcore/library.rb
# Computes a build number for the bundle by generating a SHA1 hash.  The
# return value is cached to speed up future requests.
Computes a build number for the bundle by generating a SHA1 hash.  The
return value is cached to speed up future requests.
Computes a build number for the bundle by generating a SHA1 hash . The return value is cached to speed up future requests .
def compute_build_number(bundle)
      @cached_build_numbers ||= {}
      src = bundle.source_root
      ret = @cached_build_numbers[src]
      return ret unless ret.nil?
      digests = Dir.glob(File.join(src, '**', '*.*')).map do |path|
        (File.exists?(path) && !File.directory?(path)) ? Digest::SHA1.hexdigest(File.read(path)) : '0000'
      end
      ret = @cached_build_numbers[src] = Digest::SHA1.hexdigest(digests.join)
      return ret 
    end
def compute_build_number ( bundle ) @cached_build_numbers ||= { } src = bundle . source_root ret = @cached_build_numbers [ src ] return ret unless ret . nil? digests = Dir . glob ( File . join ( src , '**' , '*.*' ) ) . map do | path | ( File . exists? ( path ) && ! File . directory? ( path ) ) ? Digest :: SHA1 . hexdigest ( File . read ( path ) ) : '0000' end ret = @cached_build_numbers [ src ] = Digest :: SHA1 . hexdigest ( digests . join ) return ret end
Computes a build number for the bundle by generating a SHA1 hash.
Computes a build number for the bundle by generating a SHA1 hash .
bundle
<not_specific>