From 4123df7d561c60ad50456bfb203ceb02d66b78f2 Mon Sep 17 00:00:00 2001 From: kares Date: Wed, 28 Nov 2018 12:45:01 +0100 Subject: [PATCH 1/3] [build] no need to clean on rake test_pure (similar to test_ext) --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index c6c195f9..532aacb5 100644 --- a/Rakefile +++ b/Rakefile @@ -176,7 +176,7 @@ task :check_env do end desc "Testing library (pure ruby)" -task :test_pure => [ :clean, :check_env, :do_test_pure ] +task :test_pure => [ :check_env, :do_test_pure ] UndocumentedTestTask.new do |t| t.name = 'do_test_pure' From 645f36ed8a72bd31920efec0abacc0a24d3abe78 Mon Sep 17 00:00:00 2001 From: kares Date: Wed, 28 Nov 2018 12:57:13 +0100 Subject: [PATCH 2/3] [build] let's build with Java 1.6 JRuby 1.7 was Java6+ compatible (9.2 is Java8+) --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 532aacb5..56edecc2 100644 --- a/Rakefile +++ b/Rakefile @@ -238,7 +238,7 @@ if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby' classpath = (Dir['java/lib/*.jar'] << 'java/src' << JRUBY_JAR) * ':' obj = src.sub(/\.java\Z/, '.class') file obj => src do - sh 'javac', '-classpath', classpath, '-source', '1.5', '-target', '1.5', src + sh 'javac', '-classpath', classpath, '-source', '1.6', '-target', '1.6', src end JAVA_CLASSES << obj end From 362a7c3eae107773fe7413549de167d532e0e7ae Mon Sep 17 00:00:00 2001 From: kares Date: Wed, 28 Nov 2018 14:46:56 +0100 Subject: [PATCH 3/3] [build] make test_xxx work standalone + avoid bundle exec --- Rakefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Rakefile b/Rakefile index 56edecc2..e60cfc11 100644 --- a/Rakefile +++ b/Rakefile @@ -176,7 +176,8 @@ task :check_env do end desc "Testing library (pure ruby)" -task :test_pure => [ :check_env, :do_test_pure ] +task :test_pure => [ :set_env_pure, :check_env, :do_test_pure ] +task(:set_env_pure) { ENV['JSON'] = 'pure' } UndocumentedTestTask.new do |t| t.name = 'do_test_pure' @@ -187,10 +188,7 @@ UndocumentedTestTask.new do |t| end desc "Testing library (pure ruby and extension)" -task :test do - sh "env JSON=pure #{BUNDLE} exec rake test_pure" or exit 1 - sh "env JSON=ext #{BUNDLE} exec rake test_ext" or exit 1 -end +task :test => [ :test_pure, :test_ext ] namespace :gems do desc 'Install all development gems' @@ -257,7 +255,8 @@ if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'jruby' end desc "Testing library (jruby)" - task :test_ext => [ :check_env, :create_jar, :do_test_ext ] + task :test_ext => [ :set_env_ext, :create_jar, :check_env, :do_test_ext ] + task(:set_env_ext) { ENV['JSON'] = 'ext' } UndocumentedTestTask.new do |t| t.name = 'do_test_ext'