From owner-svn-ports-head@freebsd.org Mon Nov 14 06:24:07 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08E6EC3F5D6; Mon, 14 Nov 2016 06:24:07 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D78D21AD9; Mon, 14 Nov 2016 06:24:06 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAE6O64A025789; Mon, 14 Nov 2016 06:24:06 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAE6O5cv025784; Mon, 14 Nov 2016 06:24:05 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201611140624.uAE6O5cv025784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Mon, 14 Nov 2016 06:24:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r426085 - in head/devel: . p5-Test-MockDateTime X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Nov 2016 06:24:07 -0000 Author: pi Date: Mon Nov 14 06:24:05 2016 New Revision: 426085 URL: https://svnweb.freebsd.org/changeset/ports/426085 Log: New port: devel/p5-Test-MockDateTime Getting the current time sometimes is not very helpful for testing scenarios. Instead, if you could obtain a known value during the runtime of a testcase will make your results predictable. Why another Date Mocker? I wanted something simple with a very concise usage pattern and a mocked date should only exist and stay constant inside a scope. After leaving the scope the current time should be back. This lead to this tiny module. This simple module allows faking a given date and time for the runtime of a subsequent code block. By default the on keyword is exported into the namespace of the test file. The date to get mocked must be in a format that is recognized by DateTime::Format::DateParse. WWW: http://search.cpan.org/dist/Test-MockDateTime/ PR: 214397 Submitted by: Henk van Oers Added: head/devel/p5-Test-MockDateTime/ head/devel/p5-Test-MockDateTime/Makefile (contents, props changed) head/devel/p5-Test-MockDateTime/distinfo (contents, props changed) head/devel/p5-Test-MockDateTime/pkg-descr (contents, props changed) head/devel/p5-Test-MockDateTime/pkg-plist (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Mon Nov 14 06:19:30 2016 (r426084) +++ head/devel/Makefile Mon Nov 14 06:24:05 2016 (r426085) @@ -3320,6 +3320,7 @@ SUBDIR += p5-Test-Mock-Guard SUBDIR += p5-Test-Mock-LWP SUBDIR += p5-Test-Mock-LWP-Dispatch + SUBDIR += p5-Test-MockDateTime SUBDIR += p5-Test-MockModule SUBDIR += p5-Test-MockObject SUBDIR += p5-Test-MockRandom Added: head/devel/p5-Test-MockDateTime/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p5-Test-MockDateTime/Makefile Mon Nov 14 06:24:05 2016 (r426085) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +PORTNAME= Test-MockDateTime +PORTVERSION= 0.02 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= hvo.pm@xs4all.nl +COMMENT= Mock DateTime->now calls during tests + +LICENSE= ART10 GPLv1 +LICENSE_COMB= dual + +BUILD_DEPENDS= p5-DateTime-Format-DateParse>=0:devel/p5-DateTime-Format-DateParse +RUN_DEPENDS:= ${BUILD_DEPENDS} + +USES= perl5 +USE_PERL5= configure +NO_ARCH= yes + +.include Added: head/devel/p5-Test-MockDateTime/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p5-Test-MockDateTime/distinfo Mon Nov 14 06:24:05 2016 (r426085) @@ -0,0 +1,3 @@ +TIMESTAMP = 1478797177 +SHA256 (Test-MockDateTime-0.02.tar.gz) = c6370a58b9f291fc205121caf92a89865451d49559b0163a8dc7e606f34878dc +SIZE (Test-MockDateTime-0.02.tar.gz) = 9837 Added: head/devel/p5-Test-MockDateTime/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p5-Test-MockDateTime/pkg-descr Mon Nov 14 06:24:05 2016 (r426085) @@ -0,0 +1,19 @@ +Getting the current time sometimes is not very helpful +for testing scenarios. +Instead, if you could obtain a known value during the runtime +of a testcase will make your results predictable. + +Why another Date Mocker? +I wanted something simple with a very concise usage pattern +and a mocked date should only exist and stay constant inside a scope. +After leaving the scope the current time should be back. +This lead to this tiny module. + +This simple module allows faking a given date and time +for the runtime of a subsequent code block. +By default the on keyword is exported into the namespace +of the test file. +The date to get mocked must be in a format that is recognized +by DateTime::Format::DateParse. + +WWW: http://search.cpan.org/dist/Test-MockDateTime/ Added: head/devel/p5-Test-MockDateTime/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/p5-Test-MockDateTime/pkg-plist Mon Nov 14 06:24:05 2016 (r426085) @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Test/MockDateTime.pm +%%PERL5_MAN3%%/Test::MockDateTime.3.gz