timecop-rspec 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +36 -2
- data/CONTRIBUTING.md +1 -3
- data/README.md +39 -13
- data/checksums/timecop-rspec-1.0.2.gem.sha256 +1 -0
- data/checksums/timecop-rspec-1.0.2.gem.sha512 +1 -0
- data/checksums/timecop-rspec-1.0.3.gem.sha256 +1 -0
- data/checksums/timecop-rspec-1.0.3.gem.sha512 +1 -0
- data/lib/timecop/rspec/version.rb +1 -1
- data.tar.gz.sig +2 -1
- metadata +53 -140
- metadata.gz.sig +0 -0
- data/.devcontainer/devcontainer.json +0 -26
- data/.env.local.example +0 -3
- data/.envrc +0 -41
- data/.github/FUNDING.yml +0 -13
- data/.github/dependabot.yml +0 -12
- data/.github/workflows/ancient.yml +0 -77
- data/.github/workflows/auto-assign.yml +0 -21
- data/.github/workflows/codeql-analysis.yml +0 -70
- data/.github/workflows/coverage.yml +0 -126
- data/.github/workflows/current.yml +0 -85
- data/.github/workflows/dependency-review.yml +0 -20
- data/.github/workflows/deps_locked.yml +0 -75
- data/.github/workflows/deps_unlocked.yml +0 -84
- data/.github/workflows/discord-notifier.yml +0 -38
- data/.github/workflows/heads.yml +0 -84
- data/.github/workflows/jruby.yml +0 -75
- data/.github/workflows/legacy.yml +0 -67
- data/.github/workflows/style.yml +0 -64
- data/.github/workflows/supported.yml +0 -82
- data/.github/workflows/truffle.yml +0 -75
- data/.github/workflows/unsupported.yml +0 -75
- data/.gitignore +0 -45
- data/.gitlab-ci.yml +0 -44
- data/.idea/.gitignore +0 -8
- data/.idea/GitLink.xml +0 -6
- data/.idea/misc.xml +0 -4
- data/.idea/modules.xml +0 -8
- data/.idea/timecop-rspec.iml +0 -122
- data/.idea/vcs.xml +0 -6
- data/.junie/TASK_NOTE.md +0 -1
- data/.junie/guidelines.md +0 -139
- data/.qlty/qlty.toml +0 -79
- data/.rspec +0 -8
- data/.rubocop.yml +0 -15
- data/.rubocop_gradual.lock +0 -76
- data/.simplecov +0 -11
- data/.tool-versions +0 -1
- data/.yard_gfm_support.rb +0 -22
- data/.yardopts +0 -11
- data/Appraisal.root.gemfile +0 -12
- data/Appraisals +0 -104
- data/CNAME +0 -1
- data/Gemfile +0 -38
- data/Gemfile.lock +0 -293
- data/Rakefile +0 -287
- data/bin/appraisal +0 -16
- data/bin/bundle-audit +0 -16
- data/bin/bundler-audit +0 -16
- data/bin/code_climate_reek +0 -16
- data/bin/coderay +0 -16
- data/bin/console +0 -12
- data/bin/erb +0 -16
- data/bin/gem_checksums +0 -16
- data/bin/htmldiff +0 -16
- data/bin/irb +0 -16
- data/bin/kramdown +0 -16
- data/bin/ldiff +0 -16
- data/bin/nokogiri +0 -16
- data/bin/pry +0 -16
- data/bin/racc +0 -16
- data/bin/rake +0 -16
- data/bin/rdbg +0 -16
- data/bin/rdoc +0 -16
- data/bin/reek +0 -16
- data/bin/ri +0 -16
- data/bin/rspec +0 -16
- data/bin/rubocop +0 -16
- data/bin/rubocop-gradual +0 -16
- data/bin/ruby-parse +0 -16
- data/bin/ruby-rewrite +0 -16
- data/bin/setup +0 -7
- data/bin/standardrb +0 -16
- data/bin/thor +0 -16
- data/bin/yard +0 -16
- data/bin/yard-junk +0 -16
- data/bin/yardoc +0 -16
- data/bin/yri +0 -16
- data/certs/pboling.pem +0 -27
- data/docs/Timecop/Rspec/ExampleDecorator.html +0 -626
- data/docs/Timecop/Rspec/SequentialTimeMachine.html +0 -338
- data/docs/Timecop/Rspec/TimeMachine.html +0 -357
- data/docs/Timecop/Rspec/TravelLog.html +0 -440
- data/docs/Timecop/Rspec/Traveler.html +0 -353
- data/docs/Timecop/Rspec/Version.html +0 -154
- data/docs/Timecop/Rspec.html +0 -476
- data/docs/Timecop.html +0 -143
- data/docs/_index.html +0 -224
- data/docs/class_list.html +0 -54
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -503
- data/docs/file.CHANGELOG.html +0 -110
- data/docs/file.CITATION.html +0 -92
- data/docs/file.CODE_OF_CONDUCT.html +0 -201
- data/docs/file.CONTRIBUTING.html +0 -220
- data/docs/file.LICENSE.html +0 -70
- data/docs/file.README.html +0 -531
- data/docs/file.REEK.html +0 -71
- data/docs/file.RUBOCOP.html +0 -171
- data/docs/file.SECURITY.html +0 -101
- data/docs/file.rspec.html +0 -109
- data/docs/file.timecop-rspec-1.0.0.gem.html +0 -71
- data/docs/file.timecop.html +0 -72
- data/docs/file_list.html +0 -119
- data/docs/frames.html +0 -22
- data/docs/index.html +0 -531
- data/docs/js/app.js +0 -344
- data/docs/js/full_list.js +0 -242
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -198
- data/docs/top-level-namespace.html +0 -110
- data/gemfiles/audit.gemfile +0 -10
- data/gemfiles/coverage.gemfile +0 -10
- data/gemfiles/current.gemfile +0 -8
- data/gemfiles/deps_unlocked.gemfile +0 -13
- data/gemfiles/head.gemfile +0 -9
- data/gemfiles/modular/audit.gemfile +0 -5
- data/gemfiles/modular/coverage.gemfile +0 -6
- data/gemfiles/modular/documentation.gemfile +0 -11
- data/gemfiles/modular/style.gemfile +0 -14
- data/gemfiles/ruby_2_3.gemfile +0 -5
- data/gemfiles/ruby_2_4.gemfile +0 -5
- data/gemfiles/ruby_2_5.gemfile +0 -5
- data/gemfiles/ruby_2_6.gemfile +0 -8
- data/gemfiles/ruby_2_7.gemfile +0 -8
- data/gemfiles/ruby_3_0.gemfile +0 -8
- data/gemfiles/ruby_3_1.gemfile +0 -8
- data/gemfiles/ruby_3_2.gemfile +0 -8
- data/gemfiles/ruby_3_3.gemfile +0 -8
- data/gemfiles/style.gemfile +0 -10
- data/timecop-rspec.gemspec +0 -146
data/docs/file.README.html
DELETED
@@ -1,531 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="UTF-8">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
File: README
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.37
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
-
|
17
|
-
<script type="text/javascript">
|
18
|
-
pathId = "README";
|
19
|
-
relpath = '';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="file_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="_index.html">Index</a> »
|
40
|
-
<span class="title">File: README</span>
|
41
|
-
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<div id="search">
|
45
|
-
|
46
|
-
<a class="full_list_link" id="class_list_link"
|
47
|
-
href="class_list.html">
|
48
|
-
|
49
|
-
<svg width="24" height="24">
|
50
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
51
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
52
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
</svg>
|
54
|
-
</a>
|
55
|
-
|
56
|
-
</div>
|
57
|
-
<div class="clear"></div>
|
58
|
-
</div>
|
59
|
-
|
60
|
-
<div id="content"><div id='filecontents'><p><a href="https://discord.gg/3qme4XHNKN"><img src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-192px.svg" alt="Galtzo FLOSS Logo by Aboling0, CC BY-SA 4.0"></a> <a href="https://www.ruby-lang.org/"><img src="https://logos.galtzo.com/assets/images/ruby-lang/avatar-192px.svg" alt="ruby-lang Logo, Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5"></a> <a href="https://github.com/galtzo-floss/timecop-rspec"><img src="https://logos.galtzo.com/assets/images/galtzo-floss/timecop-rspec/avatar-192px.svg" alt="timecop-rspec Logo by Aboling0, CC BY-SA 4.0"></a></p>
|
61
|
-
|
62
|
-
<h1 id="️-timecoprspec">⌚️ Timecop::Rspec</h1>
|
63
|
-
|
64
|
-
<p><a href="https://rubygems.org/gems/timecop-rspec"><img src="https://img.shields.io/gem/v/timecop-rspec.svg" alt="Version"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-259D6C.svg" alt="License: MIT"></a> <a href="https://rubygems.org/gems/timecop-rspec"><img src="https://img.shields.io/gem/rd/timecop-rspec.svg" alt="Downloads Rank"></a> <a href="https://www.codetriage.com/galtzo-floss/timecop-rspec"><img src="https://www.codetriage.com/galtzo-floss/timecop-rspec/badges/users.svg" alt="Open Source Helpers"></a> <a href="https://coveralls.io/github/galtzo-floss/timecop-rspec?branch=main"><img src="https://coveralls.io/repos/github/galtzo-floss/timecop-rspec/badge.svg?branch=main" alt="Coveralls Test Coverage"></a> <a href="https://codecov.io/gh/galtzo-floss/timecop-rspec"><img src="https://codecov.io/gh/galtzo-floss/timecop-rspec/graph/badge.svg?token=6XnuK8rocd" alt="CodeCov Test Coverage"></a> <a href="https://qlty.sh/gh/galtzo-floss/projects/timecop-rspec/metrics/code?sort=coverageRating"><img src="https://qlty.sh/gh/galtzo-floss/projects/timecop-rspec/coverage.svg" alt="QLTY Test Coverage"></a> <a href="https://qlty.sh/gh/galtzo-floss/projects/timecop-rspec"><img src="https://qlty.sh/gh/galtzo-floss/projects/timecop-rspec/maintainability.svg" alt="QLTY Maintainability"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/heads.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/heads.yml/badge.svg" alt="CI Heads"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/current.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/current.yml/badge.svg" alt="CI Current"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/truffle.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/truffle.yml/badge.svg" alt="CI Truffle Ruby"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/jruby.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/jruby.yml/badge.svg" alt="CI JRuby"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/deps_locked.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/deps_locked.yml/badge.svg" alt="Deps Locked"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/deps_unlocked.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/deps_unlocked.yml/badge.svg" alt="Deps Unlocked"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/supported.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/supported.yml/badge.svg" alt="CI Supported"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/legacy.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/legacy.yml/badge.svg" alt="CI Legacy"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/unsupported.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/unsupported.yml/badge.svg" alt="CI Unsupported"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/ancient.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/ancient.yml/badge.svg" alt="CI Ancient"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/coverage.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/coverage.yml/badge.svg" alt="CI Test Coverage"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/style.yml"><img src="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/style.yml/badge.svg" alt="CI Style"></a></p>
|
65
|
-
|
66
|
-
<hr>
|
67
|
-
|
68
|
-
<p><a href="https://liberapay.com/pboling/donate"><img src="https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611" alt="Liberapay Goal Progress"></a> <a href="https://github.com/sponsors/pboling"><img src="https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github" alt="Sponsor Me on Github"></a> <a href="https://www.buymeacoffee.com/pboling"><img src="https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat" alt="Buy me a coffee"></a> <a href="https://polar.sh/pboling"><img src="https://img.shields.io/badge/polar-donate-a51611.svg" alt="Donate on Polar"></a> <a href="https://ko-fi.com/O5O86SNP4"><img src="https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg" alt="Donate to my FLOSS or refugee efforts at ko-fi.com"></a> <a href="https://patreon.com/galtzo"><img src="https://img.shields.io/badge/patreon-donate-a51611.svg" alt="Donate to my FLOSS or refugee efforts using Patreon"></a></p>
|
69
|
-
|
70
|
-
<h2 id="-synopsis">🌻 Synopsis</h2>
|
71
|
-
|
72
|
-
<p><a href="https://github.com/avantoss/timecop-rspec">Timecop::Rspec</a> provides <a href="https://github.com/travisjeffery/timecop">Timecop</a> time-machines for <a href="https://github.com/rspec/rspec">RSpec</a> that allow you to time-travel test examples, context/describes, and/or your entire test suite.</p>
|
73
|
-
|
74
|
-
<p>The gem was never released by its original author, who later moved on to work in other languages.<br>
|
75
|
-
<a href="https://github.com/taylorzr">Zach Taylor</a> did a great job with it,<br>
|
76
|
-
and people have been <a href="https://github.com/avantoss/timecop-rspec/issues/2">hoping it would be published</a>.<br>
|
77
|
-
It has a great API, and I was about to build this exact thing myself, so I am glad I found this.<br>
|
78
|
-
I’ve modernized everything, added more tests and documentation, and released it.<br>
|
79
|
-
Thanks to the long-term stability of both RSpec and Timecop, the original code still works perfectly.</p>
|
80
|
-
|
81
|
-
<p>Improvements over original:</p>
|
82
|
-
<ul>
|
83
|
-
<li>The original only supported Ruby 2.2+, but I’ve backfilled support to 1.9.2 (to align with the max-min version between RSpec & Timecop).</li>
|
84
|
-
<li>Added tests for 100% line coverage.</li>
|
85
|
-
<li>Added documentation for all public methods.</li>
|
86
|
-
<li>removed runtime (and dev) dependency on <code>activesupport</code>.</li>
|
87
|
-
</ul>
|
88
|
-
|
89
|
-
<p>I expect the current release of this gem to be compatible with Ruby 1.9.2+,<br>
|
90
|
-
but it is only tested on CI against Ruby 2.3+,<br>
|
91
|
-
due to the inherent limitations of GitHub Actions.</p>
|
92
|
-
|
93
|
-
<details>
|
94
|
-
<summary>Alternative Libraries</summary>
|
95
|
-
|
96
|
-
I have only found one, but it didn't have the API I wanted.
|
97
|
-
|
98
|
-
- [rspec-timecop](https://github.com/sugarcrm/rspec-timecop) - A very different approach
|
99
|
-
|
100
|
-
</details>
|
101
|
-
|
102
|
-
<table>
|
103
|
-
<thead>
|
104
|
-
<tr>
|
105
|
-
<th>🚚 <em>Amazing</em> test matrix was brought to you by</th>
|
106
|
-
<th>🔎 appraisal2 🔎</th>
|
107
|
-
</tr>
|
108
|
-
</thead>
|
109
|
-
<tbody>
|
110
|
-
<tr>
|
111
|
-
<td>👟 Check it out!</td>
|
112
|
-
<td>✨ <a href="https://github.com/appraisal-rb/appraisal2">github.com/appraisal-rb/appraisal2</a> ✨</td>
|
113
|
-
</tr>
|
114
|
-
</tbody>
|
115
|
-
</table>
|
116
|
-
|
117
|
-
<h2 id="-info-you-can-shake-a-stick-at">💡 Info you can shake a stick at</h2>
|
118
|
-
|
119
|
-
<h3 id="federated-dvcs">Federated DVCS</h3>
|
120
|
-
|
121
|
-
<details>
|
122
|
-
<summary>Find this repo on other forges (Coming soon!)</summary>
|
123
|
-
|
124
|
-
| Federated [DVCS][💎d-in-dvcs] Repository | Status | Issues | PRs | Wiki | CI | Discussions |
|
125
|
-
|-------------------------------------------------------|-------------------------------------------------------------------|---------------------------|--------------------------|---------------------------|--------------------------|------------------------------|
|
126
|
-
| 🧪 [galtzo-floss/timecop-rspec on GitLab][📜src-gl] | The Truth | [💚][🤝gl-issues] | [💚][🤝gl-pulls] | [💚][📜wiki] | 🏀 Tiny Matrix | ➖ |
|
127
|
-
| 🧊 [galtzo-floss/timecop-rspec on CodeBerg][📜src-cb] | An Ethical Mirror ([Donate][🤝cb-donate]) | [💚][🤝cb-issues] | [💚][🤝cb-pulls] | ➖ | ⭕️ No Matrix | ➖ |
|
128
|
-
| 🐙 [galtzo-floss/timecop-rspec on GitHub][📜src-gh] | A Dirty Mirror | [💚][🤝gh-issues] | [💚][🤝gh-pulls] | ➖ | 💯 Full Matrix | [💚][gh-discussions] |
|
129
|
-
| 🎮️ [Discord Server][✉️discord-invite] | [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite] | [Let's][✉️discord-invite] | [talk][✉️discord-invite] | [about][✉️discord-invite] | [this][✉️discord-invite] | [library!][✉️discord-invite] |
|
130
|
-
|
131
|
-
</details>
|
132
|
-
|
133
|
-
<h3 id="enterprise-support-">Enterprise Support <a href="https://tidelift.com/subscription/pkg/rubygems-timecop-rspec?utm_source=rubygems-timecop-rspec&utm_medium=referral&utm_campaign=readme"><img src="https://tidelift.com/badges/package/rubygems/timecop-rspec" alt="Tidelift"></a>
|
134
|
-
</h3>
|
135
|
-
|
136
|
-
<details>
|
137
|
-
<summary>Need enterprise-level guarantees?</summary>
|
138
|
-
|
139
|
-
[![Get help from me on Tidelift][🏙️entsup-tidelift-img]][🏙️entsup-tidelift]
|
140
|
-
|
141
|
-
- 💡Subscribe for support guarantees covering _all_ FLOSS dependencies
|
142
|
-
- 💡Tidelift is part of [Sonar][🏙️entsup-tidelift-sonar]
|
143
|
-
- 💡Tidelift pays maintainers to maintain the software you depend on!<br>📊`@`Pointy Haired Boss: An [enterprise support][🏙️entsup-tidelift] subscription is "[never gonna let you down][🧮kloc]", and *supports* open source maintainers
|
144
|
-
|
145
|
-
Alternatively:
|
146
|
-
|
147
|
-
- [![Live Chat on Discord][✉️discord-invite-img]][✉️discord-invite]
|
148
|
-
- [![Get help from me on Upwork][👨🏼🏫expsup-upwork-img]][👨🏼🏫expsup-upwork]
|
149
|
-
- [![Get help from me on Codementor][👨🏼🏫expsup-codementor-img]][👨🏼🏫expsup-codementor]
|
150
|
-
|
151
|
-
</details>
|
152
|
-
|
153
|
-
<table>
|
154
|
-
<thead>
|
155
|
-
<tr>
|
156
|
-
<th>Tokens to Remember</th>
|
157
|
-
<th>
|
158
|
-
<a href="https://rubygems.org/gems/timecop-rspec"><img src="https://img.shields.io/badge/name-timecop--rspec-3C2D2D.svg?style=square&logo=rubygems&logoColor=red" alt="Gem name"></a> <a href="https://github.com/galtzo-floss/timecop-rspec"><img src="https://img.shields.io/badge/namespace-Timecop%3A%3ARspec-3C2D2D.svg?style=square&logo=ruby&logoColor=white" alt="Gem namespace"></a>
|
159
|
-
</th>
|
160
|
-
</tr>
|
161
|
-
</thead>
|
162
|
-
<tbody>
|
163
|
-
<tr>
|
164
|
-
<td>Works with JRuby</td>
|
165
|
-
<td>
|
166
|
-
<img src="https://img.shields.io/badge/JRuby-9.1_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=red" alt="JRuby 9.1 Compat"> <img src="https://img.shields.io/badge/JRuby-9.2_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=red" alt="JRuby 9.2 Compat"> <br> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/jruby.yml"><img src="https://img.shields.io/badge/JRuby-9.3-FBE742?style=for-the-badge&logo=ruby&logoColor=red" alt="JRuby 9.3 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/jruby.yml"><img src="https://img.shields.io/badge/JRuby-9.4-FBE742?style=for-the-badge&logo=ruby&logoColor=red" alt="JRuby 9.4 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/current.yml"><img src="https://img.shields.io/badge/JRuby-current-FBE742?style=for-the-badge&logo=ruby&logoColor=green" alt="JRuby 10.0 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/heads.yml"><img src="https://img.shields.io/badge/JRuby-HEAD-FBE742?style=for-the-badge&logo=ruby&logoColor=blue" alt="JRuby HEAD Compat"></a>
|
167
|
-
</td>
|
168
|
-
</tr>
|
169
|
-
<tr>
|
170
|
-
<td>Works with Truffle Ruby</td>
|
171
|
-
<td>
|
172
|
-
<img src="https://img.shields.io/badge/Truffle_Ruby-22.3_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=pink" alt="Truffle Ruby 22.3 Compat"> <br> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/truffle.yml"><img src="https://img.shields.io/badge/Truffle_Ruby-23.0-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink" alt="Truffle Ruby 23.0 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/truffle.yml"><img src="https://img.shields.io/badge/Truffle_Ruby-23.1-34BCB1?style=for-the-badge&logo=ruby&logoColor=pink" alt="Truffle Ruby 23.1 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/current.yml"><img src="https://img.shields.io/badge/Truffle_Ruby-current-34BCB1?style=for-the-badge&logo=ruby&logoColor=green" alt="Truffle Ruby 24.1 Compat"></a>
|
173
|
-
</td>
|
174
|
-
</tr>
|
175
|
-
<tr>
|
176
|
-
<td>Works with MRI Ruby 3</td>
|
177
|
-
<td>
|
178
|
-
<a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/legacy.yml"><img src="https://img.shields.io/badge/Ruby-3.0-CC342D?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 3.0 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/supported.yml"><img src="https://img.shields.io/badge/Ruby-3.1-CC342D?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 3.1 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/supported.yml"><img src="https://img.shields.io/badge/Ruby-3.2-CC342D?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 3.2 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/supported.yml"><img src="https://img.shields.io/badge/Ruby-3.3-CC342D?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 3.3 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/current.yml"><img src="https://img.shields.io/badge/Ruby-current-CC342D?style=for-the-badge&logo=ruby&logoColor=green" alt="Ruby 3.4 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/heads.yml"><img src="https://img.shields.io/badge/Ruby-HEAD-CC342D?style=for-the-badge&logo=ruby&logoColor=blue" alt="Ruby HEAD Compat"></a>
|
179
|
-
</td>
|
180
|
-
</tr>
|
181
|
-
<tr>
|
182
|
-
<td>Works with MRI Ruby 2</td>
|
183
|
-
<td>
|
184
|
-
<img src="https://img.shields.io/badge/Ruby-2.0_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.0 Compat"> <img src="https://img.shields.io/badge/Ruby-2.1_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.1 Compat"> <img src="https://img.shields.io/badge/Ruby-2.2_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.2 Compat"> <br> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/ancient.yml"><img src="https://img.shields.io/badge/Ruby-2.3-DF00CA?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.3 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/ancient.yml"><img src="https://img.shields.io/badge/Ruby-2.4-DF00CA?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.4 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/ancient.yml"><img src="https://img.shields.io/badge/Ruby-2.5-DF00CA?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.5 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/unsupported.yml"><img src="https://img.shields.io/badge/Ruby-2.6-DF00CA?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.6 Compat"></a> <a href="https://github.com/galtzo-floss/timecop-rspec/actions/workflows/unsupported.yml"><img src="https://img.shields.io/badge/Ruby-2.7-DF00CA?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 2.7 Compat"></a>
|
185
|
-
</td>
|
186
|
-
</tr>
|
187
|
-
<tr>
|
188
|
-
<td>Works with MRI Ruby 1</td>
|
189
|
-
<td><img src="https://img.shields.io/badge/Ruby-1.9_(%F0%9F%9A%ABCI)-AABBCC?style=for-the-badge&logo=ruby&logoColor=white" alt="Ruby 1.9 Compat"></td>
|
190
|
-
</tr>
|
191
|
-
<tr>
|
192
|
-
<td>Source</td>
|
193
|
-
<td>
|
194
|
-
<a href="https://gitlab.com/galtzo-floss/timecop-rspec/"><img src="https://img.shields.io/badge/GitLab-FBA326?style=for-the-badge&logo=Gitlab&logoColor=orange" alt="Source on GitLab.com"></a> <a href="https://codeberg.org/galtzo-floss/timecop-rspec"><img src="https://img.shields.io/badge/CodeBerg-4893CC?style=for-the-badge&logo=CodeBerg&logoColor=blue" alt="Source on CodeBerg.org"></a> <a href="https://github.com/galtzo-floss/timecop-rspec"><img src="https://img.shields.io/badge/GitHub-238636?style=for-the-badge&logo=Github&logoColor=green" alt="Source on Github.com"></a> <a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ"><img src="https://img.shields.io/badge/KLOC-0.130-FFDD67.svg?style=for-the-badge&logo=YouTube&logoColor=blue" alt="The best SHA: dQw4w9WgXcQ!"></a>
|
195
|
-
</td>
|
196
|
-
</tr>
|
197
|
-
<tr>
|
198
|
-
<td>Documentation</td>
|
199
|
-
<td>
|
200
|
-
<a href="http://rubydoc.info/gems/timecop-rspec"><img src="https://img.shields.io/badge/RubyDoc-Current_Release-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white" alt="Current release on RubyDoc.info"></a> <a href="https://rspec-stubbed-env.galtzo.com"><img src="https://img.shields.io/badge/YARD_on_Galtzo.com-HEAD-943CD2?style=for-the-badge&logo=readthedocs&logoColor=white" alt="YARD on Galtzo.com"></a> <a href="http://www.railsbling.com/tags/timecop-rspec"><img src="https://img.shields.io/badge/blog-railsbling-0093D0.svg?style=for-the-badge&logo=rubyonrails&logoColor=orange" alt="Maintainer Blog"></a> <a href="https://gitlab.com/galtzo-floss/timecop-rspec/-/wikis/home"><img src="https://img.shields.io/badge/wiki-examples-943CD2.svg?style=for-the-badge&logo=Wiki&logoColor=white" alt="Wiki"></a>
|
201
|
-
</td>
|
202
|
-
</tr>
|
203
|
-
<tr>
|
204
|
-
<td>Compliance</td>
|
205
|
-
<td>
|
206
|
-
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-259D6C.svg" alt="License: MIT"></a> <a href="https://www.ilo.org/declaration/lang--en/index.htm"><img src="https://img.shields.io/badge/ILO_Fundamental_Principles-%E2%9C%93-259D6C.svg?style=flat" alt="📄ilo-declaration-img"></a> <a href="file.SECURITY.html" title="<img src="https://img.shields.io/badge/security-policy-259D6C.svg?style=flat" alt="Security Policy">"><img src="https://img.shields.io/badge/security-policy-259D6C.svg?style=flat" alt="Security Policy"></a> <a href="file.CODE_OF_CONDUCT.html" title="<img src="https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg" alt="Contributor Covenant 2.1">"><img src="https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg" alt="Contributor Covenant 2.1"></a> <a href="https://semver.org/spec/v2.0.0.html"><img src="https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat" alt="SemVer 2.0.0"></a>
|
207
|
-
</td>
|
208
|
-
</tr>
|
209
|
-
<tr>
|
210
|
-
<td>Style</td>
|
211
|
-
<td>
|
212
|
-
<a href="https://github.com/rubocop-lts/rubocop-lts"><img src="https://img.shields.io/badge/code_style_%26_linting-rubocop--lts-34495e.svg?plastic&logo=ruby&logoColor=white" alt="Enforced Code Style Linter"></a> <a href="https://keepachangelog.com/en/1.0.0/"><img src="https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat" alt="Keep-A-Changelog 1.0.0"></a> <a href="https://gitmoji.dev"><img src="https://img.shields.io/badge/gitmoji_commits-%20%F0%9F%98%9C%20%F0%9F%98%8D-34495e.svg?style=flat-square" alt="Gitmoji Commits"></a> <a href="https://github.com/appraisal-rb/appraisal2"><img src="https://img.shields.io/badge/appraised_by-appraisal2-34495e.svg?plastic&logo=ruby&logoColor=white" alt="Compatibility appraised by: appraisal2"></a>
|
213
|
-
</td>
|
214
|
-
</tr>
|
215
|
-
<tr>
|
216
|
-
<td>Support</td>
|
217
|
-
<td>
|
218
|
-
<a href="https://discord.gg/3qme4XHNKN"><img src="https://img.shields.io/discord/1373797679469170758?style=for-the-badge" alt="Live Chat on Discord"></a> <a href="https://www.upwork.com/freelancers/~014942e9b056abdf86?mp_source=share"><img src="https://img.shields.io/badge/UpWork-13544E?style=for-the-badge&logo=Upwork&logoColor=white" alt="Get help from me on Upwork"></a> <a href="https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github"><img src="https://img.shields.io/badge/CodeMentor-Get_Help-1abc9c?style=for-the-badge&logo=CodeMentor&logoColor=white" alt="Get help from me on Codementor"></a>
|
219
|
-
</td>
|
220
|
-
</tr>
|
221
|
-
<tr>
|
222
|
-
<td>Maintainer 🎖️</td>
|
223
|
-
<td>
|
224
|
-
<a href="http://www.linkedin.com/in/peterboling"><img src="https://img.shields.io/badge/PeterBoling-LinkedIn-0B66C2?style=flat&logo=newjapanprowrestling" alt="Follow Me on LinkedIn"></a> <a href="https://ruby.social/@galtzo"><img src="https://img.shields.io/mastodon/follow/109447111526622197?domain=https%3A%2F%2Fruby.social&style=flat&logo=mastodon&label=Ruby%20%40galtzo" alt="Follow Me on Ruby.Social"></a> <a href="https://bsky.app/profile/galtzo.com"><img src="https://img.shields.io/badge/@galtzo.com-0285FF?style=flat&logo=bluesky&logoColor=white" alt="Follow Me on Bluesky"></a> <a href="http://www.railsbling.com/contact"><img src="https://img.shields.io/badge/Contact-Maintainer-0093D0.svg?style=flat&logo=rubyonrails&logoColor=red" alt="Contact Maintainer"></a> <a href="https://dev.to/galtzo"><img src="https://img.shields.io/badge/dev.to-0A0A0A?style=flat&logo=devdotto&logoColor=white" alt="My technical writing"></a>
|
225
|
-
</td>
|
226
|
-
</tr>
|
227
|
-
<tr>
|
228
|
-
<td>
|
229
|
-
<code>...</code> 💖</td>
|
230
|
-
<td>
|
231
|
-
<a href="https://wellfound.com/u/peter-boling/u/peter-boling"><img src="https://img.shields.io/badge/peter--boling-orange?style=flat&logo=wellfound" alt="Find Me on WellFound:"></a> <a href="https://www.crunchbase.com/person/peter-boling"><img src="https://img.shields.io/badge/peter--boling-purple?style=flat&logo=crunchbase" alt="Find Me on CrunchBase"></a> <a href="https://linktr.ee/galtzo"><img src="https://img.shields.io/badge/galtzo-purple?style=flat&logo=linktree" alt="My LinkTree"></a> <a href="https://about.me/peter.boling"><img src="https://img.shields.io/badge/about.me-0A0A0A?style=flat&logo=aboutme&logoColor=white" alt="More About Me"></a> <a href="https://codeberg.org/pboling">🧊</a> <a href="https://github.org/pboling">🐙</a> <a href="https://sr.ht/~galtzo/">🛖</a> <a href="https://gitlab.com/pboling">🧪</a>
|
232
|
-
</td>
|
233
|
-
</tr>
|
234
|
-
</tbody>
|
235
|
-
</table>
|
236
|
-
|
237
|
-
<h2 id="-installation">✨ Installation</h2>
|
238
|
-
|
239
|
-
<p>Install the gem and add to the application’s Gemfile by executing:</p>
|
240
|
-
|
241
|
-
<pre class="code ruby"><code class="ruby">$ bundle add timecop-rspec
|
242
|
-
</code></pre>
|
243
|
-
|
244
|
-
<p>If bundler is not being used to manage dependencies, install the gem by executing:</p>
|
245
|
-
|
246
|
-
<pre class="code ruby"><code class="ruby">$ gem install timecop-rspec
|
247
|
-
</code></pre>
|
248
|
-
|
249
|
-
<h3 id="-secure-installation">🔒 Secure Installation</h3>
|
250
|
-
|
251
|
-
<details>
|
252
|
-
<summary>For Medium or High Security Installations</summary>
|
253
|
-
|
254
|
-
This gem is cryptographically signed, and has verifiable [SHA-256 and SHA-512][💎SHA_checksums] checksums by
|
255
|
-
[stone_checksums][💎stone_checksums]. Be sure the gem you install hasn’t been tampered with
|
256
|
-
by following the instructions below.
|
257
|
-
|
258
|
-
Add my public key (if you haven’t already, expires 2045-04-29) as a trusted certificate:
|
259
|
-
|
260
|
-
```console
|
261
|
-
gem cert --add <(curl -Ls https://raw.github.com/galtzo-floss/certs/main/pboling.pem)
|
262
|
-
```
|
263
|
-
|
264
|
-
You only need to do that once. Then proceed to install with:
|
265
|
-
|
266
|
-
```console
|
267
|
-
gem install timecop-rspec -P HighSecurity
|
268
|
-
```
|
269
|
-
|
270
|
-
The `HighSecurity` trust profile will verify signed gems, and not allow the installation of unsigned dependencies.
|
271
|
-
|
272
|
-
If you want to up your security game full-time:
|
273
|
-
|
274
|
-
```console
|
275
|
-
bundle config set --global trust-policy MediumSecurity
|
276
|
-
```
|
277
|
-
|
278
|
-
`MediumSecurity` instead of `HighSecurity` is necessary if not all the gems you use are signed.
|
279
|
-
|
280
|
-
NOTE: Be prepared to track down certs for signed gems and add them the same way you added mine.
|
281
|
-
|
282
|
-
</details>
|
283
|
-
|
284
|
-
<h2 id="️-configuration">⚙️ Configuration</h2>
|
285
|
-
|
286
|
-
<h4 id="regular-time-machine">Regular Time Machine</h4>
|
287
|
-
|
288
|
-
<pre class="code language-ruby"><code class="language-ruby"># spec_helper.rb or some configuration file loaded by spec_helper.rb
|
289
|
-
|
290
|
-
require "timecop/rspec"
|
291
|
-
|
292
|
-
RSpec.configure do |config|
|
293
|
-
config.around(:example) do |example|
|
294
|
-
Timecop::Rspec.time_machine.run(example)
|
295
|
-
end
|
296
|
-
end
|
297
|
-
</code></pre>
|
298
|
-
|
299
|
-
<p>The regular time machine will run each example at the time specified by the<br>
|
300
|
-
RSpec metadata, or the global travel time.</p>
|
301
|
-
|
302
|
-
<h4 id="sequential-time-machine">Sequential Time Machine</h4>
|
303
|
-
|
304
|
-
<pre class="code language-ruby"><code class="language-ruby"># spec_helper.rb or some configuration file loaded by spec_helper.rb
|
305
|
-
|
306
|
-
require "timecop/rspec"
|
307
|
-
|
308
|
-
RSpec.configure do |config|
|
309
|
-
config.around(:example) do |example|
|
310
|
-
Timecop::Rspec.time_machine(:sequential => true).run(example)
|
311
|
-
end
|
312
|
-
end
|
313
|
-
</code></pre>
|
314
|
-
|
315
|
-
<p>The sequential time machine is almost the same as the regular time machine,<br>
|
316
|
-
except that it will sometimes resume time travel.</p>
|
317
|
-
|
318
|
-
<p>Global travel will always resume from when the previous global traveled<br>
|
319
|
-
example ended. E.g.</p>
|
320
|
-
<pre class="code language-ruby"><code class="language-ruby"># GLOBAL_TIME_TRAVEL_TIME=2014-11-15 bundle exec rspec some_spec.rb
|
321
|
-
|
322
|
-
it "example 1" do
|
323
|
-
Time.now # => 2014-11-15 00:00:00
|
324
|
-
sleep 6
|
325
|
-
end
|
326
|
-
|
327
|
-
it "example 2" do
|
328
|
-
Time.now # => 2014-11-15 00:00:06 (resumed from end of previous example)
|
329
|
-
end
|
330
|
-
</code></pre>
|
331
|
-
|
332
|
-
<p>Following local travel will resume when specified time is the same as the<br>
|
333
|
-
previous examples specified time. If the time is different, it will<br>
|
334
|
-
start from the current examples specified time.</p>
|
335
|
-
<pre class="code language-ruby"><code class="language-ruby">describe SomeUnit, :travel => Time.new(2014, 11, 15) do
|
336
|
-
it "example 1" do
|
337
|
-
Time.now # => 2014-11-15 00:00:00
|
338
|
-
sleep 6
|
339
|
-
end
|
340
|
-
|
341
|
-
it "example 2" do
|
342
|
-
Time.now # => 2014-11-15 00:00:06 (resumed from end of previous example)
|
343
|
-
end
|
344
|
-
|
345
|
-
it "example 3", :travel => Time.new(1982, 6, 16) do
|
346
|
-
Time.now # => 1982-06-16 00:00:00
|
347
|
-
end
|
348
|
-
end
|
349
|
-
</code></pre>
|
350
|
-
|
351
|
-
<h2 id="-basic-usage">🔧 Basic Usage</h2>
|
352
|
-
|
353
|
-
<h4 id="local-time-travel">Local Time Travel</h4>
|
354
|
-
|
355
|
-
<p>Timecop.travel/freeze any RSpec (describe|context|example) with<br>
|
356
|
-
<code>:travel</code> or <code>:freeze</code> metadata.</p>
|
357
|
-
|
358
|
-
<pre class="code language-ruby"><code class="language-ruby"># Timecop.travel
|
359
|
-
it "some description", :travel => Time.new(2014, 11, 15) do
|
360
|
-
Time.now # 2014-11-15 00:00:00
|
361
|
-
sleep 6
|
362
|
-
Time.now # 2014-11-15 00:00:06 (6 seconds later)
|
363
|
-
end
|
364
|
-
|
365
|
-
# Timecop.freeze
|
366
|
-
it "some description", :freeze => Time.new(2014, 11, 15) do
|
367
|
-
Time.now # 2014-11-15 00:00:00
|
368
|
-
sleep 6
|
369
|
-
Time.now # 2014-11-15 00:00:00 (Ruby's time hasn't advanced)
|
370
|
-
end
|
371
|
-
</code></pre>
|
372
|
-
|
373
|
-
<h4 id="global-time-travel">Global Time Travel</h4>
|
374
|
-
|
375
|
-
<p>Using global time travel will Timecop.travel any example that isn’t<br>
|
376
|
-
already time traveling. I.e. example level timecop metadata will take<br>
|
377
|
-
precedence.</p>
|
378
|
-
|
379
|
-
<pre class="code language-sh"><code class="language-sh">GLOBAL_TIME_TRAVEL_TIME=2014-11-15 bundle exec rspec spec/some_directory/
|
380
|
-
</code></pre>
|
381
|
-
|
382
|
-
<p>The global time travel can also be skipped. You may want to skip<br>
|
383
|
-
time travel when testing with some external service, such as redis,<br>
|
384
|
-
where you can’t modify time the same way as within ruby.</p>
|
385
|
-
|
386
|
-
<pre class="code language-ruby"><code class="language-ruby">it "some example that can't time travel", :skip_global_travel do
|
387
|
-
# Time.now will be real time
|
388
|
-
end
|
389
|
-
</code></pre>
|
390
|
-
|
391
|
-
<h2 id="-floss-funding">🦷 FLOSS Funding</h2>
|
392
|
-
|
393
|
-
<blockquote>
|
394
|
-
<p>How wonderful it is that nobody need wait a single moment before starting to improve the world.<br><br>
|
395
|
-
—Anne Frank</p>
|
396
|
-
</blockquote>
|
397
|
-
|
398
|
-
<p>I’m driven by a passion to foster a thriving open-source community – a space where people can tackle complex problems, no matter how small. Revitalizing libraries that have fallen into disrepair, and building new libraries focused on solving real-world challenges, are my passions — totaling 79 hours of FLOSS coding over just the past seven days, a pretty regular week for me. I was recently affected by layoffs, and the tech jobs market is unwelcoming. I’m reaching out here because your support would significantly aid my efforts to provide for my family, and my farm (11 🐔 chickens, 2 🐶 dogs, 3 🐰 rabbits, 8 🐈 cats).</p>
|
399
|
-
|
400
|
-
<p>If you work at a company that uses my work, please encourage them to support me as a corporate sponsor. My work on gems you use might show up in <code>bundle fund</code>.</p>
|
401
|
-
|
402
|
-
<p>I’m developing a new library, <a href="https://github.com/galtzo-floss/timecop-rspec">floss_funding</a>, designed to empower open-source developers like myself to get paid for the work we do, in a sustainable way. Please give it a look.</p>
|
403
|
-
|
404
|
-
<p><strong><a href="https://floss-funding.dev">Floss-Funding.dev</a>: 👉️ No network calls. 👉️ No tracking. 👉️ No oversight. 👉️ Minimal crypto hashing. 💡 Easily disabled nags</strong></p>
|
405
|
-
|
406
|
-
<p><a href="https://liberapay.com/pboling/donate"><img src="https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay&color=a51611" alt="Liberapay Goal Progress"></a> <a href="https://www.paypal.com/paypalme/peterboling"><img src="https://img.shields.io/badge/donate-paypal-a51611.svg?style=flat&logo=paypal" alt="Donate on PayPal"></a> <a href="https://github.com/sponsors/pboling"><img src="https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github" alt="Sponsor Me on Github"></a> <a href="https://www.buymeacoffee.com/pboling"><img src="https://img.shields.io/badge/buy_me_a_coffee-%E2%9C%93-a51611.svg?style=flat" alt="Buy me a coffee"></a> <a href="https://polar.sh/pboling"><img src="https://img.shields.io/badge/polar-donate-a51611.svg" alt="Donate on Polar"></a> <a href="https://ko-fi.com/O5O86SNP4"><img src="https://img.shields.io/badge/ko--fi-%E2%9C%93-a51611.svg" alt="Donate to my FLOSS or refugee efforts at ko-fi.com"></a> <a href="https://patreon.com/galtzo"><img src="https://img.shields.io/badge/patreon-donate-a51611.svg" alt="Donate to my FLOSS or refugee efforts using Patreon"></a></p>
|
407
|
-
|
408
|
-
<h2 id="-security">🔐 Security</h2>
|
409
|
-
|
410
|
-
<p>See <a href="file.SECURITY.html" title="SECURITY.md">SECURITY.md</a>.</p>
|
411
|
-
|
412
|
-
<h2 id="-contributing">🤝 Contributing</h2>
|
413
|
-
|
414
|
-
<p>If you need some ideas of where to help, you could work on adding more code coverage,<br>
|
415
|
-
or if it is already 💯 (see <a href="#code-coverage">below</a>) check <a href="file.REEK.html" title="reek">reek</a>, <a href="https://github.com/galtzo-floss/timecop-rspec/issues">issues</a>, or <a href="https://github.com/galtzo-floss/timecop-rspec/pulls">PRs</a>,<br>
|
416
|
-
or use the gem and think about how it could be better.</p>
|
417
|
-
|
418
|
-
<p>We <a href="https://keepachangelog.com/en/1.0.0/"><img src="https://img.shields.io/badge/keep--a--changelog-1.0.0-34495e.svg?style=flat" alt="Keep A Changelog"></a> so if you make changes, remember to update it.</p>
|
419
|
-
|
420
|
-
<p>See <a href="file.CONTRIBUTING.html" title="CONTRIBUTING.md">CONTRIBUTING.md</a> for more detailed instructions.</p>
|
421
|
-
|
422
|
-
<h3 id="-release-instructions">🚀 Release Instructions</h3>
|
423
|
-
|
424
|
-
<p>See <a href="file.CONTRIBUTING.html" title="CONTRIBUTING.md">CONTRIBUTING.md</a>.</p>
|
425
|
-
|
426
|
-
<h3 id="code-coverage">Code Coverage</h3>
|
427
|
-
|
428
|
-
<p><a href="https://codecov.io/gh/galtzo-floss/timecop-rspec"><img src="https://codecov.io/gh/galtzo-floss/timecop-rspec/graphs/tree.svg?token=6XnuK8rocd" alt="Coverage Graph"></a></p>
|
429
|
-
|
430
|
-
<p><a href="https://coveralls.io/github/galtzo-floss/timecop-rspec?branch=main"><img src="https://coveralls.io/repos/github/galtzo-floss/timecop-rspec/badge.svg?branch=main" alt="Coveralls Test Coverage"></a></p>
|
431
|
-
|
432
|
-
<p><a href="https://qlty.sh/gh/galtzo-floss/projects/timecop-rspec/metrics/code?sort=coverageRating"><img src="https://qlty.sh/gh/galtzo-floss/projects/timecop-rspec/coverage.svg" alt="QLTY Test Coverage"></a></p>
|
433
|
-
|
434
|
-
<h3 id="-code-of-conduct">🪇 Code of Conduct</h3>
|
435
|
-
|
436
|
-
<p>Everyone interacting with this project’s codebases, issue trackers,<br>
|
437
|
-
chat rooms and mailing lists agrees to follow the <a href="file.CODE_OF_CONDUCT.html" title="<img src="https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg" alt="Contributor Covenant 2.1">"><img src="https://img.shields.io/badge/Contributor_Covenant-2.1-259D6C.svg" alt="Contributor Covenant 2.1"></a>.</p>
|
438
|
-
|
439
|
-
<h2 id="-contributors">🌈 Contributors</h2>
|
440
|
-
|
441
|
-
<p><a href="https://github.com/galtzo-floss/timecop-rspec/graphs/contributors"><img src="https://contrib.rocks/image?repo=galtzo-floss/timecop-rspec" alt="Contributors"></a></p>
|
442
|
-
|
443
|
-
<p>Made with <a href="https://contrib.rocks">contributors-img</a>.</p>
|
444
|
-
|
445
|
-
<p>Also see GitLab Contributors: <a href="https://gitlab.com/galtzo-floss/timecop-rspec/-/graphs/main">https://gitlab.com/galtzo-floss/timecop-rspec/-/graphs/main</a></p>
|
446
|
-
|
447
|
-
<h2 id="️-star-history">⭐️ Star History</h2>
|
448
|
-
|
449
|
-
<p><a href="https://star-history.com/#galtzo-floss/timecop-rspec&Date"></a></p>
|
450
|
-
<picture>
|
451
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=galtzo-floss/timecop-rspec&type=Date&theme=dark"></source>
|
452
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=galtzo-floss/timecop-rspec&type=Date"></source>
|
453
|
-
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=galtzo-floss/timecop-rspec&type=Date">
|
454
|
-
</picture>
|
455
|
-
<p></a></p>
|
456
|
-
|
457
|
-
<h2 id="-versioning">📌 Versioning</h2>
|
458
|
-
|
459
|
-
<p>This Library adheres to <a href="https://semver.org/spec/v2.0.0.html"><img src="https://img.shields.io/badge/semver-2.0.0-259D6C.svg?style=flat" alt="Semantic Versioning 2.0.0"></a>.<br>
|
460
|
-
Violations of this scheme should be reported as bugs.<br>
|
461
|
-
Specifically, if a minor or patch version is released that breaks backward compatibility,<br>
|
462
|
-
a new version should be immediately released that restores compatibility.<br>
|
463
|
-
Breaking changes to the public API will only be introduced with new major versions.</p>
|
464
|
-
|
465
|
-
<blockquote>
|
466
|
-
<p>dropping support for a platform is both obviously and objectively a breaking change <br><br>
|
467
|
-
—Jordan Harband (<a href="https://github.com/ljharb">@ljharb</a>, maintainer of SemVer) <a href="https://github.com/semver/semver/issues/716#issuecomment-869336139">in SemVer issue 716</a></p>
|
468
|
-
</blockquote>
|
469
|
-
|
470
|
-
<p>I understand that policy doesn’t work universally (“exceptions to every rule!”),<br>
|
471
|
-
but it is the policy here.<br>
|
472
|
-
As such, in many cases it is good to specify a dependency on this library using<br>
|
473
|
-
the <a href="http://guides.rubygems.org/patterns/#pessimistic-version-constraint">Pessimistic Version Constraint</a> with two digits of precision.</p>
|
474
|
-
|
475
|
-
<p>For example:</p>
|
476
|
-
|
477
|
-
<pre class="code language-ruby"><code class="language-ruby">spec.add_dependency("timecop-rspec", "~> 1.0")
|
478
|
-
</code></pre>
|
479
|
-
|
480
|
-
<details>
|
481
|
-
<summary>📌 Is "Platform Support" part of the public API? More details inside.</summary>
|
482
|
-
|
483
|
-
SemVer should, but doesn't explicitly, say that dropping support for specific Platforms
|
484
|
-
is a *breaking change* to an API.
|
485
|
-
It is obvious to many, but not all, and since the spec is silent, the bike shedding is endless.
|
486
|
-
|
487
|
-
To get a better understanding of how SemVer is intended to work over a project's lifetime,
|
488
|
-
read this article from the creator of SemVer:
|
489
|
-
|
490
|
-
- ["Major Version Numbers are Not Sacred"][📌major-versions-not-sacred]
|
491
|
-
|
492
|
-
</details>
|
493
|
-
|
494
|
-
<p>See <a href="file.CHANGELOG.html" title="CHANGELOG.md">CHANGELOG.md</a> for a list of releases.</p>
|
495
|
-
|
496
|
-
<h2 id="-license">📄 License</h2>
|
497
|
-
|
498
|
-
<p>The gem is available as open source under the terms of<br>
|
499
|
-
the <a href="file.LICENSE.html" title="MIT License">MIT License</a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-259D6C.svg" alt="License: MIT"></a>.<br>
|
500
|
-
See <a href="file.LICENSE.html" title="LICENSE.txt">LICENSE.txt</a> for the official <a href="https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year">Copyright Notice</a>.</p>
|
501
|
-
|
502
|
-
<h3 id="-copyright">© Copyright</h3>
|
503
|
-
|
504
|
-
<ul>
|
505
|
-
<li>
|
506
|
-
Copyright (c) 2025 Peter H. Boling, of
|
507
|
-
<a href="https://discord.gg/3qme4XHNKN">
|
508
|
-
Galtzo.com
|
509
|
-
<picture>
|
510
|
-
<img src="https://logos.galtzo.com/assets/images/galtzo-floss/avatar-128px-blank.svg" alt="Galtzo.com Logo (Wordless) by Aboling0, CC BY-SA 4.0" width="24">
|
511
|
-
</picture>
|
512
|
-
</a>, and timecop-rspec contributors.
|
513
|
-
</li>
|
514
|
-
<li>Copyright (c) 2014-2017 Zach Taylor & Avant</li>
|
515
|
-
</ul>
|
516
|
-
|
517
|
-
<p>P.S. If you need help️ or want to say thanks, 👇 Join the Discord.</p>
|
518
|
-
|
519
|
-
<p><a href="https://discord.gg/3qme4XHNKN"><img src="https://img.shields.io/discord/1373797679469170758?style=for-the-badge" alt="Live Chat on Discord"></a></p>
|
520
|
-
|
521
|
-
</div></div>
|
522
|
-
|
523
|
-
<div id="footer">
|
524
|
-
Generated on Sun Aug 17 17:04:07 2025 by
|
525
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
526
|
-
0.9.37 (ruby-3.4.5).
|
527
|
-
</div>
|
528
|
-
|
529
|
-
</div>
|
530
|
-
</body>
|
531
|
-
</html>
|
data/docs/file.REEK.html
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta charset="US-ASCII">
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
-
<title>
|
7
|
-
File: REEK
|
8
|
-
|
9
|
-
— Documentation by YARD 0.9.37
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" />
|
16
|
-
|
17
|
-
<script type="text/javascript">
|
18
|
-
pathId = "REEK";
|
19
|
-
relpath = '';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
|
23
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
-
|
25
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
-
|
27
|
-
|
28
|
-
</head>
|
29
|
-
<body>
|
30
|
-
<div class="nav_wrap">
|
31
|
-
<iframe id="nav" src="file_list.html?1"></iframe>
|
32
|
-
<div id="resizer"></div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div id="main" tabindex="-1">
|
36
|
-
<div id="header">
|
37
|
-
<div id="menu">
|
38
|
-
|
39
|
-
<a href="_index.html">Index</a> »
|
40
|
-
<span class="title">File: REEK</span>
|
41
|
-
|
42
|
-
</div>
|
43
|
-
|
44
|
-
<div id="search">
|
45
|
-
|
46
|
-
<a class="full_list_link" id="class_list_link"
|
47
|
-
href="class_list.html">
|
48
|
-
|
49
|
-
<svg width="24" height="24">
|
50
|
-
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
51
|
-
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
52
|
-
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
-
</svg>
|
54
|
-
</a>
|
55
|
-
|
56
|
-
</div>
|
57
|
-
<div class="clear"></div>
|
58
|
-
</div>
|
59
|
-
|
60
|
-
<div id="content"><div id='filecontents'>
|
61
|
-
</div></div>
|
62
|
-
|
63
|
-
<div id="footer">
|
64
|
-
Generated on Sun Aug 17 17:04:07 2025 by
|
65
|
-
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
66
|
-
0.9.37 (ruby-3.4.5).
|
67
|
-
</div>
|
68
|
-
|
69
|
-
</div>
|
70
|
-
</body>
|
71
|
-
</html>
|