forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
89 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require 'rake-tasks/crazy_fun/mappings/common' | ||
|
||
class JRubyMappings | ||
def add_all(fun) | ||
fun.add_mapping("jruby_package", Package.new) | ||
end | ||
|
||
class Package < Tasks | ||
def handle(_fun, dir, args) | ||
task_name = task_name(dir, "jruby_package") | ||
|
||
jar_name = "jruby-complete-#{args[:version]}.jar" | ||
url = "https://repo1.maven.org/maven2/org/jruby/jruby-complete/#{args[:version]}/#{jar_name}" | ||
|
||
desc "Package JRuby #{args[:version]}" | ||
task task_name do | ||
require 'open-uri' | ||
|
||
Dir.chdir(dir) do | ||
puts "Downloading #{jar_name} from #{url}..." | ||
File.open(jar_name, "wb") do |write_file| | ||
open(url, "rb") do |read_file| | ||
write_file.write(read_file.read) | ||
end | ||
end | ||
|
||
puts "Installing gems..." | ||
args[:gems].map(&:first).each do |gem_name, gem_version| | ||
sh "java", "-jar", jar_name, "-S", "gem", "install", "-i", "./#{gem_name}", gem_name, "-v", gem_version | ||
sh "jar", "uf", jar_name, "-C", gem_name, "." | ||
rm_rf gem_name | ||
end | ||
|
||
puts "Bumping VERSION..." | ||
jruby_version = `java -jar #{jar_name} -version`.split("\n").first | ||
File.write('VERSION', "#{jruby_version}\n") | ||
|
||
mv jar_name, "jruby-complete.jar" | ||
puts "Done!" | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
JRuby: JRuby: jruby 1.6.0.dev @ 2011-01-04 e1fe932 | ||
Bundled gems: childprocess, json_pure, albacore, rspec (2.4.0), rake, ci_reporter, rubyzip | ||
|
||
How to update the jar: https://gist.github.com/733501 | ||
jruby 9.1.14.0 (2.3.3) 2017-11-08 2176f24 Java HotSpot(TM) 64-Bit Server VM 25.152-b16 on 1.8.0_152-b16 +jit [darwin-x86_64] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
jruby_package( | ||
version = "9.1.14.0", | ||
gems = [ | ||
{"albacore": "1.0.0"} | ||
] | ||
) |
Binary file not shown.