From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F0E071382C5 for ; Fri, 9 Mar 2018 06:15:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 19B8FE09C2; Fri, 9 Mar 2018 06:15:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DFCF5E09C2 for ; Fri, 9 Mar 2018 06:15:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D6C97335C43 for ; Fri, 9 Mar 2018 06:15:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A0CA247 for ; Fri, 9 Mar 2018 06:15:33 +0000 (UTC) From: "Hans de Graaff" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Hans de Graaff" Message-ID: <1520576023.ff37c90b2fca93b1c6ab5458cecd75bdbd744d4b.graaff@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/rspec-mocks/, dev-ruby/rspec-mocks/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-2.patch dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild X-VCS-Directories: dev-ruby/rspec-mocks/files/ dev-ruby/rspec-mocks/ X-VCS-Committer: graaff X-VCS-Committer-Name: Hans de Graaff X-VCS-Revision: ff37c90b2fca93b1c6ab5458cecd75bdbd744d4b X-VCS-Branch: master Date: Fri, 9 Mar 2018 06:15:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2efae45f-a831-45a6-b8aa-f3018db133a4 X-Archives-Hash: a06d35fa62ad53f9d6d2e0ff99d90859 commit: ff37c90b2fca93b1c6ab5458cecd75bdbd744d4b Author: Hans de Graaff gentoo org> AuthorDate: Fri Mar 9 06:13:43 2018 +0000 Commit: Hans de Graaff gentoo org> CommitDate: Fri Mar 9 06:13:43 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff37c90b dev-ruby/rspec-mocks: add ruby25 Package-Manager: Portage-2.3.19, Repoman-2.3.6 .../files/rspec-mocks-3.7.0-ruby25-1.patch | 27 +++++++++++++++ .../files/rspec-mocks-3.7.0-ruby25-2.patch | 38 ++++++++++++++++++++++ dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild | 6 ++-- 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch b/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch new file mode 100644 index 00000000000..6b545ae3cf7 --- /dev/null +++ b/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch @@ -0,0 +1,27 @@ +From 871eb31e3bfe50705ca57e754771aa1e0164f12d Mon Sep 17 00:00:00 2001 +From: Myron Marston +Date: Sat, 30 Dec 2017 17:45:43 -0800 +Subject: [PATCH] Skip spec that does not apply to Ruby 2.5. + +Ruby 2.5 has removed the ability to access top-level constants +via a confusing nested form (e.g. `MyClass::Hash`), so we no +longer need this spec there. + +For #1192. +--- + spec/rspec/mocks/mutate_const_spec.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/spec/rspec/mocks/mutate_const_spec.rb b/spec/rspec/mocks/mutate_const_spec.rb +index fe8d4128..9d80dd73 100644 +--- a/spec/rspec/mocks/mutate_const_spec.rb ++++ b/spec/rspec/mocks/mutate_const_spec.rb +@@ -170,7 +170,7 @@ def change_const_value_to(value) + expect(::Hash).to equal(top_level_hash) + end + +- it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings do ++ it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings, :if => RUBY_VERSION < '2.5' do + top_level_hash = ::Hash + + hide_const("TestClass::Hash") diff --git a/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-2.patch b/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-2.patch new file mode 100644 index 00000000000..3ac44893841 --- /dev/null +++ b/dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-2.patch @@ -0,0 +1,38 @@ +From 783923d6879a2f9df9fee8ef24cecca6ac21136e Mon Sep 17 00:00:00 2001 +From: Myron Marston +Date: Sat, 30 Dec 2017 23:35:27 -0800 +Subject: [PATCH] Make spec less brittle. + +On Ruby 2.5, this spec failed, apparently due to the fact that +Method equality has changed on 2.5 slightly. The method instances +have always been different but 2.4 and before considered them +equivalent. Instead, we can show that the two method objects +_behave_ the same, which is what we really care about. + +Fixes #1192. +--- + spec/rspec/mocks/and_wrap_original_spec.rb | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/spec/rspec/mocks/and_wrap_original_spec.rb b/spec/rspec/mocks/and_wrap_original_spec.rb +index df9cae46..2d4d0a8b 100644 +--- a/spec/rspec/mocks/and_wrap_original_spec.rb ++++ b/spec/rspec/mocks/and_wrap_original_spec.rb +@@ -26,12 +26,13 @@ def results + }.to raise_error NameError + end + +- it "passes in the original method" do +- value = nil ++ it "passes along the original method" do ++ passed_method = nil + original_method = instance.method(:results) +- allow_it.to receive(:results).and_wrap_original { |m| value = m } ++ allow_it.to receive(:results).and_wrap_original { |m| passed_method = m } + instance.results +- expect(value).to eq original_method ++ ++ expect(passed_method.call).to eq(original_method.call) + end + + it "passes along the message arguments" do diff --git a/dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild b/dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild index d7c6b8dbc41..31797ab2b00 100644 --- a/dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild +++ b/dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 -USE_RUBY="ruby22 ruby23 ruby24" +USE_RUBY="ruby22 ruby23 ruby24 ruby25" RUBY_FAKEGEM_RECIPE_TEST="rspec3" @@ -22,6 +22,8 @@ IUSE="" SUBVERSION="$(get_version_component_range 1-2)" +PATCHES=( "${FILESDIR}/${P}-ruby25-1.patch" "${FILESDIR}/${P}-ruby25-2.patch" ) + ruby_add_rdepend "=dev-ruby/rspec-support-${SUBVERSION}* >=dev-ruby/diff-lcs-1.2.0 =dev-ruby/diff-lcs-1*"