Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2021 09:28:34 GMT
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c0a39d980d0f - main - devel/p5-Mock-MonkeyPatch: (NEW) Monkey patching with test mocking in mind
Message-ID:  <202107280928.16S9SY5N006196@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c0a39d980d0f1f2c72c4c00f6346c08acd949b60

commit c0a39d980d0f1f2c72c4c00f6346c08acd949b60
Author:     Sergei Vyshenski <svysh.fbsd@gmail.com>
AuthorDate: 2021-07-28 09:27:20 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
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 <svysh.fbsd@gmail.com>
+
+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 <bsd.port.mk>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107280928.16S9SY5N006196>