def update_digest

    path = self.bundle_dir
    sha = Digest::SHA2.new
    bundle_sha = Digest::SHA2.new

    digests = []
    Dir.glob("#{path}/**/*").sort.each do |f|
      next if File.directory?(f) || File.basename(f) == "digest" || f =~ /^#{path}\/test/
      bundle_sha.file(f)
      sha.reset()
      digests << { :file => f.gsub(/#{path}\//, ''), :digest => sha.file(f).hexdigest() }
    end

    @digest = { :digest => bundle_sha.hexdigest(), :files => digests }
    File.open(path+"/digest", 'w'){ |f|
      f.write(MultiJson.dump(@digest, :pretty => true, :adapter => :json_gem) + "\n")
    }

  end
def update_digest

    path = self.bundle_dir
    sha = Digest::SHA2.new
    bundle_sha = Digest::SHA2.new

    digests = []
    Dir.glob("#{path}/**/*").sort.each do |f|
      next if File.directory?(f) || File.basename(f) == "digest" || f =~ /^#{path}\/test/
      bundle_sha.file(f)
      sha.reset()
      digests << { :file => f.gsub(/#{path}\//, ''), :digest => sha.file(f).hexdigest() }
    end

    @digest = { :digest => bundle_sha.hexdigest(), :files => digests }
    File.open(path+"/digest", 'w'){ |f|
      f.write(MultiJson.dump(@digest, :pretty => true, :adapter => :json_gem) + "\n")
    }

  end
Update the digest hashes for this bundle