javan-whenever 0.3.1 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +16 -0
- data/Manifest +1 -0
- data/lib/command_line.rb +2 -2
- data/lib/job_list.rb +59 -8
- data/lib/job_types/runner.rb +1 -1
- data/lib/outputs/cron.rb +18 -4
- data/lib/version.rb +1 -1
- data/test/command_line_test.rb +41 -47
- data/test/output_at_test.rb +178 -0
- data/test/output_command_test.rb +17 -0
- data/test/output_env_test.rb +33 -0
- data/test/output_runner_test.rb +17 -1
- data/whenever.gemspec +6 -7
- metadata +6 -4
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
== 0.3.7 / September 4th, 2009
|
2
|
+
|
3
|
+
* No longer tries (and fails) to combine @shortcut jobs. #20 [Javan Makhmali]
|
4
|
+
|
5
|
+
|
6
|
+
== 0.3.6 / June 15th, 2009
|
7
|
+
|
8
|
+
* Setting a PATH in the crontab automatically based on the user's PATH. [Javan Makhmali]
|
9
|
+
|
10
|
+
|
11
|
+
== 0.3.5 / June 13th, 2009
|
12
|
+
|
13
|
+
* Added ability to accept lists of every's and at's and intelligently group them. (ex: every 'monday, wednesday', :at => ['3pm', '6am']). [Sam Ruby]
|
14
|
+
|
15
|
+
* Fixed issue with new lines. #18 [Javan Makhmali]
|
16
|
+
|
1
17
|
== 0.3.1 / June 25th, 2009
|
2
18
|
|
3
19
|
* Removed activesupport gem dependency. #1 [Javan Makhmali]
|
data/Manifest
CHANGED
data/lib/command_line.rb
CHANGED
@@ -40,7 +40,7 @@ module Whenever
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def whenever_cron
|
43
|
-
@whenever_cron ||= [comment_open, Whenever.cron(@options), comment_close].join("\n")
|
43
|
+
@whenever_cron ||= [comment_open, Whenever.cron(@options), comment_close].join("\n") + "\n"
|
44
44
|
end
|
45
45
|
|
46
46
|
def read_crontab
|
@@ -86,7 +86,7 @@ module Whenever
|
|
86
86
|
|
87
87
|
# If an existing identier block is found, replace it with the new cron entries
|
88
88
|
if read_crontab.index(comment_open) && read_crontab.index(comment_close)
|
89
|
-
read_crontab.gsub(Regexp.new("#{comment_open}.+#{comment_close}", Regexp::MULTILINE), whenever_cron)
|
89
|
+
read_crontab.gsub(Regexp.new("#{comment_open}.+#{comment_close}", Regexp::MULTILINE), whenever_cron.chomp)
|
90
90
|
else # Otherwise, append the new cron entries after any existing ones
|
91
91
|
[read_crontab, whenever_cron].join("\n\n")
|
92
92
|
end
|
data/lib/job_list.rb
CHANGED
@@ -57,14 +57,18 @@ module Whenever
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def generate_cron_output
|
60
|
+
set_path_environment_variable
|
61
|
+
|
60
62
|
[environment_variables, cron_jobs].compact.join
|
61
63
|
end
|
62
64
|
|
63
65
|
private
|
64
66
|
|
67
|
+
#
|
65
68
|
# Takes a string like: "variable1=something&variable2=somethingelse"
|
66
69
|
# and breaks it into variable/value pairs. Used for setting variables at runtime from the command line.
|
67
70
|
# Only works for setting values as strings.
|
71
|
+
#
|
68
72
|
def pre_set(variable_string = nil)
|
69
73
|
return if variable_string.blank?
|
70
74
|
|
@@ -75,6 +79,19 @@ module Whenever
|
|
75
79
|
set(variable.strip, value.strip) unless variable.blank? || value.blank?
|
76
80
|
end
|
77
81
|
end
|
82
|
+
|
83
|
+
def set_path_environment_variable
|
84
|
+
return if path_should_not_be_set_automatically?
|
85
|
+
@env[:PATH] = read_path unless read_path.blank?
|
86
|
+
end
|
87
|
+
|
88
|
+
def read_path
|
89
|
+
ENV['PATH'] if ENV
|
90
|
+
end
|
91
|
+
|
92
|
+
def path_should_not_be_set_automatically?
|
93
|
+
@set_path_automatically === false || @env[:PATH] || @env["PATH"]
|
94
|
+
end
|
78
95
|
|
79
96
|
def environment_variables
|
80
97
|
return if @env.empty?
|
@@ -88,21 +105,55 @@ module Whenever
|
|
88
105
|
output.join
|
89
106
|
end
|
90
107
|
|
108
|
+
#
|
109
|
+
# Takes the standard cron output that Whenever generates and finds
|
110
|
+
# similar entries that can be combined. For example: If a job should run
|
111
|
+
# at 3:02am and 4:02am, instead of creating two jobs this method combines
|
112
|
+
# them into one that runs on the 2nd minute at the 3rd and 4th hour.
|
113
|
+
#
|
114
|
+
def combine(entries)
|
115
|
+
entries.map! { |entry| entry.split(/ +/, 6) }
|
116
|
+
0.upto(4) do |f|
|
117
|
+
(entries.length-1).downto(1) do |i|
|
118
|
+
next if entries[i][f] == '*'
|
119
|
+
comparison = entries[i][0...f] + entries[i][f+1..-1]
|
120
|
+
(i-1).downto(0) do |j|
|
121
|
+
next if entries[j][f] == '*'
|
122
|
+
if comparison == entries[j][0...f] + entries[j][f+1..-1]
|
123
|
+
entries[j][f] += ',' + entries[i][f]
|
124
|
+
entries.delete_at(i)
|
125
|
+
break
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
entries.map { |entry| entry.join(' ') }
|
132
|
+
end
|
133
|
+
|
91
134
|
def cron_jobs
|
92
135
|
return if @jobs.empty?
|
93
136
|
|
94
|
-
|
137
|
+
shortcut_jobs = []
|
138
|
+
regular_jobs = []
|
139
|
+
|
95
140
|
@jobs.each do |time, jobs|
|
96
141
|
jobs.each do |job|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
142
|
+
Whenever::Output::Cron.output(time, job) do |cron|
|
143
|
+
cron << " >> #{job.cron_log} 2>&1" if job.cron_log
|
144
|
+
cron << "\n\n"
|
145
|
+
|
146
|
+
if cron.starts_with?("@")
|
147
|
+
shortcut_jobs << cron
|
148
|
+
else
|
149
|
+
regular_jobs << cron
|
150
|
+
end
|
151
|
+
end
|
101
152
|
end
|
102
153
|
end
|
103
|
-
|
104
|
-
|
154
|
+
|
155
|
+
shortcut_jobs.join + combine(regular_jobs).join
|
105
156
|
end
|
106
157
|
|
107
158
|
end
|
108
|
-
end
|
159
|
+
end
|
data/lib/job_types/runner.rb
CHANGED
data/lib/outputs/cron.rb
CHANGED
@@ -11,9 +11,23 @@ module Whenever
|
|
11
11
|
@at = at.is_a?(String) ? (Chronic.parse(at) || 0) : (at || 0)
|
12
12
|
end
|
13
13
|
|
14
|
-
def self.
|
15
|
-
|
16
|
-
|
14
|
+
def self.enumerate(item)
|
15
|
+
if item and item.is_a?(String)
|
16
|
+
items = item.split(',')
|
17
|
+
else
|
18
|
+
items = item
|
19
|
+
items = [items] unless items and items.respond_to?(:each)
|
20
|
+
end
|
21
|
+
items
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.output(times, job)
|
25
|
+
enumerate(times).each do |time|
|
26
|
+
enumerate(job.at).each do |at|
|
27
|
+
out = new(time, job.output, at)
|
28
|
+
yield "#{out.time_in_cron_syntax} #{out.task}"
|
29
|
+
end
|
30
|
+
end
|
17
31
|
end
|
18
32
|
|
19
33
|
def time_in_cron_syntax
|
@@ -114,4 +128,4 @@ module Whenever
|
|
114
128
|
end
|
115
129
|
|
116
130
|
end
|
117
|
-
end
|
131
|
+
end
|
data/lib/version.rb
CHANGED
data/test/command_line_test.rb
CHANGED
@@ -11,13 +11,13 @@ class CommandLineTest < Test::Unit::TestCase
|
|
11
11
|
end
|
12
12
|
|
13
13
|
should "output the cron job with identifier blocks" do
|
14
|
-
output = <<-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
output = <<-EXPECTED
|
15
|
+
# Begin Whenever generated tasks for: My identifier
|
16
|
+
#{@task}
|
17
|
+
# End Whenever generated tasks for: My identifier
|
18
|
+
EXPECTED
|
19
19
|
|
20
|
-
assert_equal
|
20
|
+
assert_equal output, @command.send(:whenever_cron)
|
21
21
|
end
|
22
22
|
|
23
23
|
should "write the crontab when run" do
|
@@ -38,49 +38,50 @@ class CommandLineTest < Test::Unit::TestCase
|
|
38
38
|
existing = '# Existing crontab'
|
39
39
|
@command.expects(:read_crontab).at_least_once.returns(existing)
|
40
40
|
|
41
|
-
new_cron = <<-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
new_cron = <<-EXPECTED
|
42
|
+
#{existing}
|
43
|
+
|
44
|
+
# Begin Whenever generated tasks for: My identifier
|
45
|
+
#{@task}
|
46
|
+
# End Whenever generated tasks for: My identifier
|
47
|
+
EXPECTED
|
48
48
|
|
49
|
-
assert_equal
|
49
|
+
assert_equal new_cron, @command.send(:updated_crontab)
|
50
50
|
|
51
|
-
@command.expects(:write_crontab).with(
|
51
|
+
@command.expects(:write_crontab).with(new_cron).returns(true)
|
52
52
|
assert @command.run
|
53
53
|
end
|
54
54
|
|
55
55
|
should "replace an existing block if the identifier matches" do
|
56
|
-
existing = <<-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
new_cron = <<-new_cron
|
70
|
-
# Something
|
71
|
-
|
72
|
-
# Begin Whenever generated tasks for: My identifier
|
73
|
-
#{@task}
|
74
|
-
# End Whenever generated tasks for: My identifier
|
56
|
+
existing = <<-EXISTING_CRON
|
57
|
+
# Something
|
58
|
+
|
59
|
+
# Begin Whenever generated tasks for: My identifier
|
60
|
+
My whenever job that was already here
|
61
|
+
# End Whenever generated tasks for: My identifier
|
62
|
+
|
63
|
+
# Begin Whenever generated tasks for: Other identifier
|
64
|
+
This shouldn't get replaced
|
65
|
+
# End Whenever generated tasks for: Other identifier
|
66
|
+
EXISTING_CRON
|
67
|
+
|
68
|
+
@command.expects(:read_crontab).at_least_once.returns(existing)
|
75
69
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
70
|
+
new_cron = <<-NEW_CRON
|
71
|
+
# Something
|
72
|
+
|
73
|
+
# Begin Whenever generated tasks for: My identifier
|
74
|
+
#{@task}
|
75
|
+
# End Whenever generated tasks for: My identifier
|
76
|
+
|
77
|
+
# Begin Whenever generated tasks for: Other identifier
|
78
|
+
This shouldn't get replaced
|
79
|
+
# End Whenever generated tasks for: Other identifier
|
80
|
+
NEW_CRON
|
80
81
|
|
81
|
-
assert_equal
|
82
|
+
assert_equal new_cron, @command.send(:updated_crontab)
|
82
83
|
|
83
|
-
@command.expects(:write_crontab).with(
|
84
|
+
@command.expects(:write_crontab).with(new_cron).returns(true)
|
84
85
|
assert @command.run
|
85
86
|
end
|
86
87
|
end
|
@@ -97,11 +98,4 @@ class CommandLineTest < Test::Unit::TestCase
|
|
97
98
|
end
|
98
99
|
end
|
99
100
|
|
100
|
-
private
|
101
|
-
|
102
|
-
def unindent(string)
|
103
|
-
indentation = string[/\A\s*/]
|
104
|
-
string.strip.gsub(/^#{indentation}/, "")
|
105
|
-
end
|
106
|
-
|
107
101
|
end
|
@@ -0,0 +1,178 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/test_helper")
|
2
|
+
|
3
|
+
class OutputAtTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
context "weekday at a (single) given time" do
|
6
|
+
setup do
|
7
|
+
@output = Whenever.cron \
|
8
|
+
<<-file
|
9
|
+
every "weekday", :at => '5:02am' do
|
10
|
+
command "blahblah"
|
11
|
+
end
|
12
|
+
file
|
13
|
+
end
|
14
|
+
|
15
|
+
should "output the command using that time" do
|
16
|
+
assert_match '2 5 * * 1-5 blahblah', @output
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
context "weekday at a multiple diverse times, via an array" do
|
21
|
+
setup do
|
22
|
+
@output = Whenever.cron \
|
23
|
+
<<-file
|
24
|
+
every "weekday", :at => %w(5:02am 3:52pm) do
|
25
|
+
command "blahblah"
|
26
|
+
end
|
27
|
+
file
|
28
|
+
end
|
29
|
+
|
30
|
+
should "output the commands for both times given" do
|
31
|
+
assert_match '2 5 * * 1-5 blahblah', @output
|
32
|
+
assert_match '52 15 * * 1-5 blahblah', @output
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "weekday at a multiple diverse times, comma separated" do
|
37
|
+
setup do
|
38
|
+
@output = Whenever.cron \
|
39
|
+
<<-file
|
40
|
+
every "weekday", :at => '5:02am, 3:52pm' do
|
41
|
+
command "blahblah"
|
42
|
+
end
|
43
|
+
file
|
44
|
+
end
|
45
|
+
|
46
|
+
should "output the commands for both times given" do
|
47
|
+
assert_match '2 5 * * 1-5 blahblah', @output
|
48
|
+
assert_match '52 15 * * 1-5 blahblah', @output
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context "weekday at a multiple aligned times" do
|
53
|
+
setup do
|
54
|
+
@output = Whenever.cron \
|
55
|
+
<<-file
|
56
|
+
every "weekday", :at => '5:02am, 3:02pm' do
|
57
|
+
command "blahblah"
|
58
|
+
end
|
59
|
+
file
|
60
|
+
end
|
61
|
+
|
62
|
+
should "output the command using one entry because the times are aligned" do
|
63
|
+
assert_match '2 5,15 * * 1-5 blahblah', @output
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "various days at a various aligned times" do
|
68
|
+
setup do
|
69
|
+
@output = Whenever.cron \
|
70
|
+
<<-file
|
71
|
+
every "mon,wed,fri", :at => '5:02am, 3:02pm' do
|
72
|
+
command "blahblah"
|
73
|
+
end
|
74
|
+
file
|
75
|
+
end
|
76
|
+
|
77
|
+
should "output the command using one entry because the times are aligned" do
|
78
|
+
assert_match '2 5,15 * * 1,3,5 blahblah', @output
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
context "various days at a various aligned times using a runner" do
|
83
|
+
setup do
|
84
|
+
@output = Whenever.cron \
|
85
|
+
<<-file
|
86
|
+
set :path, '/your/path'
|
87
|
+
every "mon,wed,fri", :at => '5:02am, 3:02pm' do
|
88
|
+
runner "blahblah"
|
89
|
+
end
|
90
|
+
file
|
91
|
+
end
|
92
|
+
|
93
|
+
should "output the runner using one entry because the times are aligned" do
|
94
|
+
assert_match '2 5,15 * * 1,3,5 /your/path/script/runner -e production "blahblah"', @output
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
context "various days at a various aligned times using a rake task" do
|
99
|
+
setup do
|
100
|
+
@output = Whenever.cron \
|
101
|
+
<<-file
|
102
|
+
set :path, '/your/path'
|
103
|
+
every "mon,wed,fri", :at => '5:02am, 3:02pm' do
|
104
|
+
rake "blah:blah"
|
105
|
+
end
|
106
|
+
file
|
107
|
+
end
|
108
|
+
|
109
|
+
should "output the rake task using one entry because the times are aligned" do
|
110
|
+
assert_match '2 5,15 * * 1,3,5 cd /your/path && RAILS_ENV=production /usr/bin/env rake blah:blah', @output
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
context "A command every 1.month at very diverse times" do
|
115
|
+
setup do
|
116
|
+
@output = Whenever.cron \
|
117
|
+
<<-file
|
118
|
+
every [1.month, 1.day], :at => 'beginning of the month at 5:02am, june 17th at 2:22pm, june 3rd at 3:33am' do
|
119
|
+
command "blahblah"
|
120
|
+
end
|
121
|
+
file
|
122
|
+
end
|
123
|
+
|
124
|
+
should "output 6 commands since none align" do
|
125
|
+
# The 1.month commands
|
126
|
+
assert_match '2 5 1 * * blahblah', @output
|
127
|
+
assert_match '22 14 17 * * blahblah', @output
|
128
|
+
assert_match '33 3 3 * * blahblah', @output
|
129
|
+
|
130
|
+
# The 1.day commands
|
131
|
+
assert_match '2 5 * * * blahblah', @output
|
132
|
+
assert_match '22 14 * * * blahblah', @output
|
133
|
+
assert_match '33 3 * * * blahblah', @output
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
context "Multiple commands output every :reboot" do
|
138
|
+
setup do
|
139
|
+
@output = Whenever.cron \
|
140
|
+
<<-file
|
141
|
+
every :reboot do
|
142
|
+
command "command_1"
|
143
|
+
command "command_2"
|
144
|
+
end
|
145
|
+
file
|
146
|
+
end
|
147
|
+
|
148
|
+
should "output both commands @reboot" do
|
149
|
+
assert_match "@reboot command_1", @output
|
150
|
+
assert_match "@reboot command_2", @output
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
context "Many different job types output every :day" do
|
155
|
+
setup do
|
156
|
+
@output = Whenever.cron \
|
157
|
+
<<-file
|
158
|
+
set :path, '/your/path'
|
159
|
+
every :day do
|
160
|
+
rake "blah:blah"
|
161
|
+
runner "runner_1"
|
162
|
+
command "command_1"
|
163
|
+
runner "runner_2"
|
164
|
+
command "command_2"
|
165
|
+
end
|
166
|
+
file
|
167
|
+
end
|
168
|
+
|
169
|
+
should "output all of the commands @daily" do
|
170
|
+
assert_match '@daily cd /your/path && RAILS_ENV=production /usr/bin/env rake blah:blah', @output
|
171
|
+
assert_match '@daily /your/path/script/runner -e production "runner_1"', @output
|
172
|
+
assert_match '@daily command_1', @output
|
173
|
+
assert_match '@daily /your/path/script/runner -e production "runner_2"', @output
|
174
|
+
assert_match '@daily command_2', @output
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
end
|
data/test/output_command_test.rb
CHANGED
@@ -84,4 +84,21 @@ class OutputCommandTest < Test::Unit::TestCase
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
+
context "An every statement with two commands in it" do
|
88
|
+
setup do
|
89
|
+
@output = Whenever.cron \
|
90
|
+
<<-file
|
91
|
+
every 1.hour do
|
92
|
+
command "first"
|
93
|
+
command "second"
|
94
|
+
end
|
95
|
+
file
|
96
|
+
end
|
97
|
+
|
98
|
+
should "output both commands" do
|
99
|
+
assert_match "0 * * * * first", @output
|
100
|
+
assert_match "0 * * * * second", @output
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
87
104
|
end
|
data/test/output_env_test.rb
CHANGED
@@ -19,5 +19,38 @@ class OutputEnvTest < Test::Unit::TestCase
|
|
19
19
|
assert_match "MAILTO=someone@example.com", @output
|
20
20
|
end
|
21
21
|
end
|
22
|
+
|
23
|
+
context "No PATH environment variable set" do
|
24
|
+
setup do
|
25
|
+
Whenever::JobList.any_instance.expects(:read_path).at_least_once.returns('/usr/local/bin')
|
26
|
+
@output = Whenever.cron ""
|
27
|
+
end
|
28
|
+
|
29
|
+
should "add a PATH variable based on the user's PATH" do
|
30
|
+
assert_match "PATH=/usr/local/bin", @output
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context "A PATH environment variable set" do
|
35
|
+
setup do
|
36
|
+
Whenever::JobList.stubs(:read_path).returns('/usr/local/bin')
|
37
|
+
@output = Whenever.cron "env :PATH, '/my/path'"
|
38
|
+
end
|
39
|
+
|
40
|
+
should "use that path and the user's PATH" do
|
41
|
+
assert_match "PATH=/my/path", @output
|
42
|
+
assert_no_match /local/, @output
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
context "No PATH set and instructed not to automatically load the user's path" do
|
47
|
+
setup do
|
48
|
+
@output = Whenever.cron "set :set_path_automatically, false"
|
49
|
+
end
|
50
|
+
|
51
|
+
should "not have a PATH set" do
|
52
|
+
assert_no_match /PATH/, @output
|
53
|
+
end
|
54
|
+
end
|
22
55
|
|
23
56
|
end
|
data/test/output_runner_test.rb
CHANGED
@@ -190,4 +190,20 @@ class OutputRunnerTest < Test::Unit::TestCase
|
|
190
190
|
end
|
191
191
|
end
|
192
192
|
|
193
|
-
|
193
|
+
context "A runner which makes use of double quotes" do
|
194
|
+
setup do
|
195
|
+
@output = Whenever.cron \
|
196
|
+
<<-file
|
197
|
+
set :path, '/my/path'
|
198
|
+
every 2.hours do
|
199
|
+
runner 'Product.import("http://example.com/product.xml")'
|
200
|
+
end
|
201
|
+
file
|
202
|
+
end
|
203
|
+
|
204
|
+
should "output the runner using the original environmnet" do
|
205
|
+
assert_match two_hours + ' /my/path/script/runner -e production "Product.import(\"http://example.com/product.xml\")"', @output
|
206
|
+
end
|
207
|
+
end
|
208
|
+
|
209
|
+
end
|
data/whenever.gemspec
CHANGED
@@ -2,28 +2,27 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{whenever}
|
5
|
-
s.version = "0.3.
|
5
|
+
s.version = "0.3.7"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Javan Makhmali"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-09-04}
|
10
10
|
s.description = %q{Provides clean ruby syntax for defining messy cron jobs and running them Whenever.}
|
11
11
|
s.email = %q{javan@javan.us}
|
12
12
|
s.executables = ["whenever", "wheneverize"]
|
13
13
|
s.extra_rdoc_files = ["bin/whenever", "bin/wheneverize", "CHANGELOG.rdoc", "lib/base.rb", "lib/command_line.rb", "lib/job_list.rb", "lib/job_types/default.rb", "lib/job_types/rake_task.rb", "lib/job_types/runner.rb", "lib/outputs/cron.rb", "lib/version.rb", "lib/whenever.rb", "README.rdoc"]
|
14
|
-
s.files = ["bin/whenever", "bin/wheneverize", "CHANGELOG.rdoc", "lib/base.rb", "lib/command_line.rb", "lib/job_list.rb", "lib/job_types/default.rb", "lib/job_types/rake_task.rb", "lib/job_types/runner.rb", "lib/outputs/cron.rb", "lib/version.rb", "lib/whenever.rb", "Manifest", "Rakefile", "README.rdoc", "test/command_line_test.rb", "test/cron_test.rb", "test/output_command_test.rb", "test/output_env_test.rb", "test/output_rake_test.rb", "test/output_runner_test.rb", "test/test_helper.rb", "whenever.gemspec"]
|
15
|
-
s.has_rdoc = true
|
14
|
+
s.files = ["bin/whenever", "bin/wheneverize", "CHANGELOG.rdoc", "lib/base.rb", "lib/command_line.rb", "lib/job_list.rb", "lib/job_types/default.rb", "lib/job_types/rake_task.rb", "lib/job_types/runner.rb", "lib/outputs/cron.rb", "lib/version.rb", "lib/whenever.rb", "Manifest", "Rakefile", "README.rdoc", "test/command_line_test.rb", "test/cron_test.rb", "test/output_at_test.rb", "test/output_command_test.rb", "test/output_env_test.rb", "test/output_rake_test.rb", "test/output_runner_test.rb", "test/test_helper.rb", "whenever.gemspec"]
|
16
15
|
s.homepage = %q{http://github.com/javan/whenever}
|
17
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Whenever", "--main", "README.rdoc"]
|
18
17
|
s.require_paths = ["lib"]
|
19
18
|
s.rubyforge_project = %q{whenever}
|
20
|
-
s.rubygems_version = %q{1.3.
|
19
|
+
s.rubygems_version = %q{1.3.5}
|
21
20
|
s.summary = %q{Provides clean ruby syntax for defining messy cron jobs and running them Whenever.}
|
22
|
-
s.test_files = ["test/command_line_test.rb", "test/cron_test.rb", "test/output_command_test.rb", "test/output_env_test.rb", "test/output_rake_test.rb", "test/output_runner_test.rb", "test/test_helper.rb"]
|
21
|
+
s.test_files = ["test/command_line_test.rb", "test/cron_test.rb", "test/output_at_test.rb", "test/output_command_test.rb", "test/output_env_test.rb", "test/output_rake_test.rb", "test/output_runner_test.rb", "test/test_helper.rb"]
|
23
22
|
|
24
23
|
if s.respond_to? :specification_version then
|
25
24
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
26
|
-
s.specification_version =
|
25
|
+
s.specification_version = 3
|
27
26
|
|
28
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
29
28
|
s.add_runtime_dependency(%q<chronic>, [">= 0.2.3"])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: javan-whenever
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javan Makhmali
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-04 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -61,13 +61,14 @@ files:
|
|
61
61
|
- README.rdoc
|
62
62
|
- test/command_line_test.rb
|
63
63
|
- test/cron_test.rb
|
64
|
+
- test/output_at_test.rb
|
64
65
|
- test/output_command_test.rb
|
65
66
|
- test/output_env_test.rb
|
66
67
|
- test/output_rake_test.rb
|
67
68
|
- test/output_runner_test.rb
|
68
69
|
- test/test_helper.rb
|
69
70
|
- whenever.gemspec
|
70
|
-
has_rdoc:
|
71
|
+
has_rdoc: false
|
71
72
|
homepage: http://github.com/javan/whenever
|
72
73
|
post_install_message:
|
73
74
|
rdoc_options:
|
@@ -96,11 +97,12 @@ requirements: []
|
|
96
97
|
rubyforge_project: whenever
|
97
98
|
rubygems_version: 1.2.0
|
98
99
|
signing_key:
|
99
|
-
specification_version:
|
100
|
+
specification_version: 3
|
100
101
|
summary: Provides clean ruby syntax for defining messy cron jobs and running them Whenever.
|
101
102
|
test_files:
|
102
103
|
- test/command_line_test.rb
|
103
104
|
- test/cron_test.rb
|
105
|
+
- test/output_at_test.rb
|
104
106
|
- test/output_command_test.rb
|
105
107
|
- test/output_env_test.rb
|
106
108
|
- test/output_rake_test.rb
|