aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2018-08-11 10:36:42 -0400
committerGitHub <noreply@github.com>2018-08-11 10:36:42 -0400
commit920c9195e0e27077af003973e45d0146a30e51b4 (patch)
tree160a3c2c5e5d52a6bf77d437a89789a4e7196f1e /railties/lib
parent2cb87e3b31e3152475347c667d0b8a05a93d8918 (diff)
parentee8d7850fd38b4602dc1d40323addc3448b60947 (diff)
downloadrails-920c9195e0e27077af003973e45d0146a30e51b4.tar.gz
rails-920c9195e0e27077af003973e45d0146a30e51b4.tar.bz2
rails-920c9195e0e27077af003973e45d0146a30e51b4.zip
Merge pull request #33202 from deivid-rodriguez/bundler_binstubs
Bundler binstubs
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/app_base.rb6
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb2
-rw-r--r--railties/lib/rails/generators/rails/app/templates/bin/bundle.tt2
3 files changed, 8 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 985e9ab263..a6dc60342c 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -458,6 +458,12 @@ module Rails
end
end
+ def generate_bundler_binstub
+ if bundle_install?
+ bundle_command("binstubs bundler")
+ end
+ end
+
def generate_spring_binstubs
if bundle_install? && spring_install?
bundle_command("exec spring binstub --all")
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 83c5c9f297..dd6ec127dc 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -298,6 +298,8 @@ module Rails
build(:bin)
end
+ public_task :generate_bundler_binstub
+
def update_bin_files
build(:bin_when_updating)
end
diff --git a/railties/lib/rails/generators/rails/app/templates/bin/bundle.tt b/railties/lib/rails/generators/rails/app/templates/bin/bundle.tt
deleted file mode 100644
index a84f0afe47..0000000000
--- a/railties/lib/rails/generators/rails/app/templates/bin/bundle.tt
+++ /dev/null
@@ -1,2 +0,0 @@
-ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
-load Gem.bin_path('bundler', 'bundle')