Sha256: 0f52950651b7353ed2cd6c192b4872798aca1d4f2912630485e059d782de412f

Contents?: true

Size: 501 Bytes

Versions: 5

Compression:

Stored size: 501 Bytes

Contents

require 'digest/sha2'

desc 'Creates a SHA512 checksum of the current version'
task :checksum do
  checksums = File.expand_path('../../checksum', __FILE__)
  name      = "#{GEMSPEC.name}-#{GEMSPEC.version}.gem"
  path      = File.join(File.expand_path('../../pkg', __FILE__), name)

  checksum_name = File.basename(path) + '.sha512'
  checksum      = Digest::SHA512.new.hexdigest(File.read(path))

  File.open(File.join(checksums, checksum_name), 'w') do |handle|
    handle.write(checksum)
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rack-simple_auth-1.0.0rc task/checksum.rake
rack-simple_auth-0.1.4 task/checksum.rake
rack-simple_auth-0.1.3 task/checksum.rake
rack-simple_auth-0.1.2 task/checksum.rake
rack-blogengine-1.0.7 task/checksum.rake