Sha256: 2327b56ef6ef84ea3ff7141bc4d1075dda21e07fcb971ada9d3e5bf0523b17fb
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require 'rake/clean' JRUBY_VERSION = "1.7.12" CLOBBER.include("jruby-complete-#{JRUBY_VERSION}.jar") desc "download, and copy to ruby-processing" task :default => [:download, :copy_ruby] desc "download JRuby upstream sources" task :download => ["jruby-complete-#{JRUBY_VERSION}.jar"] file "jruby-complete-#{JRUBY_VERSION}.jar" do sh "wget http://jruby.org.s3.amazonaws.com/downloads/#{JRUBY_VERSION}/jruby-complete-#{JRUBY_VERSION}.jar" check_sha1("jruby-complete-#{JRUBY_VERSION}.jar", "a63380de1a30534184ae52c419a67a7ea43f45d3") end directory "../lib/ruby" desc "copy jruby-complete" task :copy_ruby => ["../lib/ruby"] do sh "cp -v jruby-complete-#{JRUBY_VERSION}.jar ../lib/ruby/jruby-complete.jar" end def check_sha1(filename, expected_hash) require "digest/sha1" sha1 = Digest::SHA1.new File.open(filename, "r") do |f| while buf = f.read(4096) sha1.update(buf) end end if sha1.hexdigest != expected_hash raise "bad sha1 checksum for #{filename} (expected #{expected_hash} got #{sha1.hexdigest})" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-processing-2.4.4 | vendors/Rakefile |