lib/tapioca/runtime/loader.rb in tapioca-0.8.1 vs lib/tapioca/runtime/loader.rb in tapioca-0.8.2

- old
+ new

@@ -3,10 +3,11 @@ module Tapioca module Runtime class Loader extend(T::Sig) + include Tapioca::GemHelper sig do params(gemfile: Tapioca::Gemfile, initialize_file: T.nilable(String), require_file: T.nilable(String)).void end def load_bundle(gemfile, initialize_file, require_file) @@ -53,10 +54,13 @@ return [] unless Object.const_defined?("Rails::Engine") safe_require("active_support/core_ext/class/subclasses") # We can use `Class#descendants` here, since we know Rails is loaded - Object.const_get("Rails::Engine").descendants.reject(&:abstract_railtie?) + Object.const_get("Rails::Engine") + .descendants + .reject(&:abstract_railtie?) + .reject { |engine| gem_in_app_dir?(Rails.root.to_path, engine.config.root.to_path) } end sig { params(path: String).void } def safe_require(path) require path