summaryrefslogtreecommitdiff
path: root/dev-ruby/shoulda-context
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-10 13:02:42 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-10 13:02:42 +0000
commit8c8f1cfd2aa9e839aad7dad6fd43b370cfbc0a1e (patch)
treef7b0f94c13a0454ed75b614028f1455e894f28d2 /dev-ruby/shoulda-context
parent47f05d092ef8c19b3e973f62648e58c0e1a18631 (diff)
gentoo auto-resync : 10:01:2024 - 13:02:42
Diffstat (limited to 'dev-ruby/shoulda-context')
-rw-r--r--dev-ruby/shoulda-context/Manifest2
-rw-r--r--dev-ruby/shoulda-context/files/shoulda-context-2.0.0-file-exists.patch26
-rw-r--r--dev-ruby/shoulda-context/shoulda-context-2.0.0-r1.ebuild42
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-ruby/shoulda-context/Manifest b/dev-ruby/shoulda-context/Manifest
index 30e3ee10a12c..1a3400f8fc6e 100644
--- a/dev-ruby/shoulda-context/Manifest
+++ b/dev-ruby/shoulda-context/Manifest
@@ -1,5 +1,7 @@
+AUX shoulda-context-2.0.0-file-exists.patch 968 BLAKE2B 8b8210c86825dda93f9dd93711c374bd15bd9a9629d0b5d3f31802034beff71f11f3c46fd28455efa3a34e9bf2ab8274eea639710c570eedd5ccb23dd9e6918c SHA512 25a10a6448ae630a06faa7f2c4a98dce7d6148cc4e2e1761975c1d260cc3231ca3c4adb523c06d35847794efc4978ae042fbfe75aa98f2a3adc79ab38b77c522
DIST shoulda-context-1.2.2.gem 24064 BLAKE2B a6068da369c00a36e6056a8ebba96eca90efddf94613dfc90c9f2a47bec2c054a41fa61b861b2f3ec1195e417bdc54ab60d53f91bc5e0f167eac07b84880892b SHA512 b09f5ce2db59bbb26d5678b17b6641b79df7983d25e81a31bc10c42b702bdba09795b692d711d59c103beb2f691b503567e37c46668f77e600416551ef2c5e05
DIST shoulda-context-2.0.0.gem 34304 BLAKE2B b31f7e052b54fb60fb7fff84fc48beed406864b871f3c125db4f28d1ce0f400bb0ad3479d438d20a28f585b6e5da101b71228f598e6bdc177512f048273a8524 SHA512 c8d856a95b3dfe85fd92c79f18e03a2765ad219b83ab132017fefcffd0262b04bcebf267e6bbaec0ed3dff1d4d345bd74c1f9db1d2a22938ee8d85ee1078ac6e
EBUILD shoulda-context-1.2.2-r1.ebuild 859 BLAKE2B 62cb7a49ee03073a56aa47994661813869c8cf7234ea485d1d5c967a51afa870d6f4f7477919c979b3ca219b48c6e228dc98c44736badc3d1de2bf5a0c646ac8 SHA512 c12fabefa529d8c4b4b79d279d3d2ae45f7d30605de976b207f77b375efc4d5461d7cafa68b8579c96c6ac6673495bf52add1eff214b1705cebe560fd465010f
+EBUILD shoulda-context-2.0.0-r1.ebuild 1177 BLAKE2B ea6ff004d04b607b6631002dd074a1ea21c3e84bd209548f30da6e76c3f48becac0a0b31819b4bf569e4f422c92e4d06d9e63160c725fa6dd2ddff52a46edea0 SHA512 10aa17f6a2319628a082a558f2f55b2f7aad34e86dc88efa1d8486e883b350f1b17b64f0c8e8c84d3da695ccd0e9d073e43966b3bb6b0874d2761636bad5baea
EBUILD shoulda-context-2.0.0.ebuild 1120 BLAKE2B 28a66e13eda3058a3e722adf85b4b01847af0e31965bffa88778baa0aaff3fe2c1d776cc13563fd25ca49f8921a40ae7c10a5a4699a599dd6a062daff8dcb17d SHA512 454d8d4f805892218cf637c7ee3181bdd7d0d1002f6a57602f024b7ed52015a8cca7a656786e613838a1ce90ff5e863cc35e75d4089069268c0407e245d741e0
MISC metadata.xml 412 BLAKE2B cdab2c06a1407db99bd231afebddc4fd87361378cec2767b0b58c0da4fe7d3ceaa522b0a0dbede8ca496ca1840d37ac257de62f12135ffb6ea2922eac9160d84 SHA512 16fbc3b54f33c73173d09e5af860fb1e46c8498574b2f2b727e164052c8e813f25a6a75b541442469d961b515a52d5562157404136a8c00125e5c122f91a3003
diff --git a/dev-ruby/shoulda-context/files/shoulda-context-2.0.0-file-exists.patch b/dev-ruby/shoulda-context/files/shoulda-context-2.0.0-file-exists.patch
new file mode 100644
index 000000000000..78f7dfc3f0b5
--- /dev/null
+++ b/dev-ruby/shoulda-context/files/shoulda-context-2.0.0-file-exists.patch
@@ -0,0 +1,26 @@
+From ee3aeb239ea69c9a855d64e8c1cfda87958c833d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
+Date: Thu, 22 Dec 2022 15:03:17 +0100
+Subject: [PATCH] Use File.exist?
+
+`File.exists?` was deprecated while ago and removed in Ruby 3.2.
+
+https://bugs.ruby-lang.org/issues/17391
+https://github.com/ruby/ruby/pull/5352
+---
+ exe/convert_to_should_syntax | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/exe/convert_to_should_syntax b/exe/convert_to_should_syntax
+index d1264d07..ebdda984 100755
+--- a/exe/convert_to_should_syntax
++++ b/exe/convert_to_should_syntax
+@@ -31,7 +31,7 @@ usage("Temp directory '#{TMP}' is not valid. Set TMPDIR environment variable to
+
+ file = ARGV.shift
+ tmpfile = File.join(TMP, File.basename(file))
+-usage("File '#{file}' doesn't exist") unless File.exists?(file)
++usage("File '#{file}' doesn't exist") unless File.exist?(file)
+
+ FileUtils.cp(file, tmpfile)
+ contents = File.read(tmpfile)
diff --git a/dev-ruby/shoulda-context/shoulda-context-2.0.0-r1.ebuild b/dev-ruby/shoulda-context/shoulda-context-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..61cc12eb8528
--- /dev/null
+++ b/dev-ruby/shoulda-context/shoulda-context-2.0.0-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby31 ruby32 ruby33"
+
+RUBY_FAKEGEM_EXTRADOC="CONTRIBUTING.md README.md"
+
+RUBY_FAKEGEM_EXTRAINSTALL="tasks"
+
+# Don't install the conversion script to avoid collisions with older
+# shoulda.
+RUBY_FAKEGEM_BINWRAP=""
+
+inherit ruby-fakegem
+
+DESCRIPTION="Context framework extracted from Shoulda"
+HOMEPAGE="https://github.com/thoughtbot/shoulda-context"
+
+LICENSE="MIT"
+SLOT="$(ver_cut 1)"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="doc test"
+
+PATCHES=( "${FILESDIR}/${P}-file-exists.patch" )
+
+ruby_add_bdepend "test? ( dev-ruby/test-unit:2
+ >=dev-ruby/mocha-1.0 )"
+
+all_ruby_prepare() {
+ sed -e '/\(current_bundle\|CurrentBundle\)/ s:^:#:' \
+ -e '/pry-byebug/ s:^:#:' \
+ -e '/warnings_logger/ s:^:#: ; /WarningsLogger/,/^)/ s:^:#:' \
+ -e '/rails_application_with_shoulda_context/ s:^:#:' \
+ -i test/test_helper.rb || die
+ rm -f test/shoulda/{railtie,rerun_snippet,test_framework_detection}_test.rb || die
+}
+
+each_ruby_test() {
+ ${RUBY} -Ilib:test:. -e 'Dir["test/shoulda/*_test.rb"].each { require _1 }' || die
+}