aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/app_base.rb
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-12-18 10:09:12 -0500
committerGitHub <noreply@github.com>2017-12-18 10:09:12 -0500
commitce2fc70c7bd5d1f57c783d0799d36ee798115513 (patch)
tree74446a0b43ffd1f5b5ca13fb48cf51da6df42af9 /railties/lib/rails/generators/app_base.rb
parent6553c7fef702331c47001e1003067fd555aa7ccd (diff)
parent838b40da8409ac08d37b8c04c2880a5bd6e1db98 (diff)
downloadrails-ce2fc70c7bd5d1f57c783d0799d36ee798115513.tar.gz
rails-ce2fc70c7bd5d1f57c783d0799d36ee798115513.tar.bz2
rails-ce2fc70c7bd5d1f57c783d0799d36ee798115513.zip
Merge pull request #31485 from y-yagi/skip_bootsnap_option
Add `skip_bootsnap` option
Diffstat (limited to 'railties/lib/rails/generators/app_base.rb')
-rw-r--r--railties/lib/rails/generators/app_base.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index b9ae24de59..6f5e631504 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -84,6 +84,9 @@ module Rails
class_option :skip_system_test, type: :boolean, default: false,
desc: "Skip system test files"
+ class_option :skip_bootsnap, type: :boolean, default: false,
+ desc: "Skip bootsnap gem"
+
class_option :dev, type: :boolean, default: false,
desc: "Setup the #{name} with Gemfile pointing to your Rails checkout"
@@ -435,6 +438,10 @@ module Rails
!options[:skip_listen] && os_supports_listen_out_of_the_box?
end
+ def depend_on_bootsnap?
+ !options[:skip_bootsnap]
+ end
+
def os_supports_listen_out_of_the_box?
RbConfig::CONFIG["host_os"] =~ /darwin|linux/
end