[DRE-commits] [SCM] ruby-railties-3.2.git branch, master, updated. debian/3.2.3-1-13-g254176a
Antonio Terceiro
terceiro at debian.org
Mon Jun 25 00:07:11 UTC 2012
The following commit has been merged in the master branch:
commit 9a5fcc4a6712d4d642c699fed22aba6be3cd0f66
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Jun 14 14:51:56 2012 -0300
Don't require bundler installed with Rubygems
diff --git a/debian/patches/dont-require-bundler-from-rubygems.patch b/debian/patches/dont-require-bundler-from-rubygems.patch
new file mode 100644
index 0000000..58c4c4b
--- /dev/null
+++ b/debian/patches/dont-require-bundler-from-rubygems.patch
@@ -0,0 +1,27 @@
+Description: Don't require bundler installed with Rubygems
+ This patch makes it possible to create a fresh Rails app on Debian without
+ having to install anything without APT.
+Author: Antonio Terceiro <terceiro at debian.org>
+
+--- ruby-railties-3.2-3.2.3.orig/lib/rails/generators/app_base.rb
++++ ruby-railties-3.2-3.2.3/lib/rails/generators/app_base.rb
+@@ -240,18 +240,7 @@ 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
diff --git a/debian/patches/series b/debian/patches/series
index c5ad73c..5b73dff 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ syntaxhighlighter-source.patch
remove-rubygems.patch
disable-default-gemfile-content.patch
skip-bundle-by-default.patch
+dont-require-bundler-from-rubygems.patch
--
ruby-railties-3.2.git
More information about the Pkg-ruby-extras-commits
mailing list