zoidberg 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/zoidberg/timer.rb +8 -7
- data/lib/zoidberg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df52de1159262a58d00a216caaa8fe027a77dd9b
|
4
|
+
data.tar.gz: 6cfa6c993544ef1e5eac1e8ebbc441d229127028
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a1428042644789759af29f18a7f91b9f4a4dd65a7aad27c965451ba2681f87730a2ad39b21efb1adbc34076ae032d759f11d25384aeb5923d468a6b29041b8e
|
7
|
+
data.tar.gz: 5996f95418dc32387a87558bdf43ea02494726124ec1955702f61b21a7e7137fedf4dfe0772617287dc40ad4d2f1298603b58b6b80cbf88bd45c2d3f077fdb22
|
data/CHANGELOG.md
CHANGED
data/lib/zoidberg/timer.rb
CHANGED
@@ -45,23 +45,24 @@ module Zoidberg
|
|
45
45
|
def cancelled?
|
46
46
|
@cancel
|
47
47
|
end
|
48
|
+
alias_method :canceled?, :cancelled?
|
48
49
|
|
49
50
|
# Run the action
|
50
51
|
#
|
51
52
|
# @return [self]
|
52
53
|
def run!
|
53
|
-
|
54
|
-
|
55
|
-
|
54
|
+
unless(cancelled?)
|
55
|
+
@last_run = Time.now.to_f
|
56
|
+
action.call
|
57
|
+
@last_run = Time.now.to_f
|
58
|
+
end
|
56
59
|
self
|
57
60
|
end
|
58
61
|
|
59
62
|
# @return [TrueClass, FalseClass]
|
60
63
|
def ready?
|
61
|
-
|
62
|
-
|
63
|
-
last_run + interval
|
64
|
-
)
|
64
|
+
Time.now.to_f > (
|
65
|
+
last_run + interval
|
65
66
|
)
|
66
67
|
end
|
67
68
|
|
data/lib/zoidberg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoidberg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bogo
|