summaryrefslogtreecommitdiff
path: root/dev-ruby/sus-fixtures-async
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-04-03 05:19:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-04-03 05:19:36 +0100
commit155cc74ccaea367efa88c8acfadcf25cb7dfe89c (patch)
tree7c071f2c978804bd5ad135f096c2c1849d338b6f /dev-ruby/sus-fixtures-async
parentd288197c01703f58dbea0ff4f42b01e7c4c6f327 (diff)
gentoo auto-resync : 03:04:2023 - 05:19:36
Diffstat (limited to 'dev-ruby/sus-fixtures-async')
-rw-r--r--dev-ruby/sus-fixtures-async/Manifest4
-rw-r--r--dev-ruby/sus-fixtures-async/files/sus-fixtures-async-0.1.1-tests-require.patch43
-rw-r--r--dev-ruby/sus-fixtures-async/metadata.xml11
-rw-r--r--dev-ruby/sus-fixtures-async/sus-fixtures-async-0.1.1.ebuild37
4 files changed, 95 insertions, 0 deletions
diff --git a/dev-ruby/sus-fixtures-async/Manifest b/dev-ruby/sus-fixtures-async/Manifest
new file mode 100644
index 000000000000..c8891415bb5e
--- /dev/null
+++ b/dev-ruby/sus-fixtures-async/Manifest
@@ -0,0 +1,4 @@
+AUX sus-fixtures-async-0.1.1-tests-require.patch 1988 BLAKE2B f07df7e49fef9b3c27125c0f08c81c95b8357a2f61b78355d4b85b30304d19ea697016e70337784b901fccdc51ad217bf34b096eb8fe2e1e48baff377c69945f SHA512 3d8857421b3e278cda79d085af52c1c70e6d7a215bf52f446b5f9160e007a754f29e41ff6304882a97d601abb7b06c3c0a14b86bfef459bfeb62b1e9f3ae4030
+DIST sus-fixtures-async-0.1.1.tar.gz 5017 BLAKE2B f293d9fe336b05e510a82c4337250f48b871eab8c38b7d9587a6402d19689197eb6a2b1f7f14e7b5823246b6f14d104e7e49f14f84a980392dd545543ffcd733 SHA512 cca073491d143b0ceaff34ada08d416ea43a035bc887c6dec02f62372724d891f47e9dfa8d749f6e485e7d14da8c395dc67185ed0a91d9ea0eb5466d3164c378
+EBUILD sus-fixtures-async-0.1.1.ebuild 932 BLAKE2B 729fbaea14c20b435b7ffdb07b6055824fadd2f6fe8febf7ef85ec959b7b9590525409151ef30dbe95ddcdbd55a788930a2377eff0d91a0bd4839b92ed23d730 SHA512 c4b9763bd47f509d68d0200f36fcb961fd87980b32c8c2d3d259756a3e2e59f0e02f2f68d8598b104cd0739d6c454ba0a06f98b1f2d5e655648c8dc75bc0fdeb
+MISC metadata.xml 354 BLAKE2B 2ee34480d520d59ceeb669e41cd1ee41d0723efb47099fbfea640ef1c051c0c3cfe81763b2d0a3c59097b27a30c04f6000e19f6536fb3bfbb2fdc9077217557f SHA512 3be0ebf3c83c72884674a512375a691ba9663e0216b1f0912616f5e8b3d814eb1eafa757c0444b925355e407e60c779400728041c6b12a43801e4df802c42172
diff --git a/dev-ruby/sus-fixtures-async/files/sus-fixtures-async-0.1.1-tests-require.patch b/dev-ruby/sus-fixtures-async/files/sus-fixtures-async-0.1.1-tests-require.patch
new file mode 100644
index 000000000000..af89916b7c5f
--- /dev/null
+++ b/dev-ruby/sus-fixtures-async/files/sus-fixtures-async-0.1.1-tests-require.patch
@@ -0,0 +1,43 @@
+https://github.com/socketry/sus-fixtures-async/pull/2
+
+From 3d3a1016c1718a8a5eca6ee76cd65d88a66e2481 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 3 Apr 2023 00:36:26 +0100
+Subject: [PATCH] test: Fix version require
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When running e.g. 'ruby32 -S sus', I had:
+```
+🔥 Errored assertions:
+file test/sus/fixtures/async.rb:8
+ âš  NameError: uninitialized constant Sus::Fixtures::Async::VERSION
+ test/sus/fixtures/async.rb:8 block in <top (required)>
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/file.rb:10 class_eval
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/file.rb:10 block in <top (required)>
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/file.rb:39 build
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/file.rb:105 file
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/registry.rb:50 load_file
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/registry.rb:45 load
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/config.rb:95 block in load_registry
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/config.rb:94 each
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/config.rb:94 load_registry
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/lib/sus/config.rb:82 registry
+ /usr/lib64/ruby/gems/3.2.0/gems/sus-0.20.3/bin/sus:10 <top (required)>
+ /usr/bin/sus:9 load
+ /usr/bin/sus:9 <main>
+```
+
+It turns out we're missing a direct require, so chuck it in.
+--- a/test/sus/fixtures/async.rb
++++ b/test/sus/fixtures/async.rb
+@@ -4,6 +4,7 @@
+ # Copyright, 2022, by Samuel Williams.
+
+ require 'sus/fixtures/async'
++require 'sus/fixtures/async/version'
+
+ describe Sus::Fixtures::Async::VERSION do
+ it 'is a version string' do
+
diff --git a/dev-ruby/sus-fixtures-async/metadata.xml b/dev-ruby/sus-fixtures-async/metadata.xml
new file mode 100644
index 000000000000..8b415315d6d1
--- /dev/null
+++ b/dev-ruby/sus-fixtures-async/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://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">socketry/sus-fixtures-async</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-ruby/sus-fixtures-async/sus-fixtures-async-0.1.1.ebuild b/dev-ruby/sus-fixtures-async/sus-fixtures-async-0.1.1.ebuild
new file mode 100644
index 000000000000..86447527d3cc
--- /dev/null
+++ b/dev-ruby/sus-fixtures-async/sus-fixtures-async-0.1.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
+
+RUBY_FAKEGEM_EXTRADOC="readme.md"
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+RUBY_FAKEGEM_RECIPE_TEST="sus"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Convenient fixture for testing async components in a reactor"
+HOMEPAGE="https://github.com/socketry/sus-fixtures-async"
+SRC_URI="https://github.com/socketry/sus-fixtures-async/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc"
+
+ruby_add_rdepend "
+ dev-ruby/async
+ dev-ruby/sus
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.1.1-tests-require.patch
+)
+
+all_ruby_prepare() {
+ sed -i -E 's/require_relative "(.+)"/require File.expand_path("\1")/g' "${RUBY_FAKEGEM_GEMSPEC}" || die
+
+ # Remove the sus configuration which enabled coverage checks.
+ # Its dependency is not packaged.
+ rm -f config/sus.rb || die
+}