[DRE-commits] [rails-4.0] 02/02: Run bundle install --local, as in Debian Rails 3.2
Christian Hofstaedtler
zeha at moszumanska.debian.org
Thu Jan 16 17:37:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
zeha pushed a commit to branch master
in repository rails-4.0.
commit 87901d190f2928dd476fe9a336d202c65b947bc4
Author: Christian Hofstaedtler <zeha at debian.org>
Date: Thu Jan 16 16:43:34 2014 +0100
Run bundle install --local, as in Debian Rails 3.2
---
debian/patches/be-carefull-with-that-bundler.patch | 38 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 39 insertions(+)
diff --git a/debian/patches/be-carefull-with-that-bundler.patch b/debian/patches/be-carefull-with-that-bundler.patch
new file mode 100644
index 0000000..1cbd402
--- /dev/null
+++ b/debian/patches/be-carefull-with-that-bundler.patch
@@ -0,0 +1,38 @@
+Description: Be careful with that bundler
+ on Debian, Rails must preferably use Debian packages, while not stopping the
+ users to get stuff from Rubygems if they want.
+ .
+ This way, when creating a new application, we run `bundle install --local`
+ instead of `bundle install`, to make sure bundler does not download anything
+ from Rubygems. That's not because I don't like Rubygems, but because
+ everything the user will need to run this new app (sqlite3, sass-rails,
+ coffee-rails) is already installed by means of Debian packages. If the user
+ does want to use Rubygems packages after that, she will just edit the Gemfile,
+ run `bundle install`, and bundler will do its thing as usual.
+ .
+ This is patch is most probably Debian-specific.
+Author: Antonio Terceiro <terceiro at debian.org>
+
+Index: rails-4.0/railties/lib/rails/generators/app_base.rb
+===================================================================
+--- rails-4.0.orig/railties/lib/rails/generators/app_base.rb 2014-01-16 16:39:12.293339784 +0100
++++ rails-4.0/railties/lib/rails/generators/app_base.rb 2014-01-16 16:40:24.876899621 +0100
+@@ -265,16 +265,14 @@ module Rails
+ # We unset temporary bundler variables to load proper bundler and Gemfile.
+ #
+ # Thanks to James Tucker for the Gem tricks involved in this call.
+- _bundle_command = Gem.bin_path('bundler', 'bundle')
+-
+ require 'bundler'
+ Bundler.with_clean_env do
+- print `"#{Gem.ruby}" "#{_bundle_command}" #{command}`
++ print `"#{Gem.ruby}" "/usr/bin/bundle" #{command}`
+ end
+ end
+
+ def run_bundle
+- bundle_command('install') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]
++ bundle_command('install --local') unless options[:skip_gemfile] || options[:skip_bundle] || options[:pretend]
+ end
+
+ def empty_directory_with_keep_file(destination, config = {})
diff --git a/debian/patches/series b/debian/patches/series
index 34861b3..25026da 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
relax-dependencies
mona_lisa.jpg_is_PD-Art_and_has_been_removed.patch
+be-carefull-with-that-bundler.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rails-4.0.git
More information about the Pkg-ruby-extras-commits
mailing list