[DRE-commits] [ruby-fast-gettext] 04/08: Fix 0004-fix-tests-with-ruby-calls.patch to properly use current Ruby version

Jérémy Bobbio lunar at moszumanska.debian.org
Mon May 5 17:02:14 UTC 2014


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

lunar pushed a commit to branch master
in repository ruby-fast-gettext.

commit 674153bba000b310cef539104688883700647474
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon May 5 18:28:41 2014 +0200

    Fix 0004-fix-tests-with-ruby-calls.patch to properly use current Ruby version
---
 .../patches/0004-fix-tests-with-ruby-calls.patch   | 37 ++++++++++++++++------
 1 file changed, 28 insertions(+), 9 deletions(-)

diff --git a/debian/patches/0004-fix-tests-with-ruby-calls.patch b/debian/patches/0004-fix-tests-with-ruby-calls.patch
index 856a74c..7f92be9 100644
--- a/debian/patches/0004-fix-tests-with-ruby-calls.patch
+++ b/debian/patches/0004-fix-tests-with-ruby-calls.patch
@@ -4,33 +4,52 @@ Subject: fix tests with ruby calls
 
 Index: git/spec/fast_gettext/vendor/iconv_spec.rb
 ===================================================================
---- git.orig/spec/fast_gettext/vendor/iconv_spec.rb	2014-05-05 17:59:51.000000000 +0200
-+++ git/spec/fast_gettext/vendor/iconv_spec.rb	2014-05-05 18:16:42.345498635 +0200
-@@ -2,6 +2,6 @@
+--- git.orig/spec/fast_gettext/vendor/iconv_spec.rb	2014-05-05 18:27:33.364788064 +0200
++++ git/spec/fast_gettext/vendor/iconv_spec.rb	2014-05-05 18:28:10.613890459 +0200
+@@ -1,7 +1,9 @@
+ require "spec_helper"
  
  describe 'Iconv' do
++  let(:ruby) { File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) }
++
    it "also works when Iconv was not found locally" do
 -    system("bundle exec ruby spec/cases/iconv_fallback.rb").should == true
-+    system("ruby spec/cases/iconv_fallback.rb").should == true
++    system("#{ruby} spec/cases/iconv_fallback.rb").should == true
    end
  end
 Index: git/spec/fast_gettext/vendor/string_spec.rb
 ===================================================================
---- git.orig/spec/fast_gettext/vendor/string_spec.rb	2014-05-05 17:59:51.000000000 +0200
-+++ git/spec/fast_gettext/vendor/string_spec.rb	2014-05-05 18:18:31.276729312 +0200
-@@ -88,13 +88,13 @@
+--- git.orig/spec/fast_gettext/vendor/string_spec.rb	2014-05-05 18:27:33.364788064 +0200
++++ git/spec/fast_gettext/vendor/string_spec.rb	2014-05-05 18:28:10.613890459 +0200
+@@ -85,16 +85,17 @@
+ 
+   describe 'with i18n loaded' do
+     let(:pending_condition) { (RUBY_VERSION < "1.9" and ActiveRecord::VERSION::MAJOR == 3) or ActiveRecord::VERSION::MAJOR >= 4 }
++    let(:ruby) { File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) }
  
      it "interpolates if i18n is loaded before" do
        pending_if pending_condition, "does not work on ree + rails 3 or rails 4"  do
 -        system("bundle exec ruby spec/cases/interpolate_i18n_before_fast_gettext.rb  > /dev/null 2>&1").should == true
-+        system("ruby spec/cases/interpolate_i18n_before_fast_gettext.rb  > /dev/null 2>&1").should == true
++        system("#{ruby} spec/cases/interpolate_i18n_before_fast_gettext.rb  > /dev/null 2>&1").should == true
        end
      end
  
      it "interpolates if i18n is loaded before" do
        pending_if pending_condition, "does not work on ree + rails 3 or rails 4"  do
 -        system("bundle exec ruby spec/cases/interpolate_i18n_after_fast_gettext.rb > /dev/null 2>&1").should == true
-+        system("ruby spec/cases/interpolate_i18n_after_fast_gettext.rb > /dev/null 2>&1").should == true
++        system("#{ruby} spec/cases/interpolate_i18n_after_fast_gettext.rb > /dev/null 2>&1").should == true
        end
      end
    end
+Index: git/spec/spec_helper.rb
+===================================================================
+--- git.orig/spec/spec_helper.rb	2014-05-05 18:28:07.849808669 +0200
++++ git/spec/spec_helper.rb	2014-05-05 18:28:10.613890459 +0200
+@@ -3,6 +3,7 @@
+ # ---- requirements
+ require 'rspec'
+ require 'fast_gettext'
++require 'rbconfig'
+ 
+ Encoding.default_external='UTF-8' if RUBY_VERSION >= '1.9'
+ 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-fast-gettext.git



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