[DRE-commits] [ruby-haml-magic-translations] 01/02: Add a patch to stop using #try in tests as it comes from activesupport

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 1 15:52:13 UTC 2014


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository ruby-haml-magic-translations.

commit 9742a95b030da7d1075ee78c866a53906938f87c
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon Sep 1 15:47:15 2014 +0000

    Add a patch to stop using #try in tests as it comes from activesupport
    
    Closes: #759902
---
 debian/patches/do-not-use-try-method | 18 ++++++++++++++++++
 debian/patches/series                |  1 +
 2 files changed, 19 insertions(+)

diff --git a/debian/patches/do-not-use-try-method b/debian/patches/do-not-use-try-method
new file mode 100644
index 0000000..3d00a80
--- /dev/null
+++ b/debian/patches/do-not-use-try-method
@@ -0,0 +1,18 @@
+Description: Do not use #try
+ #try comes from activesupport, so let's just not use it
+Bug-Debian: https://bugs.debian.org/759902
+Author: Jérémy Bobbio <lunar at debian.org>
+Last-Update: 2014-09-01
+
+--- a/spec/haml/magic_translations_spec.rb
++++ b/spec/haml/magic_translations_spec.rb
+@@ -8,7 +8,8 @@ require 'gettext/tools'
+ # does not turn the encoding back to US-ASCII. Strange issue.
+ class String
+   def strip_heredoc
+-    indent = scan(/^[ \t]*(?=\S)/).min.try(:size) || 0
++    shortest = scan(/^[ \t]*(?=\S)/).min
++    indent = shortest ? shortest.size : 0
+     gsub(/^[ \t]{#{indent}}/, '')
+   end
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6ce8a16
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+do-not-use-try-method

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-haml-magic-translations.git



More information about the Pkg-ruby-extras-commits mailing list