vendors/Rakefile in jruby_art-1.0.1 vs vendors/Rakefile in jruby_art-1.0.2
- old
+ new
@@ -7,11 +7,11 @@
may also require 'sudo' access to install, NB: this is untested....
EOS
JRUBYC_VERSION = '9.0.4.0'
-EXAMPLES = '1.1'
+EXAMPLES = '1.2'
HOME_DIR = ENV['HOME']
MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
CLOBBER.include("jruby-complete-#{JRUBYC_VERSION}.jar")
@@ -25,29 +25,29 @@
begin
sh "wget https://s3.amazonaws.com/jruby.org/downloads/#{JRUBYC_VERSION}/jruby-complete-#{JRUBYC_VERSION}.jar"
rescue
warn(WARNING)
end
- check_sha1("jruby-complete-#{JRUBYC_VERSION}.jar", "4f094b4b7915def9d1cd35ce69ee12c1f102c8b2")
+ check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", "3b87fc20a8e51e56632d6b0f7a00b5906f5ecd6c6642f9c189105307103220e8")
end
directory "../lib/ruby"
desc "copy jruby-complete"
task :copy_ruby => ["../lib/ruby"] do
sh "cp -v jruby-complete-#{JRUBYC_VERSION}.jar ../lib/ruby/jruby-complete.jar"
end
-def check_sha1(filename, expected_hash)
- require "digest/sha1"
- sha1 = Digest::SHA1.new
+def check_sha256(filename, expected_hash)
+ require "digest/sha256"
+ sha256 = Digest::SHA256.new
File.open(filename, "r") do |f|
while buf = f.read(4096)
- sha1.update(buf)
+ sha256.update(buf)
end
end
- if sha1.hexdigest != expected_hash
- raise "bad sha1 checksum for #{filename} (expected #{expected_hash} got #{sha1.hexdigest})"
+ if sha256.hexdigest != expected_hash
+ raise "bad sha256 checksum for #{filename} (expected #{expected_hash} got #{sha256.hexdigest})"
end
end
desc "download, and copy to jruby_art"
task :unpack_samples => [:download_examples, :copy_examples]