diff options
Diffstat (limited to 'dev-ruby/rspec-mocks')
-rw-r--r-- | dev-ruby/rspec-mocks/Manifest | 4 | ||||
-rw-r--r-- | dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch | 27 | ||||
-rw-r--r-- | dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-2.patch | 38 | ||||
-rw-r--r-- | dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild | 6 |
4 files changed, 72 insertions, 3 deletions
diff --git a/dev-ruby/rspec-mocks/Manifest b/dev-ruby/rspec-mocks/Manifest index c6bf79c27d17..347fa0d62292 100644 --- a/dev-ruby/rspec-mocks/Manifest +++ b/dev-ruby/rspec-mocks/Manifest @@ -1,3 +1,5 @@ +AUX rspec-mocks-3.7.0-ruby25-1.patch 1164 BLAKE2B c7fe549bdbd85ab2868bc6cc02f6f6811d60b484acce08de8c7d5596ef36b6f63f63023fd2f708f0f0e855137e5d03ea283fcb2f713d755d8f067d86e8cdcf14 SHA512 ff92bd1a227a6c95c9fc04a10373f7924f09533fab56748554929a24fbd8147c82d1a3b15400f1b6ae003ebd2c0b0a4e719211fba2f43929f05cae2cc6ab894e +AUX rspec-mocks-3.7.0-ruby25-2.patch 1496 BLAKE2B 1f03651f0f0ee76e055b3dc8f823f2b9e119d7d5f5583ddb44ed15152ec852eaacd1e78a56b401a606777ecc726f0820feb7975c2064fc22430ba28509b52016 SHA512 ed06d7c0c23ccde64393dfad26a70c698973817e077b2db592d908e55827b210bbbe4d95e1d5c92866336456ac21566a96c08d8dc7e84386c1ca8d3d25d5a445 DIST rspec-mocks-2.99.2-git.tgz 101731 BLAKE2B 27ae180381d427b642c53c351e7b53602caba4252ddf5393949d940be8474110eb0697901afaaa878cd8d368f081c6644c0fcbce86d9d14b9f93f48c027ae808 SHA512 dd3b9394d56de8d3089db7777cda1e1a5bbdc46486876a99a8a83b602b84ba0320913d8e8dabe5e0367645eb01b943607b93e67d87cc26e380c8db6e048e4e0d DIST rspec-mocks-3.5.0-git.tgz 186806 BLAKE2B e412feafba03cfe8c0efb68dc778885f0603c3b5fa415568c11e7b31168c57ea11245048fb78c34688b65d5cca95bc0a90aeb18afa19fef0a575219441fbaccd SHA512 b7dcb4ce0eac894d6652be45fea981cb7ade47a739ad926a87aa41d8a34fa9deffc45f5718d1634f03fbedaba82a77005466fa83155dc433fed6a19f8a897c4d DIST rspec-mocks-3.6.0-git.tgz 189000 BLAKE2B d8fcc25983eeeafdba69bce80bccac2ff9b1e269b739bbd41a87f4839468fe5e4bd3298d2a63aa315d87422a9f30aaf1a776cb9b90ee1fd58ca05b5a08ea032e SHA512 42cc4870fde8eba0a6da7df4ab07e4d59c6447bb8f52e0172e7f231d47304c20c6e2edfceee698d5d344bb78384acbe3df4bb67de784cc24a63fae02ed1d4a7b @@ -5,5 +7,5 @@ DIST rspec-mocks-3.7.0-git.tgz 189170 BLAKE2B a0a622ac593660c673cd80b3f3caddd2ac EBUILD rspec-mocks-2.99.2.ebuild 1481 BLAKE2B 176b61ef790225e709c097f405e0435edfb2086cfb60e4fed339a9c5679a4f789e183bddb36f1ec29936e8a2ac352a2c643e320b5d95246f591c96613d9c1a14 SHA512 4f33a65b706610c88fa894ccc03f73fbb14e5f81a94718ae54e95f2aceff8f7f983e1137decf649d2adefaebdb5714d50f1220bd726cd201179c5e3003a382a2 EBUILD rspec-mocks-3.5.0.ebuild 1346 BLAKE2B 1799d6cba41bcc4cc28e1e1778020c52fafc6a16b7515f72cf31e7bb347007ab3a96c88aa71f121e31e3785fb63518324df72b90e6a0ac464727db2d3338e0b8 SHA512 40cae4ee52db2cfc0274c6961f32f654e9f09291c3a9410756f3dca4a1d42b32e0bf54cd8a83164b7f06cc57ba410aaef478390019e0d1d0b7a0630884cb2a48 EBUILD rspec-mocks-3.6.0.ebuild 1362 BLAKE2B 3fc2e04dcdb7dbcacbd5b6f0981fe90e0d54c5f200ab7c8fb4239052aa1e22443dda36cba957e1b9d85883b0469a03c47694e7a18ac75ec06f205468ba59393a SHA512 f49e16adab91e07ce5b38a1efe4d85c4a510946807d169e004d741fa9094df240ad2dc2733e1811bfd33227d21119b196b9e5f6568a04ade81ca019f2e1f8066 -EBUILD rspec-mocks-3.7.0.ebuild 1348 BLAKE2B 869b3e19b0ede06123590895b73b393c50cb32872e9f04a2855bd4f2bdaa22bc3d7155d6b59231f95281b079cf32936e2c613f7ff122c7bef7db1a8cb59c5324 SHA512 9c248315309e319cc55aa0b8f6f0b42b6f08e644ff1bca40362fb7bcf1183bdf6ed1319c6d3edee8a14383de9cc1c8ef11cd1775a4a0ad8e2e52167a4a8ad577 +EBUILD rspec-mocks-3.7.0.ebuild 1436 BLAKE2B f25095d08605676528048e7f28c3e5f91872d1f49f3075b147cf01edad4d212c0e09da4eeab6e1554220a015d4e1bd67596d44e93240971372fdff84ac16e639 SHA512 99818678324074efd4a4f2f8132dc4cad1de97dc19fc05d4e967362b47111b98375601835e03deec41bd024b626aaafaf7b42aca7966117c11b9a1ccf3f50ad5 MISC metadata.xml 343 BLAKE2B 87ebb52b322f698e5242c517ca646e64b3a9a33c6b76d968847b2224b4dd683a9eaae5d03470efe775d350c65e3bfbe16547d4b4b99e2744379fbb7c76cc5680 SHA512 c7956e0175d9fdbfd423140f3c757d4c9e1deb6089577f60d11111a93fde6a7c056dcbac8620c30c8c02693297402aa2f0710e43f60abc0878a51bcb8c624667 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 000000000000..6b545ae3cf7a --- /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 <myron.marston@gmail.com> +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 000000000000..3ac448938416 --- /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 <myron.marston@gmail.com> +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 d7c6b8dbc418..31797ab2b003 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*" |