summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-02-13 17:05:10 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-02-13 17:05:10 +0000
commita87fb44fe6da8051c6d9bb8cb4d9717dd053c1fc (patch)
tree66c912b1096baea2ffd0ed6bc2007176354384d7
parentVersion bump. (diff)
downloadgentoo-2-a87fb44fe6da8051c6d9bb8cb4d9717dd053c1fc.tar.gz
gentoo-2-a87fb44fe6da8051c6d9bb8cb4d9717dd053c1fc.tar.bz2
gentoo-2-a87fb44fe6da8051c6d9bb8cb4d9717dd053c1fc.zip
Version bump, exchange a patch for another, thanks to enebo from JRuby for the solution to our problem.
(Portage version: 2.2_rc62/cvs/Linux x86_64)
-rw-r--r--dev-ruby/matchy/ChangeLog10
-rw-r--r--dev-ruby/matchy/files/matchy-0.4.2-order.patch20
-rw-r--r--dev-ruby/matchy/files/matchy-0.5.1+jruby.patch35
-rw-r--r--dev-ruby/matchy/matchy-0.5.1.ebuild (renamed from dev-ruby/matchy/matchy-0.4.2.ebuild)12
4 files changed, 47 insertions, 30 deletions
diff --git a/dev-ruby/matchy/ChangeLog b/dev-ruby/matchy/ChangeLog
index a01b9ad29f4e..b8f8f35213d3 100644
--- a/dev-ruby/matchy/ChangeLog
+++ b/dev-ruby/matchy/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-ruby/matchy
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/matchy/ChangeLog,v 1.1 2010/01/28 01:15:22 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/matchy/ChangeLog,v 1.2 2010/02/13 17:05:10 flameeyes Exp $
+
+*matchy-0.5.1 (13 Feb 2010)
+
+ 13 Feb 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ -matchy-0.4.2.ebuild, -files/matchy-0.4.2-order.patch,
+ +matchy-0.5.1.ebuild, +files/matchy-0.5.1+jruby.patch:
+ Version bump, exchange a patch for another, thanks to enebo from JRuby for
+ the solution to our problem.
*matchy-0.4.2 (28 Jan 2010)
diff --git a/dev-ruby/matchy/files/matchy-0.4.2-order.patch b/dev-ruby/matchy/files/matchy-0.4.2-order.patch
deleted file mode 100644
index 5550c892b2e3..000000000000
--- a/dev-ruby/matchy/files/matchy-0.4.2-order.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: matchy-0.4.2/test/test_operator_expectations.rb
-===================================================================
---- matchy-0.4.2.orig/test/test_operator_expectations.rb
-+++ matchy-0.4.2/test/test_operator_expectations.rb
-@@ -156,12 +156,13 @@ class TestOperatorExpectations < Test::U
- end
-
- def test_fail_message_for_hash
-- obj = Matchy::Expectations::OperatorExpectation.new({:foo => 'bar', :baz => 'quux'}, true)
-+ hash = {:foo => 'bar', :baz => 'quux'}
-+ obj = Matchy::Expectations::OperatorExpectation.new(hash, true)
-
- def obj.flunk(msg)
- msg
- end
-
-- (obj == {:foo => 'bar'}).should == "Expected {:baz=>\"quux\", :foo=>\"bar\"} to == {:foo=>\"bar\"} (diff: {:baz=>\"quux\"})."
-+ (obj == {:foo => 'bar'}).should == "Expected #{hash.inspect} to == {:foo=>\"bar\"} (diff: {:baz=>\"quux\"})."
- end
- end
diff --git a/dev-ruby/matchy/files/matchy-0.5.1+jruby.patch b/dev-ruby/matchy/files/matchy-0.5.1+jruby.patch
new file mode 100644
index 000000000000..a5e1bbe067d5
--- /dev/null
+++ b/dev-ruby/matchy/files/matchy-0.5.1+jruby.patch
@@ -0,0 +1,35 @@
+From 0c043d82dc3cba0a4e1c8048e50adf8a1af511fd Mon Sep 17 00:00:00 2001
+From: Thomas E Enebo <tom.enebo@gmail.com>
+Date: Sat, 13 Feb 2010 17:27:06 +0100
+Subject: [PATCH] Use define_method rather than class_eval for adapter-specific method.
+
+With this change, the code works correctly even on JRuby, while the
+previous code failed for a difference of implementation with MRI (see JRuby
+bug http://jira.codehaus.org/browse/JRUBY-4556 for details about the
+problem).
+---
+ lib/matchy.rb | 8 +++-----
+ 1 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/lib/matchy.rb b/lib/matchy.rb
+index 7c36838..868aeb7 100644
+--- a/lib/matchy.rb
++++ b/lib/matchy.rb
+@@ -66,11 +66,9 @@ module Matchy
+ end
+
+ %w(assertions_module test_case_class assertion_failed_error).each do |method|
+- class_eval <<-EOT, __FILE__, __LINE__
+- def #{method}
+- @@current_adapter ? @@current_adapter.#{method} : raise(LoadError, Matchy.adapter_not_found_msg)
+- end
+- EOT
++ define_method(method) do
++ @@current_adapter ? @@current_adapter.__send__(method) : raise(LoadError, Matchy.adapter_not_found_msg)
++ end
+ end
+
+ def init
+--
+1.6.6.1
+
diff --git a/dev-ruby/matchy/matchy-0.4.2.ebuild b/dev-ruby/matchy/matchy-0.5.1.ebuild
index 48578a173859..8663db18c0e1 100644
--- a/dev-ruby/matchy/matchy-0.4.2.ebuild
+++ b/dev-ruby/matchy/matchy-0.5.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/matchy/matchy-0.4.2.ebuild,v 1.1 2010/01/28 01:15:22 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/matchy/matchy-0.5.1.ebuild,v 1.1 2010/02/13 17:05:10 flameeyes Exp $
EAPI="2"
@@ -24,12 +24,6 @@ KEYWORDS="~amd64"
IUSE=""
all_ruby_prepare() {
- # Don't force us to use Jeweler, disable check_dependency task
- # dependency.
- sed -i \
- -e '/check_dependencies/s:^:#:' \
- Rakefile || die
-
- # ordering problem, sent upstream
- epatch "${FILESDIR}"/${P}-order.patch
+ # jruby compatibility, sent upstream
+ epatch "${FILESDIR}"/${P}+jruby.patch
}