Sha256: f0b52f2a4bf3eed7319ad85bdf764d7204bc40f8ffbfc183fe75736ac3c73822

Contents?: true

Size: 734 Bytes

Versions: 109

Compression:

Stored size: 734 Bytes

Contents

#!/usr/bin/env ruby
# -*- encoding: binary -*-

# Reads from stdin and outputs the SHA1 hex digest of the input this is
# ONLY used as a last resort, our test code will try to use sha1sum(1),
# openssl(1), or gsha1sum(1) before falling back to using this.  We try
# all options first because we have a strong and healthy distrust of our
# Ruby abilities in general, and *especially* when it comes to
# understanding (and trusting the implementation of) Ruby 1.9 encoding.

require 'digest/sha1'
$stdout.sync = $stderr.sync = true
$stdout.binmode
$stdin.binmode
bs = 16384
digest = Digest::SHA1.new
if buf = $stdin.read(bs)
  begin
    digest.update(buf)
  end while $stdin.read(bs, buf)
end

$stdout.syswrite("#{digest.hexdigest}\n")

Version data entries

109 entries across 109 versions & 4 rubygems

Version Path
rainbows-5.2.1 t/bin/sha1sum.rb
rainbows-5.2.0 t/bin/sha1sum.rb
rainbows-5.1.1 t/bin/sha1sum.rb
rainbows-5.1.0 t/bin/sha1sum.rb
rainbows-5.0.0.5.ge717 t/bin/sha1sum.rb
rainbows-5.0.0 t/bin/sha1sum.rb
rainbows-4.7.0 t/bin/sha1sum.rb
rainbows-4.6.2 t/bin/sha1sum.rb
rainbows-4.6.1 t/bin/sha1sum.rb
rainbows-4.6.0.4.g4108 t/bin/sha1sum.rb
rainbows-4.6.0 t/bin/sha1sum.rb
rainbows-4.5.0 t/bin/sha1sum.rb
rainbows-4.4.3 t/bin/sha1sum.rb
rainbows-4.4.2 t/bin/sha1sum.rb
rainbows-4.4.1.1.gd5c8c t/bin/sha1sum.rb
rainbows-4.4.1 t/bin/sha1sum.rb
rainbows-4.4.0 t/bin/sha1sum.rb
rainbows-4.3.1 t/bin/sha1sum.rb
unicorn-4.1.1 t/bin/sha1sum.rb
rainbows-4.3.0 t/bin/sha1sum.rb