From dbf3f0e6d786c78fc950f1cc235fc6a2dc2cfe4d Mon Sep 17 00:00:00 2001 From: Gleb Sinyavskiy Date: Wed, 8 Feb 2023 23:51:52 +0100 Subject: [PATCH] Add zeitwerk --- Gemfile | 3 ++- Gemfile.lock | 2 ++ lib/nats_streamer.rb | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 37eb042..5b0c481 100644 --- a/Gemfile +++ b/Gemfile @@ -3,9 +3,10 @@ source "https://rubygems.org" gem "async" - gem "nats-pure" +gem "zeitwerk" + group :development, :test do gem "rake" diff --git a/Gemfile.lock b/Gemfile.lock index 92d22bd..374454d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -120,6 +120,7 @@ GEM webrick (1.7.0) yard (0.9.28) webrick (~> 1.7.0) + zeitwerk (2.6.6) PLATFORMS x86_64-linux @@ -137,6 +138,7 @@ DEPENDENCIES simplecov solargraph webmock + zeitwerk BUNDLED WITH 2.4.1 diff --git a/lib/nats_streamer.rb b/lib/nats_streamer.rb index 7e081a7..ac94678 100644 --- a/lib/nats_streamer.rb +++ b/lib/nats_streamer.rb @@ -1,7 +1,14 @@ # frozen_string_literal: true +require "zeitwerk" + +loader = Zeitwerk::Loader.for_gem +loader.setup + require_relative "nats_streamer/version" class NatsStreamer::Error < StandardError # Your code goes here... end + +loader.eager_load