-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a914a7
commit 9724c17
Showing
14 changed files
with
500,838 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'tzinfo' | ||
|
||
|
||
class Subject | ||
def initialize(out=STDOUT) | ||
@event = RiCal.Event do |e| | ||
e.dtstart = "TZID=America/New_York:19970929T090000" | ||
e.rrule = "FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-2" | ||
end | ||
end | ||
|
||
def run | ||
@event.occurrences(:count => 7) | ||
end | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class Subject | ||
def initialize(out=STDOUT) | ||
calendar_file = File.open(File.join(File.dirname(__FILE__), *%w[ical.ics]), 'r') | ||
@calendar = RiCal.parse(calendar_file).first | ||
@cutoff = Date.parse("20100531") | ||
@out = out | ||
end | ||
def run | ||
cutoff = @cutoff | ||
@calendar.events.each do |event| | ||
event.occurrences(:before => cutoff).each do |instance| | ||
@out.puts "Event #{instance.uid.slice(0..5)}, starting #{instance.dtstart}, ending #{instance.dtend}" | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Rehearsal ------------------------------------------------------------ | ||
Benchmark paris_eastern: start | ||
done | ||
0.510000 0.000000 0.510000 ( 0.523553) | ||
--------------------------------------------------- total: 0.510000sec | ||
|
||
user system total real | ||
Benchmark paris_eastern: start | ||
done | ||
0.000000 0.000000 0.000000 ( 0.001200) | ||
|
||
|
||
Rehearsal ------------------------------------------------------------------ | ||
Benchmark penultimate_weekday: 0.330000 0.010000 0.340000 ( 0.345082) | ||
--------------------------------------------------------- total: 0.340000sec | ||
|
||
user system total real | ||
Benchmark penultimate_weekday: 0.310000 0.000000 0.310000 ( 0.307988) | ||
|
||
|
||
Rehearsal ----------------------------------------------------------- | ||
Benchmark psm_big_enum: 7.300000 0.060000 7.360000 ( 7.415546) | ||
-------------------------------------------------- total: 7.360000sec | ||
|
||
user system total real | ||
Benchmark psm_big_enum: 6.570000 0.050000 6.620000 ( 6.668513) | ||
|
||
|
||
Rehearsal ----------------------------------------------------------- | ||
Benchmark utah_cycling: 0.120000 0.000000 0.120000 ( 0.119998) | ||
-------------------------------------------------- total: 0.120000sec | ||
|
||
user system total real | ||
Benchmark utah_cycling: 0.040000 0.000000 0.040000 ( 0.038606) | ||
|
||
|
Oops, something went wrong.