Sha256: aec5b7ed73f712bfba46b62118a42a279d69291d753d84fef0aa808a66e2a36e
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
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 k9 setup install instead of installing wget. Some systems may also require 'sudo' access to install, NB: this is untested.... EOS JRUBY_VERSION = "1.7.14" 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 begin sh "wget http://jruby.org.s3.amazonaws.com/downloads/#{JRUBY_VERSION}/jruby-complete-#{JRUBY_VERSION}.jar" check_sha1("jruby-complete-#{JRUBY_VERSION}.jar", "ad70c18834a143afa6686ebcda27351ebfef7385") rescue warn(WARNING) end 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.6.1 | vendors/Rakefile |