lib/jruby_art/installer.rb in jruby_art-1.2.9 vs lib/jruby_art/installer.rb in jruby_art-1.3.0
- old
+ new
@@ -29,12 +29,11 @@
data = settings.zip(values).to_h
open(path, 'w:UTF-8') { |file| file.write(data.to_yaml) }
end
def root_exist?
- return false if config.empty?
- File.exist? config['PROCESSING_ROOT']
+ Core.check?(config['PROCESSING_ROOT'])
end
def config
k9config = File.expand_path("#{home}/.jruby_art/config.yml")
return '' unless File.exist? k9config
@@ -53,15 +52,16 @@
end
end
# Configuration checker
class Check < Installer
+ require_relative 'core'
def install
show_version
return super unless config
installed = File.exist? File.join(gem_root, 'lib/ruby/jruby-complete.jar')
- proot = ' PROCESSING_ROOT = Not Set!!!' unless root_exist?
- proot ||= " PROCESSING_ROOT = #{config['PROCESSING_ROOT']}"
+ proot = ' PROCESSING_ROOT = Not Set Correctly!!!' unless root_exist?
+ proot ||= " PROCESSING_ROOT = #{config['PROCESSING_ROOT']}"
sketchbook = " sketchbook_path = #{config['sketchbook_path']}"
template = " template = #{config['template']}"
java_args = " java_args = #{config['java_args']}"
max_watch = " MAX_WATCH = #{config['MAX_WATCH']}"
jruby = config.fetch('JRUBY', true)