clockwork 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/clockwork.rb +13 -10
- metadata +4 -12
data/README.md
CHANGED
@@ -32,8 +32,8 @@ Create clock.rb:
|
|
32
32
|
Run it with the clockwork binary:
|
33
33
|
|
34
34
|
$ clockwork clock.rb
|
35
|
-
|
36
|
-
|
35
|
+
Starting clock for 4 events: [ frequent.job less.frequent.job hourly.job midnight.job ]
|
36
|
+
Triggering frequent.job
|
37
37
|
|
38
38
|
Use with queueing
|
39
39
|
-----------------
|
@@ -134,7 +134,7 @@ Inspired by [rufus-scheduler](http://rufus.rubyforge.org/rufus-scheduler/) and [
|
|
134
134
|
|
135
135
|
Design assistance from Peter van Hardenberg and Matthew Soldo
|
136
136
|
|
137
|
-
Patches contributed by Mark McGranaghan
|
137
|
+
Patches contributed by Mark McGranaghan and Lukáš Konarovský
|
138
138
|
|
139
139
|
Released under the MIT License: http://www.opensource.org/licenses/mit-license.php
|
140
140
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/lib/clockwork.rb
CHANGED
@@ -103,18 +103,21 @@ module Clockwork
|
|
103
103
|
@@events = []
|
104
104
|
@@handler = nil
|
105
105
|
end
|
106
|
+
|
106
107
|
end
|
107
108
|
|
108
|
-
|
109
|
-
|
110
|
-
|
109
|
+
unless 1.respond_to?(:seconds)
|
110
|
+
class Numeric
|
111
|
+
def seconds; self; end
|
112
|
+
alias :second :seconds
|
111
113
|
|
112
|
-
|
113
|
-
|
114
|
+
def minutes; self * 60; end
|
115
|
+
alias :minute :minutes
|
114
116
|
|
115
|
-
|
116
|
-
|
117
|
+
def hours; self * 3600; end
|
118
|
+
alias :hour :hours
|
117
119
|
|
118
|
-
|
119
|
-
|
120
|
-
end
|
120
|
+
def days; self * 86400; end
|
121
|
+
alias :day :days
|
122
|
+
end
|
123
|
+
end
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 3
|
9
|
-
version: 0.2.3
|
4
|
+
prerelease:
|
5
|
+
version: 0.2.4
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Adam Wiggins
|
@@ -14,7 +10,7 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-
|
13
|
+
date: 2011-07-31 00:00:00 -07:00
|
18
14
|
default_executable: clockwork
|
19
15
|
dependencies: []
|
20
16
|
|
@@ -47,21 +43,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
47
43
|
requirements:
|
48
44
|
- - ">="
|
49
45
|
- !ruby/object:Gem::Version
|
50
|
-
segments:
|
51
|
-
- 0
|
52
46
|
version: "0"
|
53
47
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
48
|
none: false
|
55
49
|
requirements:
|
56
50
|
- - ">="
|
57
51
|
- !ruby/object:Gem::Version
|
58
|
-
segments:
|
59
|
-
- 0
|
60
52
|
version: "0"
|
61
53
|
requirements: []
|
62
54
|
|
63
55
|
rubyforge_project: clockwork
|
64
|
-
rubygems_version: 1.
|
56
|
+
rubygems_version: 1.5.0
|
65
57
|
signing_key:
|
66
58
|
specification_version: 3
|
67
59
|
summary: A scheduler process to replace cron.
|