rufus-scheduler 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +2 -1
- data/lib/rufus/scheduler.rb +13 -1
- metadata +1 -1
data/CHANGELOG.txt
CHANGED
@@ -2,8 +2,9 @@
|
|
2
2
|
= rufus-scheduler CHANGELOG.txt
|
3
3
|
|
4
4
|
|
5
|
-
== rufus-scheduler - 1.0.
|
5
|
+
== rufus-scheduler - 1.0.9 released 2008/07/18
|
6
6
|
|
7
|
+
- bug #21262 : brought back (proxy) duration_to_f to Rufus::Scheduler
|
7
8
|
- todo #21251 : added 'at', 'cron', 'in' and 'every' shortcut methods
|
8
9
|
- todo #21203 : keeping track of At and EveryJob until last trigger is over
|
9
10
|
- todo #20823 : now raising exception in case of bad 'at' parameter
|
data/lib/rufus/scheduler.rb
CHANGED
@@ -452,6 +452,18 @@ module Rufus
|
|
452
452
|
join
|
453
453
|
end
|
454
454
|
|
455
|
+
#
|
456
|
+
# Ensures that a duration is a expressed as a Float instance.
|
457
|
+
#
|
458
|
+
# duration_to_f("10s")
|
459
|
+
#
|
460
|
+
# will yield 10.0
|
461
|
+
#
|
462
|
+
def duration_to_f (s)
|
463
|
+
|
464
|
+
Rufus.duration_to_f(s)
|
465
|
+
end
|
466
|
+
|
455
467
|
#--
|
456
468
|
#
|
457
469
|
# The scheduling methods
|
@@ -501,7 +513,7 @@ module Rufus
|
|
501
513
|
def schedule_in (duration, params={}, &block)
|
502
514
|
|
503
515
|
do_schedule_at(
|
504
|
-
Time.new.to_f + Rufus
|
516
|
+
Time.new.to_f + Rufus.duration_to_f(duration),
|
505
517
|
prepare_params(params),
|
506
518
|
&block)
|
507
519
|
end
|