You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something that needs to be taken into account is that all the Sequel::Model classes (and all the classes that depend on them) can only be loaded after the database connection has been made, so there are the "pre db connection" files and the "post db connection files".
require "pact_broker" (no db required)
=> make database connection
require "pact_broker/api" (db required)
The text was updated successfully, but these errors were encountered:
bethesque
changed the title
Add zeitwerk for file loading.
Add zeitwerk for file loading
Sep 6, 2023
👋 Hi! The 'smartbear-supported' label has just been added to this issue, which will create an internal tracking ticket in PactFlow's Jira (PACT-1303). We will use this to prioritise and assign a team member to this task. All activity will be public on this ticket. For now, sit tight and we'll update this ticket once we have more information on the next steps.
Currently, we require files manually, and this can lead to bugs when requires are missing.
The zeitwerk code loader could be used to avoid having to do manual requires.
Good article on it here: https://www.honeybadger.io/blog/ruby-code-loader-zeitwerk/
Something that needs to be taken into account is that all the Sequel::Model classes (and all the classes that depend on them) can only be loaded after the database connection has been made, so there are the "pre db connection" files and the "post db connection files".
require "pact_broker" (no db required)
=> make database connection
require "pact_broker/api" (db required)
The text was updated successfully, but these errors were encountered: