clockwork-test 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -2
- data/lib/clockwork/test/manager.rb +1 -1
- data/lib/clockwork/test/version.rb +1 -1
- data/spec/clockwork/test/manager_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b0dcaa56666f15b8901337706ae5ab9c1c69867ee604f3c67fda671d0ba0595
|
4
|
+
data.tar.gz: 2aa1a4be4e081bc26ba922c7ea025417c9e64a68c2a0ce5ae9195d223e227208
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3270ecbf8cb072e24a588bd97694aa0b7388ead25936864420437df608138b968301bfd3ed79c86d978fafc261b996d04eb74f7e5159587a426d2fd5ce10781
|
7
|
+
data.tar.gz: 68d2a21169b55bff650f79a988b2428b583ccc887512103f0d172dd593813bb8503c069ce3c5f59575911ec05d8fe3440aacef1c10ab0a0b9b16aca32bfdfe5a
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
## Current release (in development)
|
2
2
|
|
3
|
+
## 0.5.1 [2023-04-21]
|
4
|
+
|
5
|
+
* Fix error introduced in 0.5.0 so now least one clock tick occurs when starting and ending at the same time [#41](https://github.com/kevin-j-m/clockwork-test/pull/41)
|
6
|
+
|
7
|
+
*Robin Brandt*
|
8
|
+
|
3
9
|
## 0.5.0 [2023-04-20]
|
4
10
|
|
5
|
-
* Support timecop safe mode [#39]
|
11
|
+
* Support timecop safe mode [#39](https://github.com/kevin-j-m/clockwork-test/pull/39)
|
6
12
|
|
7
13
|
*Felix Dumit*
|
8
14
|
|
@@ -28,7 +34,7 @@
|
|
28
34
|
|
29
35
|
## 0.4.0 [2020-04-23]
|
30
36
|
|
31
|
-
* Support clockwork callbacks [#34]
|
37
|
+
* Support clockwork callbacks [#34](https://github.com/kevin-j-m/clockwork-test/pull/34)
|
32
38
|
|
33
39
|
*Rahul Agrawal*
|
34
40
|
|
@@ -59,7 +59,7 @@ module Clockwork
|
|
59
59
|
def tick_loop
|
60
60
|
loop.with_index do |_, index|
|
61
61
|
Timecop.travel(Time.current + @tick_speed.to_i * index) do
|
62
|
-
return if ticks_exceeded? || time_exceeded?
|
62
|
+
return if ticks_exceeded? || (time_exceeded? && index > 0)
|
63
63
|
|
64
64
|
update_job_history
|
65
65
|
tick
|
@@ -82,6 +82,15 @@ describe Clockwork::Test::Manager do
|
|
82
82
|
expect(manager.total_ticks).to be > 0
|
83
83
|
end
|
84
84
|
end
|
85
|
+
|
86
|
+
context "with same start and end time" do
|
87
|
+
let(:end_time) { Time.current }
|
88
|
+
|
89
|
+
it "runs the clock once" do
|
90
|
+
manager.run
|
91
|
+
expect(manager.total_ticks).to eq 1
|
92
|
+
end
|
93
|
+
end
|
85
94
|
end
|
86
95
|
|
87
96
|
context "recording job history" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockwork-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Murphy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|