BSD Ports

devel/rubygem-timecop 0.9.11 FreeBSD

Mock current time to test time-dependent code

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
MIT
Categories
devel, rubygems
Package size
10.1 KiB, 28.6 KiB installed

Description

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

In the other systems

SystemPortVersion
FreeBSDdevel/rubygem-timecop0.9.11
DragonFlydevel/rubygem-timecop0.9.10

Install

Binary package:

pkg install rubygem-timecop

From the ports tree:

cd /usr/ports/devel/rubygem-timecop/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	rubygem-timecop>0:devel/rubygem-timecop

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.9.110.9.110.9.60.9.100.9.11
FreeBSD:14:quarterly0.9.110.9.11n/a0.9.100.9.11
FreeBSD:15:latest0.9.110.9.11n/a0.9.100.9.10
FreeBSD:15:quarterly0.9.110.9.11n/an/an/a
FreeBSD:16:latest0.9.110.9.11n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 6
Run dependencies 6

No port depends on this one.

Configuration

No options to configure.

USES
gem
Service scripts
none

Files

distinfo 1
FileSizeSHA256
rubygem/timecop-0.9.11.gem1280041284dc6e5041f2184f781ace766f942108c842f8d8c1386a26e6343decc7542
Master sites 1
  • RG

Commit history 0

No commits in the history this site was built from.