-
Notifications
You must be signed in to change notification settings - Fork 9
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
7 changed files
with
22 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# frozen_string_literal: false | ||
# class to parse java_args.txt or java_args in config.yml | ||
class JavaOpts | ||
attr_reader :jvm_opts | ||
attr_reader :opts | ||
|
||
def initialize(sketch_root) | ||
arg_file = File.join(sketch_root, 'data/java_args.txt') | ||
@jvm_opts = [] | ||
if FileTest.exist?(arg_file) | ||
@jvm_opts += File.read(arg_file).split(/\s+/) | ||
elsif Processing::RP_CONFIG['java_args'] | ||
@jvm_opts += Processing::RP_CONFIG['java_args'].split(/\s+/) | ||
@opts = [] | ||
@opts += File.read(arg_file).split(/\s+/) if FileTest.exist?(arg_file) | ||
if opts.empty? && Processing::RP_CONFIG.fetch('java_args', false) | ||
@opts += Processing::RP_CONFIG['java_args'].split(/\s+/) | ||
end | ||
end | ||
end | ||
|
||
# wrap java args for jruby | ||
def jruby | ||
return [] if jvm_opts.length == 0 | ||
jvm_opts.map { |arg| "-J#{arg}" } | ||
# wrap args to pass through to jvm from jruby | ||
class JRubyOpts < JavaOpts | ||
def opts | ||
super.map { |arg| "-J#{arg}" } | ||
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 |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
# frozen_string_literal: true | ||
# A wrapper for version | ||
module JRubyArt | ||
VERSION = '1.1.2' | ||
VERSION = '1.1.3' | ||
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