[DRE-commits] [SCM] ruby-railties-3.2.git branch, master, updated. debian/3.2.6-2-9-g4466df8
Antonio Terceiro
terceiro at debian.org
Fri Jun 29 00:07:16 UTC 2012
The following commit has been merged in the master branch:
commit de62746ab8857313b074438e35dd5b5bc5b31a4a
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Jun 28 19:21:44 2012 -0300
Be careful with that bundler when creating apps
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..3c530ee
--- /dev/null
+++ b/debian/patches/be-carefull-with-that-bundler.patch
@@ -0,0 +1,41 @@
+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 to its thing as usual.
+ .
+ This is patch is most probably Debian-specific.
+Author: Antonio Terceiro <terceiro at debian.org>
+
+--- ruby-railties-3.2-3.2.6.orig/lib/rails/generators/app_base.rb
++++ ruby-railties-3.2-3.2.6/lib/rails/generators/app_base.rb
+@@ -240,22 +240,11 @@ module Rails
+
+ def bundle_command(command)
+ say_status :run, "bundle #{command}"
+-
+- # We are going to shell out rather than invoking Bundler::CLI.new(command)
+- # because `rails new` loads the Thor gem and on the other hand bundler uses
+- # its own vendored Thor, which could be a different version. Running both
+- # things in the same process is a recipe for a night with paracetamol.
+- #- # We use backticks and #print here instead of vanilla #system because it
+- # is easier to silence stdout in the existing test suite this way. The
+- # end-user gets the bundler commands called anyway, so no big deal.
+- #
+- # Thanks to James Tucker for the Gem tricks involved in this call.
+- print `"#{Gem.ruby}" -rubygems "#{Gem.bin_path('bundler', 'bundle')}" #{command}`
++ print `"#{Gem.ruby}" -rubygems /usr/bin/bundle" #{command}`
+ end
+
+ def run_bundle
+- bundle_command('install') unless options[:skip_gemfile] || options[:skip_bundle]
++ bundle_command('install --local') unless options[:skip_gemfile] || options[:skip_bundle]
+ end
+
+ def empty_directory_with_gitkeep(destination, config = {})
diff --git a/debian/patches/series b/debian/patches/series
index c06c7e5..27c0276 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
syntaxhighlighter-source.patch
remove-rubygems.patch
+be-carefull-with-that-bundler.patch
--
ruby-railties-3.2.git
More information about the Pkg-ruby-extras-commits
mailing list