Sha256: 44dfe645b5d6dfaa743df022b8fb4bc0f8d042793fbc956b5b5fa9e6bb0cfe11
Contents?: true
Size: 1.32 KB
Versions: 3
Compression:
Stored size: 1.32 KB
Contents
# encoding: utf-8 # frozen_string_literal: false require 'rake/clean' WARNING = <<-EOS WARNING: you may not have wget installed, you could just download the correct version of jruby-complete to the vendors folder, and re-run EOS JRUBYC_VERSION = '9.0.5.0'.freeze CLOBBER.include("jruby-complete-#{JRUBYC_VERSION}.jar") desc 'download, and copy to propane' task default: [:download, :copy_ruby] desc 'download JRuby upstream sources' task download: ["jruby-complete-#{JRUBYC_VERSION}.jar"] file "jruby-complete-#{JRUBYC_VERSION}.jar" do begin sh "wget https://s3.amazonaws.com/jruby.org/downloads/#{JRUBYC_VERSION}/jruby-complete-#{JRUBYC_VERSION}.jar" rescue warn(WARNING) end check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", '7fe1054bf6085f24b9e3069d3e93abf8f17d1448f503eaea2042f98bce2a1d43') 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_sha256(filename, expected_hash) require 'digest' sha256 = Digest::SHA256.new File.open(filename, 'r') do |f| while buf = f.read(4096) sha256.update(buf) end end if sha256.hexdigest != expected_hash raise "bad sha256 checksum for #{filename} (expected #{expected_hash} got #{sha256.hexdigest})" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
propane-0.5.0-java | vendors/Rakefile |
propane-0.4.0.pre-java | vendors/Rakefile |
propane-0.3.0.pre-java | vendors/Rakefile |