Sha256: 6af70796b940173001a0138ed2a6c7b7f5f7e8017fea214631e9cb4b25396d26
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require 'rake/clean' JRUBY_VERSION = "1.7.9" 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", "93c1906ed4d212ec7fb2fc810da206f1f2a034b4") 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.1 | vendors/Rakefile |