Sha256: ee167a2d2341d1ef44822a054980f64ae83738e8353defd381db77865ac4f7ee
Contents?: true
Size: 1.49 KB
Versions: 15
Compression:
Stored size: 1.49 KB
Contents
# reset context class loader set by org.jruby.Main.main to nil. embulk manages # multiple classloaders. default classloader should be Plugin.class.getClassloader(). java.lang.Thread.current_thread.set_context_class_loader(nil) bundle_path = ENV['EMBULK_BUNDLE_PATH'].to_s bundle_path = nil if bundle_path.empty? # search -b, --bundle BUNDLE_DIR bundle_path_index = ARGV.find_index {|arg| arg == '-b' || arg == '--bundle' } if bundle_path_index bundle_path = ARGV.slice!(bundle_path_index, 2)[1] end if bundle_path # use bundler installed at bundle_path ENV['GEM_HOME'] = File.expand_path File.join(bundle_path, Gem.ruby_engine, RbConfig::CONFIG['ruby_version']) ENV['GEM_PATH'] = '' Gem.clear_paths # force rubygems to reload GEM_HOME ENV['BUNDLE_GEMFILE'] = File.expand_path File.join(bundle_path, "Gemfile") begin require 'bundler' rescue LoadError => e raise "#{e}\nBundler is not installed. Did you run \`$ embulk bundle #{bundle_path}\` ?" end Bundler.load.setup_environment require 'bundler/setup' # since here, `require` may load files of different (newer) embulk versions # especially following 'embulk/command/embulk_run'. $LOAD_PATH << File.expand_path(bundle_path) # for local plugins begin require 'embulk/command/embulk_run' rescue LoadError require_relative 'embulk_run' end else # GEM_HOME is set by embulk_run.rb ENV.delete('GEM_HOME') ENV.delete('GEM_PATH') ENV.delete('BUNDLE_GEMFILE') require_relative 'embulk_run' end Embulk.run(ARGV)
Version data entries
15 entries across 15 versions & 1 rubygems