From nobody Fri Dec 30 09:08:03 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 4Njztq3mxqz2kbrw; Fri, 30 Dec 2022 09:08:03 +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 4Njztq2hQqz3qlh; Fri, 30 Dec 2022 09:08:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672391283; 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=eR3sWm+SAGqOaCCneA4LqDdP/hGZxmXARe2TxqZ6Txc=; b=tpaCkSZuNlUZdfNOo7cd5Rz/TKk10dDwGo9OMJAd/3Pr2YABCUK6w3PgGSnKDplLoNREdI RoNdJqBMyGpWhNaSOnAn/N7FVju8D9HfDIKwAEiqW/HI9vZQRoNUY5sAlrPzO9V0i9DBpZ NUdUzzoNLjlL7xoEzpsPTtifAmLjKUh3l45VFWxZBBscK2Fwa2CUWq0bX/z8TjexAeduVI 4oi56HKQyijfFsgZpGgM8HLU/oTX4Z4y4Tj3wv9MqIcYd28f8nTR5udADf8z2x7q3x6V4U zhbGtwgGVWa88ZPglhp2uIR9WSXmXDNsk/w82olJVZfoolX1jhV/s88jD4UaCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672391283; 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=eR3sWm+SAGqOaCCneA4LqDdP/hGZxmXARe2TxqZ6Txc=; b=suzYh08gTd40W/PhKYfqjkr6q9IHRug3q5yBw8o3UI21HmOqMltaqg/UOM75t0RDQxHrXm 9J8Lz8E3e6bo73UvPVcOccQrCCCoWOTX7+PwijRU4XdbTby43uJk4gXkrFxdjT1splNlxu ZKrmvMOWBCoTk4/mlnySmFf5U+G9Gt1ING+jRsmOmLWat49msDxHJhvb4ax4JStMPe4lZl jTJYOK3vfk6gYp/1lNpAabpS8XGZ8myfV2xWy1lDHEVF52SKuivGrLcXP1ax7gWePB4YBP 20zIQc6/sXTFbzqj26OLgEoVTbKFkY8GvLEbN6TRAhWgP85p2VEnixP72RtUMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672391283; a=rsa-sha256; cv=none; b=X30w7Ue1Ibf3GKrCDZ2tu7P9Gtf6uvlNDl1h22RGz8KYpMUbHn/7jJau9duzZT192iRXpl 2fvnFPWmctxVC6pEMVi68WP49SkhzDn4nHU7oLYMeWA5eMVyeU7a6fSmwfbV8qkeuY6PIG rbrqBbbgG7BmKHOkfTAQnK7BZ5hKs6sSHPlKqL5AR1Wj3cq9nY9zA8/IxUzbYDjnNYtXg7 RrmZ4Hs//tlLH3a96gGL4YxgtL0lw9ggDA8MDqYWNBS/QnbJlqtdQ0yEpZK0YDUKgZTweH 6ee7/WCiMChCh58sTBVLZ/EIfPUUe+PHJ0PRkYIOGepHWZhpMl+5pCRZkM2Ckg== 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 4Njztq1mjzz12pW; Fri, 30 Dec 2022 09:08:03 +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 2BU983i2099360; Fri, 30 Dec 2022 09:08:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BU983fI099359; Fri, 30 Dec 2022 09:08:03 GMT (envelope-from git) Date: Fri, 30 Dec 2022 09:08:03 GMT Message-Id: <202212300908.2BU983fI099359@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: bbe83034d6e1 - main - devel/rubygem-timecop: Add rubygem-timecop 0.9.6 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: bbe83034d6e153cba22337490cc965d54a8a3f3f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=bbe83034d6e153cba22337490cc965d54a8a3f3f commit bbe83034d6e153cba22337490cc965d54a8a3f3f Author: Po-Chuan Hsieh AuthorDate: 2022-12-30 08:36:23 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-12-30 09:04:02 +0000 devel/rubygem-timecop: Add rubygem-timecop 0.9.6 timecop is a gem providing "time travel" and "time freezing" capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call. Features: - Freeze time to a specific point. - Travel back to a specific point in time, but allow time to continue moving forward from there. - Scale time by a given scaling factor that will cause time to move at an accelerated pace. - No dependencies, can be used with any ruby project - Timecop api allows arguments to be passed into #freeze and #travel as one of the following: - Time instance - DateTime instance - Date instance - individual arguments (year, month, day, hour, minute, second) - a single integer argument that is interpreted as an offset in seconds from Time.now - Nested calls to Timecop#travel and Timecop#freeze are supported -- each block will maintain its interpretation of now. - Works with regular Ruby projects, and Ruby on Rails projects --- devel/Makefile | 1 + devel/rubygem-timecop/Makefile | 18 ++++++++++++++++++ devel/rubygem-timecop/distinfo | 3 +++ devel/rubygem-timecop/pkg-descr | 22 ++++++++++++++++++++++ 4 files changed, 44 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index e5e4d6e3cc6d..5fdd5d23f326 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -7109,6 +7109,7 @@ SUBDIR += rubygem-tilt SUBDIR += rubygem-tilt1 SUBDIR += rubygem-time + SUBDIR += rubygem-timecop SUBDIR += rubygem-timeliness SUBDIR += rubygem-timeout SUBDIR += rubygem-timers diff --git a/devel/rubygem-timecop/Makefile b/devel/rubygem-timecop/Makefile new file mode 100644 index 000000000000..7b4f524c481a --- /dev/null +++ b/devel/rubygem-timecop/Makefile @@ -0,0 +1,18 @@ +PORTNAME= timecop +PORTVERSION= 0.9.6 +CATEGORIES= devel rubygems +MASTER_SITES= RG + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Mock current time to test time-dependent code +WWW= https://github.com/travisjeffery/timecop + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= gem +USE_RUBY= yes + +#NO_ARCH= yes + +.include diff --git a/devel/rubygem-timecop/distinfo b/devel/rubygem-timecop/distinfo new file mode 100644 index 000000000000..81f763ba5209 --- /dev/null +++ b/devel/rubygem-timecop/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1669057523 +SHA256 (rubygem/timecop-0.9.6.gem) = cc8586a03284cf314db6f49a5ff41882b9435b1f40d96f4f3403c10ffa239d36 +SIZE (rubygem/timecop-0.9.6.gem) = 17408 diff --git a/devel/rubygem-timecop/pkg-descr b/devel/rubygem-timecop/pkg-descr new file mode 100644 index 000000000000..86a5757841c0 --- /dev/null +++ b/devel/rubygem-timecop/pkg-descr @@ -0,0 +1,22 @@ +timecop is a gem providing "time travel" and "time freezing" capabilities, +making it dead simple to test time-dependent code. It provides a unified method +to mock Time.now, Date.today, and DateTime.now in a single call. + +Features: +- Freeze time to a specific point. +- Travel back to a specific point in time, but allow time to continue moving + forward from there. +- Scale time by a given scaling factor that will cause time to move at an + accelerated pace. +- No dependencies, can be used with any ruby project +- Timecop api allows arguments to be passed into #freeze and #travel as one of + the following: + - Time instance + - DateTime instance + - Date instance + - individual arguments (year, month, day, hour, minute, second) + - a single integer argument that is interpreted as an offset in seconds from + Time.now +- Nested calls to Timecop#travel and Timecop#freeze are supported -- each block + will maintain its interpretation of now. +- Works with regular Ruby projects, and Ruby on Rails projects