Class: Tapioca::Loader
- Inherits:
-
Object
- Object
- Tapioca::Loader
- Extended by:
- T::Sig
- Defined in:
- lib/tapioca/loader.rb
Instance Method Summary collapse
-
#initialize(gemfile) ⇒ Loader
constructor
A new instance of Loader.
- #load_bundle(initialize_file, require_file) ⇒ Object
- #load_rails(environment_load: false, eager_load: false) ⇒ Object
Constructor Details
Instance Method Details
#load_bundle(initialize_file, require_file) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/tapioca/loader.rb', line 14 def load_bundle(initialize_file, require_file) require_helper(initialize_file) load_rails load_rake require_bundle require_helper(require_file) load_rails_engines end |
#load_rails(environment_load: false, eager_load: false) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/tapioca/loader.rb', line 28 def load_rails(environment_load: false, eager_load: false) return unless File.exist?("config/application.rb") safe_require("rails") silence_deprecations safe_require("rails/generators/test_case") if environment_load safe_require("./config/environment") else safe_require("./config/application") end eager_load_rails_app if eager_load end |