From nobody Sat Aug 27 10:30:57 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MFCf969Jfz4b4nC; Sat, 27 Aug 2022 10:30:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MFCf95RtZz3xlt; Sat, 27 Aug 2022 10:30:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661596257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVAmjQknMRpkd+FgJ2rcOvdCmRZi0DN5Krn0HCtpPOo=; b=Tvboa3F9ptdG1cTtJtxBaRH6IaCEIDCoPxc56CKxwR6Jj5lHnw/iJ3KYLI2ln1LlsXYWYC MAfMcR3nlbRjmcCyk7lWhVMMmBOvwSxZkXXIPE8QFlcP8X8EqnuWTuU2P2FX/vLYdz1BVh T5FFjdtahYsdy/jGRwGUQ8M0fjXIotzHrYIKQUe2JqOlrTeS9Qy0L6dQ+fUor861Gt/+Dl e7sS2k4b5O7BiI/QxUF6biyjCNu7E4KirZ8GdYTWSSyis1Akl32ND2fNGAKt9B0X1fv4KA lMjwFQ7XFx6MZWvncQwy2WD+o58yahHiXt1r3Ssq8lpmRjLhT5Q7dJ0i992qsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MFCf94RC7zjls; Sat, 27 Aug 2022 10:30:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27RAUvGA047452; Sat, 27 Aug 2022 10:30:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27RAUvaA047451; Sat, 27 Aug 2022 10:30:57 GMT (envelope-from git) Date: Sat, 27 Aug 2022 10:30:57 GMT Message-Id: <202208271030.27RAUvaA047451@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: ebc424519cae - main - devel/rubygem-cow_proxy: Add rubygem-cow_proxy 0.3.3 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebc424519cae062d25d749216e8e626b109e186a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661596257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVAmjQknMRpkd+FgJ2rcOvdCmRZi0DN5Krn0HCtpPOo=; b=A7qTGo8YO0N/foMv5RcPk0vSmnnf9qsp+X2Hvs8BVAueRX1KKj4zLSrVUCFtwZcJvAmeyQ rnCt/k3XaPaiA+LIVeE5m0cBuHtAIYExhXWfdOHcTs4jWVHnnV//hP1OY7GwKXzIz2BsVw EjGtMW2TZGTtvfTIuGvIPSLlaMG+VW0KZbVVo+qN0gMBNxRxEXNCabsMr1/UbLREGBtxjN obIFqJf3lJLDYGP+nN8Oo3MxTRcqS74D4x85mBi21SkUtLBuw3+qJccFxjMwDj/eQIyZ3n Nyr01gJHkVuQMQ3Sj+hx8eMf09voRk8a+jzBD0wQmqk8VGqFiT/gNQ6wk4d7HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661596257; a=rsa-sha256; cv=none; b=uuT3U4jkw2OeI5Q1/7giei6XvTY9oOj9PNtEY/azbI4chK5NcU7SBqAQ7cRvu6uiKUk3lp FixPHcbugOY30KrLa6QW46oG/ICv4k3WuCiSO2uJhBeLPoy7iP2DjDjwy0BvU6CqmybhHf T7SUczUEkmmh+Nu3EURNf26jIEajN5HJAeJb4yy9E6jCfpxaTG0QEdCFRJ+rhTuN2SNh86 2KvBvSgipzFGSDve4RmYlPqJiIrfXufh7MI6adhKPGOKl8bxEycEaG3DGtaiN8wJrhXD2C jPraU1CND1z/jFvc28rHT/pB5fKRKLoevcL0WRWvy/MyHAlEZ8gNJl9z0e4VUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=ebc424519cae062d25d749216e8e626b109e186a commit ebc424519cae062d25d749216e8e626b109e186a Author: Po-Chuan Hsieh AuthorDate: 2022-08-27 10:10:49 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-08-27 10:10:49 +0000 devel/rubygem-cow_proxy: Add rubygem-cow_proxy 0.3.3 This is a copy-on-write proxy for frozen Ruby objects, so duplicating frozen object is delayed until a method tries to change frozen object. CowProxy classes for array, hash, string and struct are provided. Objects from other classes will be proxied without copy-on-write, you have to create a CowProxy class for them to enable copy-on-write. Also you have to create CowProxy class for each object which have any getter method with arguments, because default CowProxy won't wrap returned value. Immutable classes such as Integer or TrueClass doesn't need copy-on-write proxy because they can't be changed. You can wrap every object in a proxy. Proxy will always send method calls to wrapped object, and wrap returned value with a CowProxy class if method has no argument, so a proxy will always return proxy objects for getters without arguments. When a method tries to change a frozen object, if proxy has copy-on-write enabled, it will duplicate frozen object and will send next method calls to duplicated object, in other case an exception is raised. WWW: https://github.com/activescaffold/cow_proxy --- devel/Makefile | 1 + devel/rubygem-cow_proxy/Makefile | 17 +++++++++++++++++ devel/rubygem-cow_proxy/distinfo | 3 +++ devel/rubygem-cow_proxy/pkg-descr | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index c85fb2f7f9e6..b9ba43e97853 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -6316,6 +6316,7 @@ SUBDIR += rubygem-corefines SUBDIR += rubygem-cork SUBDIR += rubygem-countries + SUBDIR += rubygem-cow_proxy SUBDIR += rubygem-crack SUBDIR += rubygem-cri SUBDIR += rubygem-csv diff --git a/devel/rubygem-cow_proxy/Makefile b/devel/rubygem-cow_proxy/Makefile new file mode 100644 index 000000000000..cd6c8e9684d1 --- /dev/null +++ b/devel/rubygem-cow_proxy/Makefile @@ -0,0 +1,17 @@ +PORTNAME= cow_proxy +PORTVERSION= 0.3.3 +CATEGORIES= devel rubygems +MASTER_SITES= RG + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Copy-on-write proxy for frozen Ruby objects + +LICENSE= MIT +#LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= gem +USE_RUBY= yes + +NO_ARCH= yes + +.include diff --git a/devel/rubygem-cow_proxy/distinfo b/devel/rubygem-cow_proxy/distinfo new file mode 100644 index 000000000000..a3b52b475049 --- /dev/null +++ b/devel/rubygem-cow_proxy/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1660576710 +SHA256 (rubygem/cow_proxy-0.3.3.gem) = 705b307b714005366a64ce3ec15d5219cdfae0966a46fa4cf075d011bcc8618c +SIZE (rubygem/cow_proxy-0.3.3.gem) = 11264 diff --git a/devel/rubygem-cow_proxy/pkg-descr b/devel/rubygem-cow_proxy/pkg-descr new file mode 100644 index 000000000000..d4e2fd1afba3 --- /dev/null +++ b/devel/rubygem-cow_proxy/pkg-descr @@ -0,0 +1,19 @@ +This is a copy-on-write proxy for frozen Ruby objects, so duplicating frozen +object is delayed until a method tries to change frozen object. + +CowProxy classes for array, hash, string and struct are provided. Objects from +other classes will be proxied without copy-on-write, you have to create a +CowProxy class for them to enable copy-on-write. Also you have to create +CowProxy class for each object which have any getter method with arguments, +because default CowProxy won't wrap returned value. Immutable classes such as +Integer or TrueClass doesn't need copy-on-write proxy because they can't be +changed. + +You can wrap every object in a proxy. Proxy will always send method calls to +wrapped object, and wrap returned value with a CowProxy class if method has no +argument, so a proxy will always return proxy objects for getters without +arguments. When a method tries to change a frozen object, if proxy has +copy-on-write enabled, it will duplicate frozen object and will send next method +calls to duplicated object, in other case an exception is raised. + +WWW: https://github.com/activescaffold/cow_proxy