clockwork 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source :rubygems
2
+
3
+ group :development, :test do
4
+ gem 'jeweler'
5
+ gem 'contest'
6
+ gem 'mocha'
7
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,21 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ contest (0.1.3)
5
+ git (1.2.5)
6
+ jeweler (1.6.4)
7
+ bundler (~> 1.0)
8
+ git (>= 1.2.5)
9
+ rake
10
+ metaclass (0.0.1)
11
+ mocha (0.10.0)
12
+ metaclass (~> 0.0.1)
13
+ rake (0.9.2)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ contest
20
+ jeweler
21
+ mocha
data/Rakefile CHANGED
@@ -11,6 +11,7 @@ Jeweler::Tasks.new do |s|
11
11
  s.rubyforge_project = "clockwork"
12
12
 
13
13
  s.files = FileList["[A-Z]*", "{bin,lib}/**/*"]
14
+ s.test_files = FileList["{test}/**/*"]
14
15
  end
15
16
 
16
17
  Jeweler::GemcutterTasks.new
@@ -20,3 +21,4 @@ task 'test' do
20
21
  end
21
22
 
22
23
  task :build => :test
24
+ task :default => :test
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
data/lib/clockwork.rb CHANGED
@@ -48,17 +48,19 @@ module Clockwork
48
48
 
49
49
  def parse_at(at)
50
50
  return unless at
51
- m = at.match(/^(\d\d|\*+):(\d\d)$/)
52
- raise FailedToParse, at unless m
53
- if m[1][0] == '*'
54
- hour = nil
51
+ case at
52
+ when /^(\d\d):(\d\d)$/
53
+ hour = $1.to_i
54
+ min = $2.to_i
55
+ raise FailedToParse, at if hour >= 24 || min >= 60
56
+ [hour, min]
57
+ when /^\*\*:(\d\d)$/
58
+ min = $1.to_i
59
+ raise FailedToParse, at if min >= 60
60
+ [nil, min]
55
61
  else
56
- hour = m[1].to_i
57
- raise FailedToParse, at if hour >= 24
62
+ raise FailedToParse, at
58
63
  end
59
- min = m[2].to_i
60
- raise FailedToParse, at if min >= 60
61
- [ hour, min ]
62
64
  end
63
65
  end
64
66
 
@@ -1,4 +1,5 @@
1
1
  require File.expand_path('../../lib/clockwork', __FILE__)
2
+ require 'rubygems'
2
3
  require 'contest'
3
4
  require 'mocha'
4
5
  require 'time'
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clockwork
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 17
4
5
  prerelease:
5
- version: 0.3.0
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 1
10
+ version: 0.3.1
6
11
  platform: ruby
7
12
  authors:
8
13
  - Adam Wiggins
@@ -10,9 +15,51 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-10-14 00:00:00 Z
14
- dependencies: []
15
-
18
+ date: 2011-10-18 00:00:00 +09:00
19
+ default_executable: clockwork
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: jeweler
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: contest
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: mocha
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ type: :development
62
+ version_requirements: *id003
16
63
  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.
17
64
  email: adam@heroku.com
18
65
  executables:
@@ -22,12 +69,15 @@ extensions: []
22
69
  extra_rdoc_files:
23
70
  - README.md
24
71
  files:
72
+ - Gemfile
73
+ - Gemfile.lock
25
74
  - README.md
26
75
  - Rakefile
27
76
  - VERSION
28
77
  - bin/clockwork
29
78
  - lib/clockwork.rb
30
79
  - test/clockwork_test.rb
80
+ has_rdoc: true
31
81
  homepage: http://github.com/adamwiggins/clockwork
32
82
  licenses: []
33
83
 
@@ -41,17 +91,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
41
91
  requirements:
42
92
  - - ">="
43
93
  - !ruby/object:Gem::Version
94
+ hash: 3
95
+ segments:
96
+ - 0
44
97
  version: "0"
45
98
  required_rubygems_version: !ruby/object:Gem::Requirement
46
99
  none: false
47
100
  requirements:
48
101
  - - ">="
49
102
  - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
50
106
  version: "0"
51
107
  requirements: []
52
108
 
53
109
  rubyforge_project: clockwork
54
- rubygems_version: 1.8.6
110
+ rubygems_version: 1.6.2
55
111
  signing_key:
56
112
  specification_version: 3
57
113
  summary: A scheduler process to replace cron.