Method: JRubyFX::Tasks.download_jruby
- Defined in:
- lib/jrubyfx_tasks.rb
.download_jruby(jruby_version, force = false) ⇒ Object
Downloads the jruby-complete jar file for jruby_version and save in ~/.jruby-jar/jruby-complete.jar unless it already exits. If the jar is corrupt or an older version, set force to true to delete and re-download
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/jrubyfx_tasks.rb', line 35 def download_jruby(jruby_version, force=false) dist = "#{Dir.home}/.jruby-jar" unless force || (File.exists?("#{dist}/jruby-complete-#{jruby_version}.jar") && File.size("#{dist}/jruby-complete-#{jruby_version}.jar") > 0) mkdir_p dist base_dir = Dir.pwd cd dist $stderr.puts "JRuby complete jar not found. Downloading... (May take awhile)" download(jruby_version) cd base_dir end end |