whenever-benlangfeld 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +6 -0
- data/.travis.yml +18 -0
- data/CHANGELOG.md +333 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +260 -0
- data/Rakefile +10 -0
- data/bin/whenever +41 -0
- data/bin/wheneverize +68 -0
- data/gemfiles/activesupport4.1.gemfile +5 -0
- data/gemfiles/activesupport4.2.gemfile +5 -0
- data/lib/whenever.rb +34 -0
- data/lib/whenever/capistrano.rb +7 -0
- data/lib/whenever/capistrano/v2/hooks.rb +8 -0
- data/lib/whenever/capistrano/v2/recipes.rb +48 -0
- data/lib/whenever/capistrano/v2/support.rb +53 -0
- data/lib/whenever/capistrano/v3/tasks/whenever.rake +45 -0
- data/lib/whenever/command_line.rb +135 -0
- data/lib/whenever/cron.rb +153 -0
- data/lib/whenever/job.rb +54 -0
- data/lib/whenever/job_list.rb +155 -0
- data/lib/whenever/numeric.rb +13 -0
- data/lib/whenever/numeric_seconds.rb +48 -0
- data/lib/whenever/os.rb +7 -0
- data/lib/whenever/output_redirection.rb +57 -0
- data/lib/whenever/setup.rb +26 -0
- data/lib/whenever/tasks/whenever.rake +1 -0
- data/lib/whenever/version.rb +3 -0
- data/test/functional/command_line_test.rb +331 -0
- data/test/functional/output_at_test.rb +207 -0
- data/test/functional/output_default_defined_jobs_test.rb +296 -0
- data/test/functional/output_defined_job_test.rb +85 -0
- data/test/functional/output_env_test.rb +29 -0
- data/test/functional/output_jobs_for_roles_test.rb +65 -0
- data/test/functional/output_redirection_test.rb +248 -0
- data/test/test_case.rb +32 -0
- data/test/test_helper.rb +37 -0
- data/test/unit/capistrano_support_test.rb +147 -0
- data/test/unit/cron_test.rb +244 -0
- data/test/unit/job_test.rb +114 -0
- data/whenever.gemspec +27 -0
- metadata +167 -0
@@ -0,0 +1,244 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class CronTest < Whenever::TestCase
|
4
|
+
should "raise if less than 1 minute" do
|
5
|
+
assert_raises ArgumentError do
|
6
|
+
parse_time(Whenever.seconds(59, :seconds))
|
7
|
+
end
|
8
|
+
|
9
|
+
assert_raises ArgumentError do
|
10
|
+
parse_time(Whenever.seconds(0, :minutes))
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# For sanity, do some tests on straight cron-syntax strings
|
15
|
+
should "parse correctly" do
|
16
|
+
assert_equal '* * * * *', parse_time(Whenever.seconds(1, :minute))
|
17
|
+
assert_equal '0,5,10,15,20,25,30,35,40,45,50,55 * * * *', parse_time(Whenever.seconds(5, :minutes))
|
18
|
+
assert_equal '7,14,21,28,35,42,49,56 * * * *', parse_time(Whenever.seconds(7, :minutes))
|
19
|
+
assert_equal '0,30 * * * *', parse_time(Whenever.seconds(30, :minutes))
|
20
|
+
assert_equal '32 * * * *', parse_time(Whenever.seconds(32, :minutes))
|
21
|
+
assert '60 * * * *' != parse_time(Whenever.seconds(60, :minutes)) # 60 minutes bumps up into the hour range
|
22
|
+
end
|
23
|
+
|
24
|
+
# Test all minutes
|
25
|
+
(2..59).each do |num|
|
26
|
+
should "parse correctly for #{num} minutes" do
|
27
|
+
start = 0
|
28
|
+
start += num unless 60.modulo(num).zero?
|
29
|
+
minutes = (start..59).step(num).to_a
|
30
|
+
|
31
|
+
assert_equal "#{minutes.join(',')} * * * *", parse_time(Whenever.seconds(num, :minutes))
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class CronParseHoursTest < Whenever::TestCase
|
37
|
+
should "parse correctly" do
|
38
|
+
assert_equal '0 * * * *', parse_time(Whenever.seconds(1, :hour))
|
39
|
+
assert_equal '0 0,2,4,6,8,10,12,14,16,18,20,22 * * *', parse_time(Whenever.seconds(2, :hours))
|
40
|
+
assert_equal '0 0,3,6,9,12,15,18,21 * * *', parse_time(Whenever.seconds(3, :hours))
|
41
|
+
assert_equal '0 5,10,15,20 * * *', parse_time(Whenever.seconds(5, :hours))
|
42
|
+
assert_equal '0 17 * * *', parse_time(Whenever.seconds(17, :hours))
|
43
|
+
assert '0 24 * * *' != parse_time(Whenever.seconds(24, :hours)) # 24 hours bumps up into the day range
|
44
|
+
end
|
45
|
+
|
46
|
+
(2..23).each do |num|
|
47
|
+
should "parse correctly for #{num} hours" do
|
48
|
+
start = 0
|
49
|
+
start += num unless 24.modulo(num).zero?
|
50
|
+
hours = (start..23).step(num).to_a
|
51
|
+
|
52
|
+
assert_equal "0 #{hours.join(',')} * * *", parse_time(Whenever.seconds(num, :hours))
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
should "parse correctly when given an 'at' with minutes as an Integer" do
|
57
|
+
assert_minutes_equals "1", 1
|
58
|
+
assert_minutes_equals "14", 14
|
59
|
+
assert_minutes_equals "27", 27
|
60
|
+
assert_minutes_equals "55", 55
|
61
|
+
end
|
62
|
+
|
63
|
+
should "parse correctly when given an 'at' with minutes as a Time" do
|
64
|
+
# Basically just testing that Chronic parses some times and we get the minutes out of it
|
65
|
+
assert_minutes_equals "1", '3:01am'
|
66
|
+
assert_minutes_equals "1", 'January 21 2:01 PM'
|
67
|
+
assert_minutes_equals "0", 'midnight'
|
68
|
+
assert_minutes_equals "59", '13:59'
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class CronParseDaysTest < Whenever::TestCase
|
73
|
+
should "parse correctly" do
|
74
|
+
assert_equal '0 0 * * *', parse_time(Whenever.seconds(1, :days))
|
75
|
+
assert_equal '0 0 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 * *', parse_time(Whenever.seconds(2, :days))
|
76
|
+
assert_equal '0 0 1,5,9,13,17,21,25,29 * *', parse_time(Whenever.seconds(4, :days))
|
77
|
+
assert_equal '0 0 1,8,15,22 * *', parse_time(Whenever.seconds(7, :days))
|
78
|
+
assert_equal '0 0 1,17 * *', parse_time(Whenever.seconds(16, :days))
|
79
|
+
assert_equal '0 0 17 * *', parse_time(Whenever.seconds(17, :days))
|
80
|
+
assert_equal '0 0 29 * *', parse_time(Whenever.seconds(29, :days))
|
81
|
+
assert '0 0 30 * *' != parse_time(Whenever.seconds(30, :days)) # 30 days bumps into the month range
|
82
|
+
end
|
83
|
+
|
84
|
+
should "parse correctly when given an 'at' with hours, minutes as a Time" do
|
85
|
+
# first param is an array with [hours, minutes]
|
86
|
+
assert_hours_and_minutes_equals %w(3 45), '3:45am'
|
87
|
+
assert_hours_and_minutes_equals %w(20 1), '8:01pm'
|
88
|
+
assert_hours_and_minutes_equals %w(0 0), 'midnight'
|
89
|
+
assert_hours_and_minutes_equals %w(1 23), '1:23 AM'
|
90
|
+
assert_hours_and_minutes_equals %w(23 59), 'March 21 11:59 pM'
|
91
|
+
end
|
92
|
+
|
93
|
+
should "parse correctly when given an 'at' with hours as an Integer" do
|
94
|
+
# first param is an array with [hours, minutes]
|
95
|
+
assert_hours_and_minutes_equals %w(1 0), 1
|
96
|
+
assert_hours_and_minutes_equals %w(3 0), 3
|
97
|
+
assert_hours_and_minutes_equals %w(15 0), 15
|
98
|
+
assert_hours_and_minutes_equals %w(19 0), 19
|
99
|
+
assert_hours_and_minutes_equals %w(23 0), 23
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class CronParseMonthsTest < Whenever::TestCase
|
104
|
+
should "parse correctly" do
|
105
|
+
assert_equal '0 0 1 * *', parse_time(Whenever.seconds(1, :month))
|
106
|
+
assert_equal '0 0 1 1,3,5,7,9,11 *', parse_time(Whenever.seconds(2, :months))
|
107
|
+
assert_equal '0 0 1 1,4,7,10 *', parse_time(Whenever.seconds(3, :months))
|
108
|
+
assert_equal '0 0 1 1,5,9 *', parse_time(Whenever.seconds(4, :months))
|
109
|
+
assert_equal '0 0 1 1,6 *', parse_time(Whenever.seconds(5, :months))
|
110
|
+
assert_equal '0 0 1 7 *', parse_time(Whenever.seconds(7, :months))
|
111
|
+
assert_equal '0 0 1 8 *', parse_time(Whenever.seconds(8, :months))
|
112
|
+
assert_equal '0 0 1 9 *', parse_time(Whenever.seconds(9, :months))
|
113
|
+
assert_equal '0 0 1 10 *', parse_time(Whenever.seconds(10, :months))
|
114
|
+
assert_equal '0 0 1 11 *', parse_time(Whenever.seconds(11, :months))
|
115
|
+
assert_equal '0 0 1 12 *', parse_time(Whenever.seconds(12, :months))
|
116
|
+
end
|
117
|
+
|
118
|
+
should "parse months with a date and/or time" do
|
119
|
+
# should set the day to 1 if no date is given
|
120
|
+
assert_equal '0 17 1 * *', parse_time(Whenever.seconds(1, :month), nil, "5pm")
|
121
|
+
# should use the date if one is given
|
122
|
+
assert_equal '0 2 23 * *', parse_time(Whenever.seconds(1, :month), nil, "February 23rd at 2am")
|
123
|
+
# should use an iteger as the day
|
124
|
+
assert_equal '0 0 5 * *', parse_time(Whenever.seconds(1, :month), nil, 5)
|
125
|
+
end
|
126
|
+
|
127
|
+
should "parse correctly when given an 'at' with days, hours, minutes as a Time" do
|
128
|
+
# first param is an array with [days, hours, minutes]
|
129
|
+
assert_days_and_hours_and_minutes_equals %w(1 3 45), 'January 1st 3:45am'
|
130
|
+
assert_days_and_hours_and_minutes_equals %w(11 23 0), 'Feb 11 11PM'
|
131
|
+
assert_days_and_hours_and_minutes_equals %w(22 1 1), 'march 22nd at 1:01 am'
|
132
|
+
assert_days_and_hours_and_minutes_equals %w(23 0 0), 'march 22nd at midnight' # looks like midnight means the next day
|
133
|
+
end
|
134
|
+
|
135
|
+
should "parse correctly when given an 'at' with days as an Integer" do
|
136
|
+
# first param is an array with [days, hours, minutes]
|
137
|
+
assert_days_and_hours_and_minutes_equals %w(1 0 0), 1
|
138
|
+
assert_days_and_hours_and_minutes_equals %w(15 0 0), 15
|
139
|
+
assert_days_and_hours_and_minutes_equals %w(29 0 0), 29
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
class CronParseDaysOfWeekTest < Whenever::TestCase
|
144
|
+
should "parse days of the week correctly" do
|
145
|
+
{
|
146
|
+
'0' => %w(sun Sunday SUNDAY SUN),
|
147
|
+
'1' => %w(mon Monday MONDAY MON),
|
148
|
+
'2' => %w(tue tues Tuesday TUESDAY TUE),
|
149
|
+
'3' => %w(wed Wednesday WEDNESDAY WED),
|
150
|
+
'4' => %w(thu thurs thur Thursday THURSDAY THU),
|
151
|
+
'5' => %w(fri Friday FRIDAY FRI),
|
152
|
+
'6' => %w(sat Saturday SATURDAY SAT)
|
153
|
+
}.each do |day, day_tests|
|
154
|
+
day_tests.each do |day_test|
|
155
|
+
assert_equal "0 0 * * #{day}", parse_time(day_test)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
should "allow additional directives" do
|
161
|
+
assert_equal '30 13 * * 5', parse_time('friday', nil, "1:30 pm")
|
162
|
+
assert_equal '22 2 * * 1', parse_time('Monday', nil, "2:22am")
|
163
|
+
assert_equal '55 17 * * 4', parse_time('THU', nil, "5:55PM")
|
164
|
+
end
|
165
|
+
|
166
|
+
should "parse weekday correctly" do
|
167
|
+
assert_equal '0 0 * * 1-5', parse_time('weekday')
|
168
|
+
assert_equal '0 0 * * 1-5', parse_time('Weekdays')
|
169
|
+
assert_equal '0 1 * * 1-5', parse_time('Weekdays', nil, "1:00 am")
|
170
|
+
assert_equal '59 5 * * 1-5', parse_time('Weekdays', nil, "5:59 am")
|
171
|
+
end
|
172
|
+
|
173
|
+
should "parse weekend correctly" do
|
174
|
+
assert_equal '0 0 * * 6,0', parse_time('weekend')
|
175
|
+
assert_equal '0 0 * * 6,0', parse_time('Weekends')
|
176
|
+
assert_equal '0 7 * * 6,0', parse_time('Weekends', nil, "7am")
|
177
|
+
assert_equal '2 18 * * 6,0', parse_time('Weekends', nil, "6:02PM")
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
class CronParseShortcutsTest < Whenever::TestCase
|
182
|
+
should "parse a :symbol into the correct shortcut" do
|
183
|
+
assert_equal '@reboot', parse_time(:reboot)
|
184
|
+
assert_equal '@annually', parse_time(:annually)
|
185
|
+
assert_equal '@yearly', parse_time(:yearly)
|
186
|
+
assert_equal '@daily', parse_time(:daily)
|
187
|
+
assert_equal '@midnight', parse_time(:midnight)
|
188
|
+
assert_equal '@monthly', parse_time(:monthly)
|
189
|
+
assert_equal '@weekly', parse_time(:weekly)
|
190
|
+
assert_equal '@hourly', parse_time(:hourly)
|
191
|
+
end
|
192
|
+
|
193
|
+
should "convert time-based shortcuts to times" do
|
194
|
+
assert_equal '0 0 1 * *', parse_time(:month)
|
195
|
+
assert_equal '0 0 * * *', parse_time(:day)
|
196
|
+
assert_equal '0 * * * *', parse_time(:hour)
|
197
|
+
assert_equal '0 0 1 12 *', parse_time(:year)
|
198
|
+
assert_equal '0 0 1,8,15,22 * *', parse_time(:week)
|
199
|
+
end
|
200
|
+
|
201
|
+
should "raise an exception if a valid shortcut is given but also an :at" do
|
202
|
+
assert_raises ArgumentError do
|
203
|
+
parse_time(:hourly, nil, "1:00 am")
|
204
|
+
end
|
205
|
+
|
206
|
+
assert_raises ArgumentError do
|
207
|
+
parse_time(:reboot, nil, 5)
|
208
|
+
end
|
209
|
+
|
210
|
+
assert_raises ArgumentError do
|
211
|
+
parse_time(:daily, nil, '4:20pm')
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
class CronParseRubyTimeTest < Whenever::TestCase
|
217
|
+
should "process things like `1.day` correctly" do
|
218
|
+
assert_equal "0 0 * * *", parse_time(1.day)
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
class CronParseRawTest < Whenever::TestCase
|
223
|
+
should "raise if cron-syntax string is too long" do
|
224
|
+
assert_raises ArgumentError do
|
225
|
+
parse_time('* * * * * *')
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
should "raise if cron-syntax string is invalid" do
|
230
|
+
assert_raises ArgumentError do
|
231
|
+
parse_time('** * * * *')
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
should "return the same cron sytax" do
|
236
|
+
crons = ['0 0 27-31 * *', '* * * * *', '2/3 1,9,22 11-26 1-6 *', '*/5 6-23 * * *',
|
237
|
+
"*\t*\t*\t*\t*",
|
238
|
+
'@reboot', '@yearly', '@annually', '@monthly', '@weekly',
|
239
|
+
'@daily', '@midnight', '@hourly']
|
240
|
+
crons.each do |cron|
|
241
|
+
assert_equal cron, parse_time(cron)
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
@@ -0,0 +1,114 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class JobTest < Whenever::TestCase
|
4
|
+
should "return the :at set when #at is called" do
|
5
|
+
assert_equal 'foo', new_job(:at => 'foo').at
|
6
|
+
end
|
7
|
+
|
8
|
+
should "return the :roles set when #roles is called" do
|
9
|
+
assert_equal ['foo', 'bar'], new_job(:roles => ['foo', 'bar']).roles
|
10
|
+
end
|
11
|
+
|
12
|
+
should "return whether it has a role from #has_role?" do
|
13
|
+
assert new_job(:roles => 'foo').has_role?('foo')
|
14
|
+
assert_equal false, new_job(:roles => 'bar').has_role?('foo')
|
15
|
+
end
|
16
|
+
|
17
|
+
should "substitute the :task when #output is called" do
|
18
|
+
job = new_job(:template => ":task", :task => 'abc123')
|
19
|
+
assert_equal 'abc123', job.output
|
20
|
+
end
|
21
|
+
|
22
|
+
should "substitute the :path when #output is called" do
|
23
|
+
assert_equal 'foo', new_job(:template => ':path', :path => 'foo').output
|
24
|
+
end
|
25
|
+
|
26
|
+
should "substitute the :path with the default Whenever.path if none is provided when #output is called" do
|
27
|
+
Whenever.expects(:path).returns('/my/path')
|
28
|
+
assert_equal '/my/path', new_job(:template => ':path').output
|
29
|
+
end
|
30
|
+
|
31
|
+
should "not substitute parameters for which no value is set" do
|
32
|
+
assert_equal 'Hello :world', new_job(:template => ':matching :world', :matching => 'Hello').output
|
33
|
+
end
|
34
|
+
|
35
|
+
should "escape the :path" do
|
36
|
+
assert_equal '/my/spacey\ path', new_job(:template => ':path', :path => '/my/spacey path').output
|
37
|
+
end
|
38
|
+
|
39
|
+
should "escape percent signs" do
|
40
|
+
job = new_job(
|
41
|
+
:template => "before :foo after",
|
42
|
+
:foo => "percent -> % <- percent"
|
43
|
+
)
|
44
|
+
assert_equal %q(before percent -> \% <- percent after), job.output
|
45
|
+
end
|
46
|
+
|
47
|
+
should "assume percent signs are not already escaped" do
|
48
|
+
job = new_job(
|
49
|
+
:template => "before :foo after",
|
50
|
+
:foo => %q(percent preceded by a backslash -> \% <-)
|
51
|
+
)
|
52
|
+
assert_equal %q(before percent preceded by a backslash -> \\\% <- after), job.output
|
53
|
+
end
|
54
|
+
|
55
|
+
should "squish spaces and newlines" do
|
56
|
+
job = new_job(
|
57
|
+
:template => "before :foo after",
|
58
|
+
:foo => "newline -> \n <- newline space -> <- space"
|
59
|
+
)
|
60
|
+
|
61
|
+
assert_equal "before newline -> <- newline space -> <- space after", job.output
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
|
66
|
+
class JobWithQuotesTest < Whenever::TestCase
|
67
|
+
should "output the :task if it's in single quotes" do
|
68
|
+
job = new_job(:template => "':task'", :task => 'abc123')
|
69
|
+
assert_equal %q('abc123'), job.output
|
70
|
+
end
|
71
|
+
|
72
|
+
should "output the :task if it's in double quotes" do
|
73
|
+
job = new_job(:template => '":task"', :task => 'abc123')
|
74
|
+
assert_equal %q("abc123"), job.output
|
75
|
+
end
|
76
|
+
|
77
|
+
should "output escaped single quotes in when it's wrapped in them" do
|
78
|
+
job = new_job(
|
79
|
+
:template => "before ':foo' after",
|
80
|
+
:foo => "quote -> ' <- quote"
|
81
|
+
)
|
82
|
+
assert_equal %q(before 'quote -> '\'' <- quote' after), job.output
|
83
|
+
end
|
84
|
+
|
85
|
+
should "output escaped double quotes when it's wrapped in them" do
|
86
|
+
job = new_job(
|
87
|
+
:template => 'before ":foo" after',
|
88
|
+
:foo => 'quote -> " <- quote'
|
89
|
+
)
|
90
|
+
assert_equal %q(before "quote -> \" <- quote" after), job.output
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
class JobWithJobTemplateTest < Whenever::TestCase
|
95
|
+
should "use the job template" do
|
96
|
+
job = new_job(:template => ':task', :task => 'abc123', :job_template => 'left :job right')
|
97
|
+
assert_equal 'left abc123 right', job.output
|
98
|
+
end
|
99
|
+
|
100
|
+
should "reuse parameter in the job template" do
|
101
|
+
job = new_job(:template => ':path :task', :path => 'path', :task => "abc123", :job_template => ':path left :job right')
|
102
|
+
assert_equal 'path left path abc123 right', job.output
|
103
|
+
end
|
104
|
+
|
105
|
+
should "escape single quotes" do
|
106
|
+
job = new_job(:template => "before ':task' after", :task => "quote -> ' <- quote", :job_template => "left ':job' right")
|
107
|
+
assert_equal %q(left 'before '\''quote -> '\\''\\'\\'''\\'' <- quote'\'' after' right), job.output
|
108
|
+
end
|
109
|
+
|
110
|
+
should "escape double quotes" do
|
111
|
+
job = new_job(:template => 'before ":task" after', :task => 'quote -> " <- quote', :job_template => 'left ":job" right')
|
112
|
+
assert_equal %q(left "before \"quote -> \\\" <- quote\" after" right), job.output
|
113
|
+
end
|
114
|
+
end
|
data/whenever.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "whenever/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "whenever-benlangfeld"
|
7
|
+
s.version = Whenever::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Javan Makhmali"]
|
10
|
+
s.email = ["javan@javan.us"]
|
11
|
+
s.license = "MIT"
|
12
|
+
s.homepage = ""
|
13
|
+
s.summary = %q{Cron jobs in ruby.}
|
14
|
+
s.description = %q{Clean ruby syntax for writing and deploying cron jobs.}
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- test/{functional,unit}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
s.required_ruby_version = ">= 1.9.3"
|
20
|
+
|
21
|
+
s.add_dependency "chronic", ">= 0.6.3"
|
22
|
+
|
23
|
+
s.add_development_dependency "bundler"
|
24
|
+
s.add_development_dependency "rake"
|
25
|
+
s.add_development_dependency "mocha", ">= 0.9.5"
|
26
|
+
s.add_development_dependency "minitest"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: whenever-benlangfeld
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Javan Makhmali
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: chronic
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.6.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.6.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: mocha
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.9.5
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.9.5
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Clean ruby syntax for writing and deploying cron jobs.
|
84
|
+
email:
|
85
|
+
- javan@javan.us
|
86
|
+
executables:
|
87
|
+
- whenever
|
88
|
+
- wheneverize
|
89
|
+
extensions: []
|
90
|
+
extra_rdoc_files: []
|
91
|
+
files:
|
92
|
+
- ".gitignore"
|
93
|
+
- ".travis.yml"
|
94
|
+
- CHANGELOG.md
|
95
|
+
- Gemfile
|
96
|
+
- LICENSE
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- bin/whenever
|
100
|
+
- bin/wheneverize
|
101
|
+
- gemfiles/activesupport4.1.gemfile
|
102
|
+
- gemfiles/activesupport4.2.gemfile
|
103
|
+
- lib/whenever.rb
|
104
|
+
- lib/whenever/capistrano.rb
|
105
|
+
- lib/whenever/capistrano/v2/hooks.rb
|
106
|
+
- lib/whenever/capistrano/v2/recipes.rb
|
107
|
+
- lib/whenever/capistrano/v2/support.rb
|
108
|
+
- lib/whenever/capistrano/v3/tasks/whenever.rake
|
109
|
+
- lib/whenever/command_line.rb
|
110
|
+
- lib/whenever/cron.rb
|
111
|
+
- lib/whenever/job.rb
|
112
|
+
- lib/whenever/job_list.rb
|
113
|
+
- lib/whenever/numeric.rb
|
114
|
+
- lib/whenever/numeric_seconds.rb
|
115
|
+
- lib/whenever/os.rb
|
116
|
+
- lib/whenever/output_redirection.rb
|
117
|
+
- lib/whenever/setup.rb
|
118
|
+
- lib/whenever/tasks/whenever.rake
|
119
|
+
- lib/whenever/version.rb
|
120
|
+
- test/functional/command_line_test.rb
|
121
|
+
- test/functional/output_at_test.rb
|
122
|
+
- test/functional/output_default_defined_jobs_test.rb
|
123
|
+
- test/functional/output_defined_job_test.rb
|
124
|
+
- test/functional/output_env_test.rb
|
125
|
+
- test/functional/output_jobs_for_roles_test.rb
|
126
|
+
- test/functional/output_redirection_test.rb
|
127
|
+
- test/test_case.rb
|
128
|
+
- test/test_helper.rb
|
129
|
+
- test/unit/capistrano_support_test.rb
|
130
|
+
- test/unit/cron_test.rb
|
131
|
+
- test/unit/job_test.rb
|
132
|
+
- whenever.gemspec
|
133
|
+
homepage: ''
|
134
|
+
licenses:
|
135
|
+
- MIT
|
136
|
+
metadata: {}
|
137
|
+
post_install_message:
|
138
|
+
rdoc_options: []
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 1.9.3
|
146
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
requirements: []
|
152
|
+
rubyforge_project:
|
153
|
+
rubygems_version: 2.5.1
|
154
|
+
signing_key:
|
155
|
+
specification_version: 4
|
156
|
+
summary: Cron jobs in ruby.
|
157
|
+
test_files:
|
158
|
+
- test/functional/command_line_test.rb
|
159
|
+
- test/functional/output_at_test.rb
|
160
|
+
- test/functional/output_default_defined_jobs_test.rb
|
161
|
+
- test/functional/output_defined_job_test.rb
|
162
|
+
- test/functional/output_env_test.rb
|
163
|
+
- test/functional/output_jobs_for_roles_test.rb
|
164
|
+
- test/functional/output_redirection_test.rb
|
165
|
+
- test/unit/capistrano_support_test.rb
|
166
|
+
- test/unit/cron_test.rb
|
167
|
+
- test/unit/job_test.rb
|