[DRE-commits] [rails] 01/13: 0002-load_paths.rb-don-t-load-bundler.patch: don't load bundler when running tests
Antonio Terceiro
terceiro at moszumanska.debian.org
Fri Mar 4 18:31:27 UTC 2016
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository rails.
commit 5b31aef735428da62b3a46bae16353bad4d397e6
Author: Antonio Terceiro <terceiro at debian.org>
Date: Thu Mar 3 16:31:49 2016 -0300
0002-load_paths.rb-don-t-load-bundler.patch: don't load bundler when running tests
---
debian/changelog | 7 ++++
.../0001-Be-careful-with-that-bundler.patch | 34 ++++++++++++++++++
.../0002-load_paths.rb-don-t-load-bundler.patch | 17 +++++++++
debian/patches/be-carefull-with-that-bundler.patch | 41 ----------------------
debian/patches/series | 3 +-
5 files changed, 60 insertions(+), 42 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ce3a04e..6b20185 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+rails (2:4.2.5.2-2) UNRELEASED; urgency=medium
+
+ * 0002-load_paths.rb-don-t-load-bundler.patch: don't load bundler when
+ running tests
+
+ -- Antonio Terceiro <terceiro at debian.org> Thu, 03 Mar 2016 16:31:21 -0300
+
rails (2:4.2.5.2-1) unstable; urgency=high
* New upstream release
diff --git a/debian/patches/0001-Be-careful-with-that-bundler.patch b/debian/patches/0001-Be-careful-with-that-bundler.patch
new file mode 100644
index 0000000..87551ec
--- /dev/null
+++ b/debian/patches/0001-Be-careful-with-that-bundler.patch
@@ -0,0 +1,34 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Thu, 3 Mar 2016 16:30:17 -0300
+Subject: Be careful with that bundler
+
+---
+ railties/lib/rails/generators/app_base.rb | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
+index 4ff30a5..c150dc3 100644
+--- a/railties/lib/rails/generators/app_base.rb
++++ b/railties/lib/rails/generators/app_base.rb
+@@ -325,11 +325,9 @@ 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
+- output = `"#{Gem.ruby}" "#{_bundle_command}" #{command}`
++ output = `"#{Gem.ruby}" "/usr/bin/bundle" #{command}`
+ print output unless options[:quiet]
+ end
+ end
+@@ -343,7 +341,7 @@ module Rails
+ end
+
+ def run_bundle
+- bundle_command('install') if bundle_install?
++ bundle_command('install --local') if bundle_install?
+ end
+
+ def generate_spring_binstubs
diff --git a/debian/patches/0002-load_paths.rb-don-t-load-bundler.patch b/debian/patches/0002-load_paths.rb-don-t-load-bundler.patch
new file mode 100644
index 0000000..db8eb67
--- /dev/null
+++ b/debian/patches/0002-load_paths.rb-don-t-load-bundler.patch
@@ -0,0 +1,17 @@
+From: Antonio Terceiro <terceiro at debian.org>
+Date: Thu, 3 Mar 2016 16:30:46 -0300
+Subject: load_paths.rb: don't load bundler
+
+---
+ load_paths.rb | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/load_paths.rb b/load_paths.rb
+index 0ad8fcf..556df42 100644
+--- a/load_paths.rb
++++ b/load_paths.rb
+@@ -1,3 +1 @@
+-# bust gem prelude
+-require 'bundler'
+-Bundler.setup
++# nothing
diff --git a/debian/patches/be-carefull-with-that-bundler.patch b/debian/patches/be-carefull-with-that-bundler.patch
deleted file mode 100644
index 6159d8f..0000000
--- a/debian/patches/be-carefull-with-that-bundler.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-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/railties/lib/rails/generators/app_base.rb
-===================================================================
---- rails.orig/railties/lib/rails/generators/app_base.rb
-+++ rails/railties/lib/rails/generators/app_base.rb
-@@ -314,11 +314,9 @@ 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
-- output = `"#{Gem.ruby}" "#{_bundle_command}" #{command}`
-+ output = `"#{Gem.ruby}" "/usr/bin/bundle" #{command}`
- print output unless options[:quiet]
- end
- end
-@@ -332,7 +330,7 @@ module Rails
- end
-
- def run_bundle
-- bundle_command('install') if bundle_install?
-+ bundle_command('install --local') if bundle_install?
- end
-
- def generate_spring_binstubs
diff --git a/debian/patches/series b/debian/patches/series
index d2bcd8a..4b2ab0b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-be-carefull-with-that-bundler.patch
+0001-Be-careful-with-that-bundler.patch
+0002-load_paths.rb-don-t-load-bundler.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/rails.git
More information about the Pkg-ruby-extras-commits
mailing list