clockwork 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.travis.yml +5 -0
- data/Gemfile +1 -9
- data/README.md +2 -2
- data/Rakefile +1 -19
- data/clockwork.gemspec +27 -0
- data/example.rb +16 -0
- metadata +38 -14
- data/Gemfile.lock +0 -35
- data/VERSION +0 -1
data/.gitignore
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Clockwork - a clock process to replace cron [![Build Status](https://secure.travis-ci.org/tomykaira/clockwork.png?branch=master)](http://travis-ci.org/tomykaira/clockwork)
|
1
|
+
Clockwork - a clock process to replace cron [![Build Status](https://secure.travis-ci.org/tomykaira/clockwork.png?branch=master)](http://travis-ci.org/tomykaira/clockwork) [![Dependency Status](https://gemnasium.com/tomykaira/clockwork.png)](https://gemnasium.com/tomykaira/clockwork)
|
2
2
|
===========================================
|
3
3
|
|
4
4
|
Cron is non-ideal for running scheduled application tasks, especially in an app
|
@@ -42,7 +42,7 @@ it as the module (thanks to [hoverlover](https://github.com/hoverlover/clockwork
|
|
42
42
|
|
43
43
|
module Clockwork
|
44
44
|
|
45
|
-
configure do |
|
45
|
+
configure do |config|
|
46
46
|
config[:tz] = "America/Chicago"
|
47
47
|
end
|
48
48
|
|
data/Rakefile
CHANGED
@@ -1,23 +1,5 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
Jeweler::Tasks.new do |s|
|
4
|
-
s.name = "clockwork"
|
5
|
-
s.summary = "A scheduler process to replace cron."
|
6
|
-
s.description = "A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler."
|
7
|
-
s.author = "Adam Wiggins"
|
8
|
-
s.email = "adam@heroku.com"
|
9
|
-
s.homepage = "http://github.com/tomykaira/clockwork"
|
10
|
-
s.rubyforge_project = "clockwork"
|
11
|
-
|
12
|
-
s.files = FileList["[A-Z]*", "{bin,lib}/**/*"]
|
13
|
-
s.test_files = FileList["{test}/**/*"]
|
14
|
-
end
|
15
|
-
|
16
|
-
Jeweler::GemcutterTasks.new
|
1
|
+
require "bundler/gem_tasks"
|
17
2
|
|
18
3
|
task 'test' do
|
19
4
|
sh "ruby test/clockwork_test.rb"
|
20
5
|
end
|
21
|
-
|
22
|
-
task :build => :test
|
23
|
-
task :default => :test
|
data/clockwork.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "clockwork"
|
3
|
+
s.version = "0.5.3"
|
4
|
+
|
5
|
+
s.authors = ["Adam Wiggins", "tomykaira"]
|
6
|
+
s.description = "A scheduler process to replace cron, using a more flexible Ruby syntax running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler."
|
7
|
+
s.email = ["adam@heroku.com", "tomykaira@gmail.com"]
|
8
|
+
s.extra_rdoc_files = [
|
9
|
+
"README.md"
|
10
|
+
]
|
11
|
+
s.homepage = "http://github.com/tomykaira/clockwork"
|
12
|
+
s.summary = "A scheduler process to replace cron."
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split($/)
|
15
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
s.add_dependency(%q<tzinfo>, ["~> 0.3.35"])
|
20
|
+
s.add_dependency(%q<activesupport>, ["~> 4.0.0"])
|
21
|
+
|
22
|
+
s.add_development_dependency "bundler", "~> 1.3"
|
23
|
+
s.add_development_dependency "rake"
|
24
|
+
s.add_development_dependency "daemons"
|
25
|
+
s.add_development_dependency "contest"
|
26
|
+
s.add_development_dependency "mocha"
|
27
|
+
end
|
data/example.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'clockwork'
|
2
|
+
include Clockwork
|
3
|
+
|
4
|
+
handler do |job|
|
5
|
+
puts "Queueing job: #{job}"
|
6
|
+
end
|
7
|
+
|
8
|
+
every(10.seconds, 'run.me.every.10.seconds')
|
9
|
+
every(1.minute, 'run.me.every.minute')
|
10
|
+
every(1.hour, 'run.me.every.hour')
|
11
|
+
|
12
|
+
every(1.day, 'run.me.at.midnight', :at => '00:00')
|
13
|
+
|
14
|
+
every(1.day, 'custom.event.handler', :at => '00:30') do
|
15
|
+
puts "This event has its own handler"
|
16
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clockwork
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Adam Wiggins
|
9
|
+
- tomykaira
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2013-
|
13
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: tzinfo
|
@@ -32,19 +33,35 @@ dependencies:
|
|
32
33
|
requirement: !ruby/object:Gem::Requirement
|
33
34
|
none: false
|
34
35
|
requirements:
|
35
|
-
- -
|
36
|
+
- - ~>
|
36
37
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
38
|
+
version: 4.0.0
|
38
39
|
type: :runtime
|
39
40
|
prerelease: false
|
40
41
|
version_requirements: !ruby/object:Gem::Requirement
|
41
42
|
none: false
|
42
43
|
requirements:
|
43
|
-
- -
|
44
|
+
- - ~>
|
44
45
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
46
|
+
version: 4.0.0
|
46
47
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
48
|
+
name: bundler
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '1.3'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: rake
|
48
65
|
requirement: !ruby/object:Gem::Requirement
|
49
66
|
none: false
|
50
67
|
requirements:
|
@@ -60,7 +77,7 @@ dependencies:
|
|
60
77
|
- !ruby/object:Gem::Version
|
61
78
|
version: '0'
|
62
79
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
80
|
+
name: daemons
|
64
81
|
requirement: !ruby/object:Gem::Requirement
|
65
82
|
none: false
|
66
83
|
requirements:
|
@@ -76,7 +93,7 @@ dependencies:
|
|
76
93
|
- !ruby/object:Gem::Version
|
77
94
|
version: '0'
|
78
95
|
- !ruby/object:Gem::Dependency
|
79
|
-
name:
|
96
|
+
name: contest
|
80
97
|
requirement: !ruby/object:Gem::Requirement
|
81
98
|
none: false
|
82
99
|
requirements:
|
@@ -109,7 +126,9 @@ dependencies:
|
|
109
126
|
version: '0'
|
110
127
|
description: A scheduler process to replace cron, using a more flexible Ruby syntax
|
111
128
|
running as a single long-running process. Inspired by rufus-scheduler and resque-scheduler.
|
112
|
-
email:
|
129
|
+
email:
|
130
|
+
- adam@heroku.com
|
131
|
+
- tomykaira@gmail.com
|
113
132
|
executables:
|
114
133
|
- clockwork
|
115
134
|
- clockworkd
|
@@ -117,13 +136,15 @@ extensions: []
|
|
117
136
|
extra_rdoc_files:
|
118
137
|
- README.md
|
119
138
|
files:
|
139
|
+
- .gitignore
|
140
|
+
- .travis.yml
|
120
141
|
- Gemfile
|
121
|
-
- Gemfile.lock
|
122
142
|
- README.md
|
123
143
|
- Rakefile
|
124
|
-
- VERSION
|
125
144
|
- bin/clockwork
|
126
145
|
- bin/clockworkd
|
146
|
+
- clockwork.gemspec
|
147
|
+
- example.rb
|
127
148
|
- lib/clockwork.rb
|
128
149
|
- test/clockwork_test.rb
|
129
150
|
homepage: http://github.com/tomykaira/clockwork
|
@@ -140,15 +161,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
140
161
|
version: '0'
|
141
162
|
segments:
|
142
163
|
- 0
|
143
|
-
hash:
|
164
|
+
hash: 1066631165
|
144
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
166
|
none: false
|
146
167
|
requirements:
|
147
168
|
- - ! '>='
|
148
169
|
- !ruby/object:Gem::Version
|
149
170
|
version: '0'
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
hash: 1066631165
|
150
174
|
requirements: []
|
151
|
-
rubyforge_project:
|
175
|
+
rubyforge_project:
|
152
176
|
rubygems_version: 1.8.23
|
153
177
|
signing_key:
|
154
178
|
specification_version: 3
|
data/Gemfile.lock
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: https://rubygems.org/
|
3
|
-
specs:
|
4
|
-
activesupport (3.2.13)
|
5
|
-
i18n (= 0.6.1)
|
6
|
-
multi_json (~> 1.0)
|
7
|
-
contest (0.1.3)
|
8
|
-
daemons (1.1.9)
|
9
|
-
git (1.2.5)
|
10
|
-
i18n (0.6.1)
|
11
|
-
jeweler (1.8.4)
|
12
|
-
bundler (~> 1.0)
|
13
|
-
git (>= 1.2.5)
|
14
|
-
rake
|
15
|
-
rdoc
|
16
|
-
json (1.7.7)
|
17
|
-
metaclass (0.0.1)
|
18
|
-
mocha (0.13.2)
|
19
|
-
metaclass (~> 0.0.1)
|
20
|
-
multi_json (1.7.3)
|
21
|
-
rake (10.0.3)
|
22
|
-
rdoc (4.0.0)
|
23
|
-
json (~> 1.4)
|
24
|
-
tzinfo (0.3.35)
|
25
|
-
|
26
|
-
PLATFORMS
|
27
|
-
ruby
|
28
|
-
|
29
|
-
DEPENDENCIES
|
30
|
-
activesupport
|
31
|
-
contest
|
32
|
-
daemons
|
33
|
-
jeweler
|
34
|
-
mocha
|
35
|
-
tzinfo (~> 0.3.35)
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.5.2
|