From owner-dev-commits-ports-all@freebsd.org Wed Jul 28 09:28:34 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B1DEE65789A; Wed, 28 Jul 2021 09:28:34 +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 4GZSyV4bwLz4gBF; Wed, 28 Jul 2021 09:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 8240C1B922; Wed, 28 Jul 2021 09:28:34 +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 16S9SYOs006197; Wed, 28 Jul 2021 09:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16S9SY5N006196; Wed, 28 Jul 2021 09:28:34 GMT (envelope-from git) Date: Wed, 28 Jul 2021 09:28:34 GMT Message-Id: <202107280928.16S9SY5N006196@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Li-Wen Hsu Subject: git: c0a39d980d0f - main - devel/p5-Mock-MonkeyPatch: (NEW) Monkey patching with test mocking in mind MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0a39d980d0f1f2c72c4c00f6346c08acd949b60 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2021 09:28:34 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=c0a39d980d0f1f2c72c4c00f6346c08acd949b60 commit c0a39d980d0f1f2c72c4c00f6346c08acd949b60 Author: Sergei Vyshenski AuthorDate: 2021-07-28 09:27:20 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-28 09:27:20 +0000 devel/p5-Mock-MonkeyPatch: (NEW) Monkey patching with test mocking in mind PR: 257466 --- devel/Makefile | 1 + devel/p5-Mock-MonkeyPatch/Makefile | 25 +++++++++++++++++++++++++ devel/p5-Mock-MonkeyPatch/distinfo | 3 +++ devel/p5-Mock-MonkeyPatch/pkg-descr | 12 ++++++++++++ devel/p5-Mock-MonkeyPatch/pkg-plist | 2 ++ 5 files changed, 43 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 1f1e02792982..da57957d26f0 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2737,6 +2737,7 @@ SUBDIR += p5-Mixin-Linewise SUBDIR += p5-Mknod SUBDIR += p5-Mo + SUBDIR += p5-Mock-MonkeyPatch SUBDIR += p5-Mock-Quick SUBDIR += p5-Module-Build SUBDIR += p5-Module-Build-Convert diff --git a/devel/p5-Mock-MonkeyPatch/Makefile b/devel/p5-Mock-MonkeyPatch/Makefile new file mode 100644 index 000000000000..8363fe73499e --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/Makefile @@ -0,0 +1,25 @@ +# Created by: Sergei Vyshenski + +PORTNAME= Mock-MonkeyPatch +PORTVERSION= 1.02 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +MASTER_SITE_SUBDIR= CPAN:JBERGER +PKGNAMEPREFIX= p5- + +MAINTAINER= svysh.fbsd@gmail.com +COMMENT= Monkey patching with test mocking in mind + +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= p5-Scalar-List-Utils>=1.56:lang/p5-Scalar-List-Utils + +USES= perl5 +USE_PERL5= modbuildtiny + +NO_ARCH= yes + +.include diff --git a/devel/p5-Mock-MonkeyPatch/distinfo b/devel/p5-Mock-MonkeyPatch/distinfo new file mode 100644 index 000000000000..48ed3b3e06e8 --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1627428368 +SHA256 (Mock-MonkeyPatch-1.02.tar.gz) = c5b6944ca54fe8355737673060ed4e9ef8723726577d796e1cae5e56bf1b0181 +SIZE (Mock-MonkeyPatch-1.02.tar.gz) = 15294 diff --git a/devel/p5-Mock-MonkeyPatch/pkg-descr b/devel/p5-Mock-MonkeyPatch/pkg-descr new file mode 100644 index 000000000000..b11db0b41287 --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/pkg-descr @@ -0,0 +1,12 @@ +Mocking is a common tool, especially for testing. By strategically +replacing a subroutine, one can isolate segments (units) of code to +test individually. When this is done it is important to know that the +mocked sub was actually called and with what arguments it was called. + +Mock::MonkeyPatch injects a subroutine in the place of an existing one. +It returns an object by which you can revisit the manner in which the +mocked subroutine was called. Further when the object goes out of scope +(or when the "restore" method is called) the original subroutine is +replaced. + +WWW: https://metacpan.org/dist/Mock-MonkeyPatch diff --git a/devel/p5-Mock-MonkeyPatch/pkg-plist b/devel/p5-Mock-MonkeyPatch/pkg-plist new file mode 100644 index 000000000000..05d22bd48c58 --- /dev/null +++ b/devel/p5-Mock-MonkeyPatch/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Mock/MonkeyPatch.pm +%%PERL5_MAN3%%/Mock::MonkeyPatch.3.gz