onload 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +17 -0
- data/LICENSE +21 -0
- data/README.md +64 -0
- data/Rakefile +21 -0
- data/lib/onload/core_ext/kernel.rb +68 -0
- data/lib/onload/core_ext/kernel_zeitwerk.rb +61 -0
- data/lib/onload/ext/activesupport/dependencies.rb +48 -0
- data/lib/onload/ext/bootsnap/autoload.rb +28 -0
- data/lib/onload/ext/zeitwerk/loader.rb +42 -0
- data/lib/onload/file.rb +28 -0
- data/lib/onload/railtie.rb +27 -0
- data/lib/onload/tasks/transpile.rake +10 -0
- data/lib/onload/tasks/transpile_rails.rake +17 -0
- data/lib/onload/version.rb +5 -0
- data/lib/onload.rb +118 -0
- data/onload.gemspec +16 -0
- data/spec/fixtures/hello.rb.up +5 -0
- data/spec/rails/controllers/home_controller_spec.rb +42 -0
- data/spec/rails/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/rails/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/rails/dummy/app/views/home/index.html.erb +1 -0
- data/spec/rails/dummy/app/views/layouts/application.html.erb +1 -0
- data/spec/rails/dummy/config/application.rb +15 -0
- data/spec/rails/dummy/config/routes.rb +3 -0
- data/spec/rails/dummy/config/secrets.yml +2 -0
- data/spec/rails/dummy/log/test.log +68081 -0
- data/spec/rails/spec_helper.rb +32 -0
- data/spec/ruby/onload_spec.rb +17 -0
- data/spec/ruby/spec_helper.rb +8 -0
- data/spec/spec_setup.rb +41 -0
- metadata +73 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
module Onload
|
2
|
+
class DummyApplication < ::Rails::Application
|
3
|
+
if config.respond_to?(:load_defaults)
|
4
|
+
config.load_defaults(
|
5
|
+
Gem.loaded_specs['railties'].version.to_s.split('.')[0..1].join('.')
|
6
|
+
)
|
7
|
+
end
|
8
|
+
|
9
|
+
config.eager_load = false
|
10
|
+
|
11
|
+
config.autoload_paths << ::File.expand_path(
|
12
|
+
::File.join(*%w[.. .. .. fixtures]), __dir__
|
13
|
+
)
|
14
|
+
end
|
15
|
+
end
|