lib/dor/workflow/client.rb in dor-workflow-client-3.4.1 vs lib/dor/workflow/client.rb in dor-workflow-client-3.4.2

- old
+ new

@@ -4,12 +4,16 @@ require 'active_support/core_ext' require 'nokogiri' require 'zeitwerk' loader = Zeitwerk::Loader.new -root_file = File.absolute_path("#{__FILE__}/../../..") -loader.inflector = Zeitwerk::GemInflector.new(root_file) -loader.push_dir(root_file) +# Zeitwerk::GemInflector wants to be instantiated with the main .rb entrypoint +# into a gem, which is this file. +loader.inflector = Zeitwerk::GemInflector.new(__FILE__) +# `#push_dir`, on the other hand, wants to be pointed at the dir that holds your +# root namespace directory, which for dor-workflow-client is the `lib/` +# directory. Our root namespace is `Dor::` which lives in `lib/dor/` +loader.push_dir(File.absolute_path("#{__FILE__}/../../..")) loader.setup module Dor module Workflow # TODO: VALID_STATUS should be just another attribute w/ default