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
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/rubygem-timecop | 0.9.11 |
| DragonFly | devel/rubygem-timecop | 0.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.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.9.11 | 0.9.11 | 0.9.6 | 0.9.10 | 0.9.11 |
| FreeBSD:14:quarterly | 0.9.11 | 0.9.11 | n/a | 0.9.10 | 0.9.11 |
| FreeBSD:15:latest | 0.9.11 | 0.9.11 | n/a | 0.9.10 | 0.9.10 |
| FreeBSD:15:quarterly | 0.9.11 | 0.9.11 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.9.11 | 0.9.11 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/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
| File | Size | SHA256 |
|---|---|---|
| rubygem/timecop-0.9.11.gem | 12800 | 41284dc6e5041f2184f781ace766f942108c842f8d8c1386a26e6343decc7542 |
Master sites 1
- RG
Commit history 0
No commits in the history this site was built from.