1
0
Fork 0
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:
Guillermo Iguaran 2018-04-20 12:17:15 -05:00
parent 5fd7ac79a1
commit b10f371366
2 changed files with 13 additions and 4 deletions

View file

@ -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?

View file

@ -816,9 +816,18 @@ class AppGeneratorTest < Rails::Generators::TestCase
def test_bootsnap
run_generator
assert_gem "bootsnap"
assert_file "config/boot.rb" do |content|
assert_match(/require 'bootsnap\/setup'/, content)
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