Skip to content

Add zeitwerk for code loading

Matt Critchlow requested to merge centralize-requires into trunk

References: #69 (closed)

This should replace the "require_relative" calls we have everywhere. This was prompted for a few reasons:

  • Individual tests would not successfully pass unless the whole test suite was ran
  • It was difficult to keep track of the relative path locations for files given where they were in the project directory structure
  • Adding new files/directories can be centralized in app.rb
  • zeitwerk is the project used by Rails internally, and we're using it in several surfliner products such as lark so it is well supported and worth learning/understanding. It is also a dependency of the dry-rb gems, so we actually already have it in our Gemfile.lock
Edited by Matt Critchlow

Merge request reports