[DRE-commits] [ruby-rack-mount] 02/03: Add patches
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Tue Jul 7 11:08:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository ruby-rack-mount.
commit bca0dca0fb09904a9a2be74b393cd2717be23193
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Tue Jul 7 13:34:14 2015 +0300
Add patches
---
debian/patches/0001-Fix-warning-from-Hash.patch | 25 ++++++++++++++++++++++
.../0002-Fix-Ruby-2.0.0-compatibility.patch | 22 +++++++++++++++++++
debian/patches/series | 2 ++
3 files changed, 49 insertions(+)
diff --git a/debian/patches/0001-Fix-warning-from-Hash.patch b/debian/patches/0001-Fix-warning-from-Hash.patch
new file mode 100644
index 0000000..c1d3b76
--- /dev/null
+++ b/debian/patches/0001-Fix-warning-from-Hash.patch
@@ -0,0 +1,25 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Mon, 6 Jul 2015 17:49:10 +0300
+Subject: Fix warning from Hash[]
+
+ This patch will fix the following warning:
+ warning: wrong element type nil at 1 (expected array)
+ warning: ignoring wrong elements is deprecated, remove them explicitly
+ warning: this causes ArgumentError in the next release
+---
+ lib/rack/mount/route.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rack/mount/route.rb b/lib/rack/mount/route.rb
+index f7b4f43..f4a2456 100644
+--- a/lib/rack/mount/route.rb
++++ b/lib/rack/mount/route.rb
+@@ -99,7 +99,7 @@ module Rack::Mount
+ if method.nil?
+ result = Hash[@conditions.map { |m, condition|
+ [m, condition.generate(params, recall, options)] if condition.respond_to?(:generate)
+- }]
++ }.compact]
+ return nil if result.values.compact.empty?
+ else
+ if condition = @conditions[method]
diff --git a/debian/patches/0002-Fix-Ruby-2.0.0-compatibility.patch b/debian/patches/0002-Fix-Ruby-2.0.0-compatibility.patch
new file mode 100644
index 0000000..040e3d0
--- /dev/null
+++ b/debian/patches/0002-Fix-Ruby-2.0.0-compatibility.patch
@@ -0,0 +1,22 @@
+From: =?utf-8?q?V=C3=ADt_Ondruch?= <v.ondruch at tiscali.cz>
+Date: Tue, 9 Apr 2013 11:12:02 +0300
+Subject: Fix Ruby 2.0.0 compatibility
+
+#respond_to? now exclude protected methods.
+---
+ lib/rack/mount/multimap.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rack/mount/multimap.rb b/lib/rack/mount/multimap.rb
+index 6b773e2..b88630b 100644
+--- a/lib/rack/mount/multimap.rb
++++ b/lib/rack/mount/multimap.rb
+@@ -125,7 +125,7 @@ module Rack::Mount
+ end
+
+ def iterate_over_container(container)
+- if container.respond_to?(:each_container_with_default)
++ if container.respond_to?(:each_container_with_default, true)
+ container.each_container_with_default do |value|
+ yield value
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..fa44e87
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Fix-warning-from-Hash.patch
+0002-Fix-Ruby-2.0.0-compatibility.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rack-mount.git
More information about the Pkg-ruby-extras-commits
mailing list