Skip to content

Commit 067ff15

Browse files
committed
Use new Embulk bootstrap mechanism.
1 parent 2eca01d commit 067ff15

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/helper.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
require 'test/unit'
55
require 'test/unit/rr'
66

7+
# Embulk 0.10.x introduced new bootstrap mechanism.
8+
# https://github.com/embulk/embulk/blob/641f35fec064cca7b1a7314d634a4b64ef8637f1/embulk-ruby/test/vanilla/run-test.rb#L8-L13
9+
static_initializer = Java::org.embulk.EmbulkDependencyClassLoader.staticInitializer().useSelfContainedJarFiles()
10+
static_initializer.java_send :initialize
11+
12+
require 'embulk/java/bootstrap'
713
require 'embulk'
8-
begin
9-
# Embulk ~> 0.8.x
10-
Embulk.setup
11-
rescue NotImplementedError, NoMethodError, NameError
12-
# Embulk ~> 0.9.x
13-
require 'embulk/java/bootstrap'
14-
end
14+
1515
Embulk.logger = Embulk::Logger.new('/dev/null')
1616

1717
APP_ROOT = File.expand_path('../', __dir__)

0 commit comments

Comments
 (0)