mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Don't include bootsnap by default in apps generated under JRuby
This commit is contained in:
parent
5fd7ac79a1
commit
b10f371366
2 changed files with 13 additions and 4 deletions
|
@ -440,7 +440,7 @@ module Rails
|
|||
end
|
||||
|
||||
def depend_on_bootsnap?
|
||||
!options[:skip_bootsnap] && !options[:dev]
|
||||
!options[:skip_bootsnap] && !options[:dev] && !defined?(JRUBY_VERSION)
|
||||
end
|
||||
|
||||
def os_supports_listen_out_of_the_box?
|
||||
|
|
|
@ -816,10 +816,19 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
def test_bootsnap
|
||||
run_generator
|
||||
|
||||
unless defined?(JRUBY_VERSION)
|
||||
assert_gem "bootsnap"
|
||||
assert_file "config/boot.rb" do |content|
|
||||
assert_match(/require 'bootsnap\/setup'/, content)
|
||||
end
|
||||
else
|
||||
assert_file "Gemfile" do |content|
|
||||
assert_no_match(/bootsnap/, content)
|
||||
end
|
||||
assert_file "config/boot.rb" do |content|
|
||||
assert_no_match(/require 'bootsnap\/setup'/, content)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_skip_bootsnap
|
||||
|
|
Loading…
Reference in a new issue