summaryrefslogtreecommitdiff
path: root/dev-ruby/rspec-mocks
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/rspec-mocks')
-rw-r--r--dev-ruby/rspec-mocks/Manifest11
-rw-r--r--dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-1.patch27
-rw-r--r--dev-ruby/rspec-mocks/files/rspec-mocks-3.7.0-ruby25-2.patch38
-rw-r--r--dev-ruby/rspec-mocks/metadata.xml11
-rw-r--r--dev-ruby/rspec-mocks/rspec-mocks-2.99.2.ebuild47
-rw-r--r--dev-ruby/rspec-mocks/rspec-mocks-3.5.0.ebuild46
-rw-r--r--dev-ruby/rspec-mocks/rspec-mocks-3.6.0.ebuild46
-rw-r--r--dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild48
8 files changed, 274 insertions, 0 deletions
diff --git a/dev-ruby/rspec-mocks/Manifest b/dev-ruby/rspec-mocks/Manifest
new file mode 100644
index 000000000000..d014112c1eb4
--- /dev/null
+++ b/dev-ruby/rspec-mocks/Manifest
@@ -0,0 +1,11 @@
+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
+DIST rspec-mocks-3.7.0-git.tgz 189170 BLAKE2B a0a622ac593660c673cd80b3f3caddd2ac389000f42a7ed1745e1fcfd28d1986e61e83c265d736f3ad0649531973719bc9c5f6ab07e289cb2da89c4482e64184 SHA512 8673726571ccf8a901281e44faeb25ffcb59579dc380138f0557cd9310192cd340081e5e8ad65ae281777727b502cca2f6877134b0fb48f2e0ea40b133002aff
+EBUILD rspec-mocks-2.99.2.ebuild 1532 BLAKE2B b8cf9d6afcc3f38d304daf6abd0610f4fad1e21f1985a01c906e476a35f50f129175fbe7e457509a7eb65f6a09cbca301deb84c9c70abfec23b48016e52d0356 SHA512 98dadc99f3a3bd894ccca1d2763526acb9754646e5b13fc471672d86a96efc10921742f626ef1090d6285faaf6e7f047abdeaee3217d681e7f4583b19ca774f5
+EBUILD rspec-mocks-3.5.0.ebuild 1346 BLAKE2B 1799d6cba41bcc4cc28e1e1778020c52fafc6a16b7515f72cf31e7bb347007ab3a96c88aa71f121e31e3785fb63518324df72b90e6a0ac464727db2d3338e0b8 SHA512 40cae4ee52db2cfc0274c6961f32f654e9f09291c3a9410756f3dca4a1d42b32e0bf54cd8a83164b7f06cc57ba410aaef478390019e0d1d0b7a0630884cb2a48
+EBUILD rspec-mocks-3.6.0.ebuild 1358 BLAKE2B 1303653f34f4f4cfc093d887996f56e86d270d606f56fca2b225a9bfa1155f8ea00b6ed17d4c9d1c5ffdcdd9bc26012b6144ee850c8fedcdb9e710e00e7b34fb SHA512 d10450c4b0ff2243c3c23f8306ed38a8f877e3a1478fae6c1deb82d8cdcea9f52457aadddf103d7b07e049a79483abde1e713cb886e78eefab91427b2e979729
+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/metadata.xml b/dev-ruby/rspec-mocks/metadata.xml
new file mode 100644
index 000000000000..d03bbc3db5c7
--- /dev/null
+++ b/dev-ruby/rspec-mocks/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ruby@gentoo.org</email>
+ <name>Gentoo Ruby Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">rspec/rspec-mocks</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-ruby/rspec-mocks/rspec-mocks-2.99.2.ebuild b/dev-ruby/rspec-mocks/rspec-mocks-2.99.2.ebuild
new file mode 100644
index 000000000000..b9d7f0820050
--- /dev/null
+++ b/dev-ruby/rspec-mocks/rspec-mocks-2.99.2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby22 ruby23 ruby24 ruby25"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec"
+
+RUBY_FAKEGEM_RECIPE_DOC="none"
+RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
+HOMEPAGE="http://rspec.rubyforge.org/"
+SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
+
+LICENSE="MIT"
+SLOT="2"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/rspec-core-2.10.0:2
+ >=dev-ruby/rspec-expectations-2.99.0:2
+ )"
+
+all_ruby_prepare() {
+ # Don't set up bundler: it doesn't understand our setup.
+ sed -i -e '/[Bb]undler/d' Rakefile || die
+
+ # Remove the Gemfile to avoid running through 'bundle exec'
+ rm Gemfile || die
+
+ # Remove .rspec options to avoid dependency on newer rspec when
+ # bootstrapping.
+ rm .rspec || die
+
+ # Avoid a weird, and failing, test testing already installed code.
+ sed -e '/has an up-to-date caller_filter file/,/end/ s:^:#:' -i spec/rspec/mocks_spec.rb || die
+
+ # Psych and Syck are not supported by default anymore on ruby22.
+ rm spec/rspec/mocks/serialization_spec.rb || die
+
+ sed -i -e '/does not affect the ability to access the top-level constant/,/end/ s:^:#:' spec/rspec/mocks/mutate_const_spec.rb || die
+}
diff --git a/dev-ruby/rspec-mocks/rspec-mocks-3.5.0.ebuild b/dev-ruby/rspec-mocks/rspec-mocks-3.5.0.ebuild
new file mode 100644
index 000000000000..a97a1bd3cac8
--- /dev/null
+++ b/dev-ruby/rspec-mocks/rspec-mocks-3.5.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+USE_RUBY="ruby20 ruby21 ruby22 ruby23"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_RECIPE_DOC="none"
+RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
+HOMEPAGE="https://github.com/rspec/rspec-mocks"
+SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
+
+LICENSE="MIT"
+SLOT="3"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+SUBVERSION="$(get_version_component_range 1-2)"
+
+ruby_add_rdepend "=dev-ruby/rspec-support-${SUBVERSION}*
+ >=dev-ruby/diff-lcs-1.2.0 =dev-ruby/diff-lcs-1*"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/rspec-core-3.3.0:3
+ >=dev-ruby/rspec-expectations-2.99.0:3
+ )"
+
+all_ruby_prepare() {
+ # Don't set up bundler: it doesn't understand our setup.
+ sed -i -e '/[Bb]undler/d' Rakefile || die
+
+ # Remove the Gemfile to avoid running through 'bundle exec'
+ rm Gemfile || die
+
+ # Remove .rspec options to avoid dependency on newer rspec when
+ # bootstrapping.
+ rm .rspec || die
+
+ sed -i -e '1irequire "spec_helper"' spec/rspec/mocks/any_instance_spec.rb || die
+}
diff --git a/dev-ruby/rspec-mocks/rspec-mocks-3.6.0.ebuild b/dev-ruby/rspec-mocks/rspec-mocks-3.6.0.ebuild
new file mode 100644
index 000000000000..1c003371c059
--- /dev/null
+++ b/dev-ruby/rspec-mocks/rspec-mocks-3.6.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby21 ruby22 ruby23 ruby24"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_RECIPE_DOC="none"
+RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
+HOMEPAGE="https://github.com/rspec/rspec-mocks"
+SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
+
+LICENSE="MIT"
+SLOT="3"
+KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~ppc ~ppc64 sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+SUBVERSION="$(get_version_component_range 1-2)"
+
+ruby_add_rdepend "=dev-ruby/rspec-support-${SUBVERSION}*
+ >=dev-ruby/diff-lcs-1.2.0 =dev-ruby/diff-lcs-1*"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/rspec-core-3.3.0:3
+ >=dev-ruby/rspec-expectations-2.99.0:3
+ )"
+
+all_ruby_prepare() {
+ # Don't set up bundler: it doesn't understand our setup.
+ sed -i -e '/[Bb]undler/d' Rakefile || die
+
+ # Remove the Gemfile to avoid running through 'bundle exec'
+ rm Gemfile || die
+
+ # Remove .rspec options to avoid dependency on newer rspec when
+ # bootstrapping.
+ rm .rspec || die
+
+ sed -i -e '1irequire "spec_helper"' spec/rspec/mocks/any_instance_spec.rb || die
+}
diff --git a/dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild b/dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild
new file mode 100644
index 000000000000..31797ab2b003
--- /dev/null
+++ b/dev-ruby/rspec-mocks/rspec-mocks-3.7.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+USE_RUBY="ruby22 ruby23 ruby24 ruby25"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec3"
+
+RUBY_FAKEGEM_RECIPE_DOC="none"
+RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A Behaviour Driven Development (BDD) framework for Ruby"
+HOMEPAGE="https://github.com/rspec/rspec-mocks"
+SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}-git.tgz"
+
+LICENSE="MIT"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+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*"
+
+ruby_add_bdepend "
+ test? (
+ >=dev-ruby/rspec-core-3.3.0:3
+ >=dev-ruby/rspec-expectations-2.99.0:3
+ )"
+
+all_ruby_prepare() {
+ # Don't set up bundler: it doesn't understand our setup.
+ sed -i -e '/[Bb]undler/d' Rakefile || die
+
+ # Remove the Gemfile to avoid running through 'bundle exec'
+ rm Gemfile || die
+
+ # Remove .rspec options to avoid dependency on newer rspec when
+ # bootstrapping.
+ rm .rspec || die
+
+ sed -i -e '1irequire "spec_helper"' spec/rspec/mocks/any_instance_spec.rb || die
+}