demingfactor-ri_cal 0.9.0
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.
- checksums.yaml +7 -0
- data/History.txt +402 -0
- data/Manifest.txt +161 -0
- data/README.txt +410 -0
- data/Rakefile +69 -0
- data/VERSION +1 -0
- data/bin/ri_cal +8 -0
- data/component_attributes/alarm.yml +10 -0
- data/component_attributes/calendar.yml +4 -0
- data/component_attributes/component_property_defs.yml +180 -0
- data/component_attributes/event.yml +45 -0
- data/component_attributes/freebusy.yml +16 -0
- data/component_attributes/journal.yml +35 -0
- data/component_attributes/timezone.yml +3 -0
- data/component_attributes/timezone_period.yml +11 -0
- data/component_attributes/todo.yml +46 -0
- data/copyrights.txt +1 -0
- data/docs/draft-ietf-calsify-2446bis-08.txt +7280 -0
- data/docs/draft-ietf-calsify-rfc2445bis-09.txt +10416 -0
- data/docs/incrementers.txt +7 -0
- data/docs/rfc2445.pdf +0 -0
- data/lib/ri_cal/component/alarm.rb +19 -0
- data/lib/ri_cal/component/calendar.rb +257 -0
- data/lib/ri_cal/component/event.rb +58 -0
- data/lib/ri_cal/component/freebusy.rb +16 -0
- data/lib/ri_cal/component/journal.rb +27 -0
- data/lib/ri_cal/component/non_standard.rb +33 -0
- data/lib/ri_cal/component/t_z_info_timezone.rb +153 -0
- data/lib/ri_cal/component/timezone/daylight_period.rb +25 -0
- data/lib/ri_cal/component/timezone/standard_period.rb +23 -0
- data/lib/ri_cal/component/timezone/timezone_period.rb +76 -0
- data/lib/ri_cal/component/timezone.rb +197 -0
- data/lib/ri_cal/component/todo.rb +42 -0
- data/lib/ri_cal/component.rb +256 -0
- data/lib/ri_cal/core_extensions/array/conversions.rb +15 -0
- data/lib/ri_cal/core_extensions/array.rb +7 -0
- data/lib/ri_cal/core_extensions/date/conversions.rb +56 -0
- data/lib/ri_cal/core_extensions/date.rb +13 -0
- data/lib/ri_cal/core_extensions/date_time/conversions.rb +50 -0
- data/lib/ri_cal/core_extensions/date_time.rb +15 -0
- data/lib/ri_cal/core_extensions/object/conversions.rb +20 -0
- data/lib/ri_cal/core_extensions/object.rb +8 -0
- data/lib/ri_cal/core_extensions/string/conversions.rb +57 -0
- data/lib/ri_cal/core_extensions/string.rb +8 -0
- data/lib/ri_cal/core_extensions/time/calculations.rb +153 -0
- data/lib/ri_cal/core_extensions/time/conversions.rb +42 -0
- data/lib/ri_cal/core_extensions/time/tzid_access.rb +50 -0
- data/lib/ri_cal/core_extensions/time/week_day_predicates.rb +55 -0
- data/lib/ri_cal/core_extensions/time.rb +14 -0
- data/lib/ri_cal/core_extensions.rb +11 -0
- data/lib/ri_cal/fast_date_time.rb +234 -0
- data/lib/ri_cal/floating_timezone.rb +32 -0
- data/lib/ri_cal/invalid_property_value.rb +8 -0
- data/lib/ri_cal/invalid_timezone_identifier.rb +20 -0
- data/lib/ri_cal/occurrence_enumerator.rb +265 -0
- data/lib/ri_cal/occurrence_period.rb +17 -0
- data/lib/ri_cal/parser.rb +148 -0
- data/lib/ri_cal/properties/alarm.rb +390 -0
- data/lib/ri_cal/properties/calendar.rb +164 -0
- data/lib/ri_cal/properties/event.rb +1523 -0
- data/lib/ri_cal/properties/freebusy.rb +593 -0
- data/lib/ri_cal/properties/journal.rb +1237 -0
- data/lib/ri_cal/properties/timezone.rb +150 -0
- data/lib/ri_cal/properties/timezone_period.rb +416 -0
- data/lib/ri_cal/properties/todo.rb +1559 -0
- data/lib/ri_cal/properties.rb +12 -0
- data/lib/ri_cal/property_value/array.rb +27 -0
- data/lib/ri_cal/property_value/cal_address.rb +11 -0
- data/lib/ri_cal/property_value/date.rb +184 -0
- data/lib/ri_cal/property_value/date_time/additive_methods.rb +44 -0
- data/lib/ri_cal/property_value/date_time/time_machine.rb +159 -0
- data/lib/ri_cal/property_value/date_time/timezone_support.rb +100 -0
- data/lib/ri_cal/property_value/date_time.rb +359 -0
- data/lib/ri_cal/property_value/duration.rb +110 -0
- data/lib/ri_cal/property_value/geo.rb +11 -0
- data/lib/ri_cal/property_value/integer.rb +12 -0
- data/lib/ri_cal/property_value/occurrence_list.rb +144 -0
- data/lib/ri_cal/property_value/period.rb +86 -0
- data/lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb +100 -0
- data/lib/ri_cal/property_value/recurrence_rule/enumerator.rb +79 -0
- data/lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb +148 -0
- data/lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb +53 -0
- data/lib/ri_cal/property_value/recurrence_rule/numbered_span.rb +31 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb +86 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb +31 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb +32 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb +52 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb +31 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb +38 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb +32 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb +69 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb +31 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb +28 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb +80 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb +23 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb +106 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb +23 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb +33 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb +43 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb +28 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb +37 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb +57 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb +135 -0
- data/lib/ri_cal/property_value/recurrence_rule/recurring_day.rb +131 -0
- data/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb +64 -0
- data/lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb +33 -0
- data/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb +53 -0
- data/lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb +42 -0
- data/lib/ri_cal/property_value/recurrence_rule/validations.rb +125 -0
- data/lib/ri_cal/property_value/recurrence_rule.rb +154 -0
- data/lib/ri_cal/property_value/text.rb +44 -0
- data/lib/ri_cal/property_value/uri.rb +11 -0
- data/lib/ri_cal/property_value/utc_offset.rb +33 -0
- data/lib/ri_cal/property_value/zulu_date_time.rb +34 -0
- data/lib/ri_cal/property_value.rb +159 -0
- data/lib/ri_cal/required_timezones.rb +55 -0
- data/lib/ri_cal.rb +187 -0
- data/parked_specs/ri_cal/claudio_a_bug_spec.rb +100 -0
- data/performance/empty_propval/subject.rb +43 -0
- data/performance/paris_eastern/subject.rb +90 -0
- data/performance/penultimate_weekday/subject.rb +15 -0
- data/performance/psm_big_enum/ical.ics +3171 -0
- data/performance/psm_big_enum/subject.rb +16 -0
- data/performance/utah_cycling/subject.rb +55 -0
- data/ri_cal.gemspec +244 -0
- data/script/benchmark_subject +23 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/script/profile_subject +29 -0
- data/script/txt2html +71 -0
- data/spec/ri_cal/bugreports_spec.rb +276 -0
- data/spec/ri_cal/component/alarm_spec.rb +12 -0
- data/spec/ri_cal/component/calendar_spec.rb +88 -0
- data/spec/ri_cal/component/event_spec.rb +735 -0
- data/spec/ri_cal/component/freebusy_spec.rb +12 -0
- data/spec/ri_cal/component/journal_spec.rb +37 -0
- data/spec/ri_cal/component/t_z_info_timezone_spec.rb +60 -0
- data/spec/ri_cal/component/timezone_spec.rb +236 -0
- data/spec/ri_cal/component/todo_spec.rb +112 -0
- data/spec/ri_cal/component_spec.rb +224 -0
- data/spec/ri_cal/core_extensions/string/conversions_spec.rb +78 -0
- data/spec/ri_cal/core_extensions/time/calculations_spec.rb +188 -0
- data/spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb +45 -0
- data/spec/ri_cal/fast_date_time_spec.rb +77 -0
- data/spec/ri_cal/inf_loop_spec.rb +78 -0
- data/spec/ri_cal/occurrence_enumerator_spec.rb +611 -0
- data/spec/ri_cal/parser_spec.rb +337 -0
- data/spec/ri_cal/property_value/date_spec.rb +53 -0
- data/spec/ri_cal/property_value/date_time_spec.rb +383 -0
- data/spec/ri_cal/property_value/duration_spec.rb +126 -0
- data/spec/ri_cal/property_value/occurrence_list_spec.rb +72 -0
- data/spec/ri_cal/property_value/period_spec.rb +63 -0
- data/spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb +21 -0
- data/spec/ri_cal/property_value/recurrence_rule_spec.rb +1814 -0
- data/spec/ri_cal/property_value/text_spec.rb +25 -0
- data/spec/ri_cal/property_value/utc_offset_spec.rb +48 -0
- data/spec/ri_cal/property_value_spec.rb +125 -0
- data/spec/ri_cal/required_timezones_spec.rb +67 -0
- data/spec/ri_cal_spec.rb +53 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +50 -0
- data/tasks/gem_loader/load_active_support.rb +3 -0
- data/tasks/gem_loader/load_tzinfo_gem.rb +2 -0
- data/tasks/ri_cal.rake +412 -0
- data/tasks/spec.rake +102 -0
- metadata +246 -0
@@ -0,0 +1,16 @@
|
|
1
|
+
class Subject
|
2
|
+
def initialize(out=STDOUT)
|
3
|
+
calendar_file = File.open(File.join(File.dirname(__FILE__), *%w[ical.ics]), 'r')
|
4
|
+
@calendar = RiCal.parse(calendar_file).first
|
5
|
+
@cutoff = Date.parse("20100531")
|
6
|
+
@out = out
|
7
|
+
end
|
8
|
+
def run
|
9
|
+
cutoff = @cutoff
|
10
|
+
@calendar.events.each do |event|
|
11
|
+
event.occurrences(:before => cutoff).each do |instance|
|
12
|
+
@out.puts "Event #{instance.uid.slice(0..5)}, starting #{instance.dtstart}, ending #{instance.dtend}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
class Subject
|
2
|
+
def initialize(out=STDOUT)
|
3
|
+
cals = RiCal.parse_string <<-ENDCAL
|
4
|
+
BEGIN:VCALENDAR
|
5
|
+
METHOD:PUBLISH
|
6
|
+
PRODID:-//Apple Inc.//iCal 3.0//EN
|
7
|
+
CALSCALE:GREGORIAN
|
8
|
+
X-WR-CALNAME:Utah Cycling
|
9
|
+
X-WR-RELCALID:BF579011-36BF-49C6-8C7D-E96F03DE8055
|
10
|
+
VERSION:2.0
|
11
|
+
X-WR-TIMEZONE:US/Mountain
|
12
|
+
BEGIN:VTIMEZONE
|
13
|
+
TZID:US/Mountain
|
14
|
+
BEGIN:DAYLIGHT
|
15
|
+
TZOFFSETFROM:-0700
|
16
|
+
TZOFFSETTO:-0600
|
17
|
+
DTSTART:20070311T020000
|
18
|
+
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
|
19
|
+
TZNAME:MDT
|
20
|
+
END:DAYLIGHT
|
21
|
+
BEGIN:STANDARD
|
22
|
+
TZOFFSETFROM:-0600
|
23
|
+
TZOFFSETTO:-0700
|
24
|
+
DTSTART:20071104T020000
|
25
|
+
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
|
26
|
+
TZNAME:MST
|
27
|
+
END:STANDARD
|
28
|
+
END:VTIMEZONE
|
29
|
+
BEGIN:VEVENT
|
30
|
+
SEQUENCE:11
|
31
|
+
TRANSP:OPAQUE
|
32
|
+
UID:15208112-E0FA-4A7C-954C-CFDF19D1B0E7
|
33
|
+
DTSTART;TZID=US/Mountain:20090114T163000
|
34
|
+
DTSTAMP:20090107T024340Z
|
35
|
+
SUMMARY:Wild Rose XC/Skate Training Series
|
36
|
+
EXDATE;TZID=US/Mountain:20090114T163000
|
37
|
+
EXDATE;TZID=US/Mountain:20090128T163000
|
38
|
+
EXDATE;TZID=US/Mountain:20090121T163000
|
39
|
+
EXDATE;TZID=US/Mountain:20090211T163000
|
40
|
+
EXDATE;TZID=US/Mountain:20090204T163000
|
41
|
+
EXDATE;TZID=US/Mountain:20090218T163000
|
42
|
+
CREATED:20090107T024012Z
|
43
|
+
DTEND;TZID=US/Mountain:20090114T180000
|
44
|
+
LOCATION:Mountain Dell Golf Course
|
45
|
+
RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20090219T065959Z
|
46
|
+
END:VEVENT
|
47
|
+
END:VCALENDAR
|
48
|
+
ENDCAL
|
49
|
+
@event = cals.first.events.first
|
50
|
+
end
|
51
|
+
|
52
|
+
def run
|
53
|
+
@event.occurrences
|
54
|
+
end
|
55
|
+
end
|
data/ri_cal.gemspec
ADDED
@@ -0,0 +1,244 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{ri_cal}
|
8
|
+
s.version = "0.8.8"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Rick DeNatale"]
|
12
|
+
s.license = "MIT"
|
13
|
+
s.date = %q{2011-02-13}
|
14
|
+
s.description = %q{A new Ruby implementation of RFC2445 iCalendar.
|
15
|
+
|
16
|
+
The existing Ruby iCalendar libraries (e.g. icalendar, vpim) provide for parsing and generating icalendar files,
|
17
|
+
but do not support important things like enumerating occurrences of repeating events.
|
18
|
+
|
19
|
+
This is a clean-slate implementation of RFC2445.
|
20
|
+
|
21
|
+
A Google group for discussion of this library has been set up http://groups.google.com/group/rical_gem
|
22
|
+
}
|
23
|
+
s.email = %q{rick.denatale@gmail.com}
|
24
|
+
s.executables = ["ri_cal"]
|
25
|
+
s.extra_rdoc_files = [
|
26
|
+
"History.txt",
|
27
|
+
"README.txt",
|
28
|
+
"copyrights.txt"
|
29
|
+
]
|
30
|
+
s.files = [
|
31
|
+
"History.txt",
|
32
|
+
"Manifest.txt",
|
33
|
+
"README.txt",
|
34
|
+
"Rakefile",
|
35
|
+
"VERSION",
|
36
|
+
"bin/ri_cal",
|
37
|
+
"component_attributes/alarm.yml",
|
38
|
+
"component_attributes/calendar.yml",
|
39
|
+
"component_attributes/component_property_defs.yml",
|
40
|
+
"component_attributes/event.yml",
|
41
|
+
"component_attributes/freebusy.yml",
|
42
|
+
"component_attributes/journal.yml",
|
43
|
+
"component_attributes/timezone.yml",
|
44
|
+
"component_attributes/timezone_period.yml",
|
45
|
+
"component_attributes/todo.yml",
|
46
|
+
"copyrights.txt",
|
47
|
+
"docs/draft-ietf-calsify-2446bis-08.txt",
|
48
|
+
"docs/draft-ietf-calsify-rfc2445bis-09.txt",
|
49
|
+
"docs/incrementers.txt",
|
50
|
+
"docs/rfc2445.pdf",
|
51
|
+
"lib/ri_cal.rb",
|
52
|
+
"lib/ri_cal/component.rb",
|
53
|
+
"lib/ri_cal/component/alarm.rb",
|
54
|
+
"lib/ri_cal/component/calendar.rb",
|
55
|
+
"lib/ri_cal/component/event.rb",
|
56
|
+
"lib/ri_cal/component/freebusy.rb",
|
57
|
+
"lib/ri_cal/component/journal.rb",
|
58
|
+
"lib/ri_cal/component/non_standard.rb",
|
59
|
+
"lib/ri_cal/component/t_z_info_timezone.rb",
|
60
|
+
"lib/ri_cal/component/timezone.rb",
|
61
|
+
"lib/ri_cal/component/timezone/daylight_period.rb",
|
62
|
+
"lib/ri_cal/component/timezone/standard_period.rb",
|
63
|
+
"lib/ri_cal/component/timezone/timezone_period.rb",
|
64
|
+
"lib/ri_cal/component/todo.rb",
|
65
|
+
"lib/ri_cal/core_extensions.rb",
|
66
|
+
"lib/ri_cal/core_extensions/array.rb",
|
67
|
+
"lib/ri_cal/core_extensions/array/conversions.rb",
|
68
|
+
"lib/ri_cal/core_extensions/date.rb",
|
69
|
+
"lib/ri_cal/core_extensions/date/conversions.rb",
|
70
|
+
"lib/ri_cal/core_extensions/date_time.rb",
|
71
|
+
"lib/ri_cal/core_extensions/date_time/conversions.rb",
|
72
|
+
"lib/ri_cal/core_extensions/object.rb",
|
73
|
+
"lib/ri_cal/core_extensions/object/conversions.rb",
|
74
|
+
"lib/ri_cal/core_extensions/string.rb",
|
75
|
+
"lib/ri_cal/core_extensions/string/conversions.rb",
|
76
|
+
"lib/ri_cal/core_extensions/time.rb",
|
77
|
+
"lib/ri_cal/core_extensions/time/calculations.rb",
|
78
|
+
"lib/ri_cal/core_extensions/time/conversions.rb",
|
79
|
+
"lib/ri_cal/core_extensions/time/tzid_access.rb",
|
80
|
+
"lib/ri_cal/core_extensions/time/week_day_predicates.rb",
|
81
|
+
"lib/ri_cal/fast_date_time.rb",
|
82
|
+
"lib/ri_cal/floating_timezone.rb",
|
83
|
+
"lib/ri_cal/invalid_property_value.rb",
|
84
|
+
"lib/ri_cal/invalid_timezone_identifier.rb",
|
85
|
+
"lib/ri_cal/occurrence_enumerator.rb",
|
86
|
+
"lib/ri_cal/occurrence_period.rb",
|
87
|
+
"lib/ri_cal/parser.rb",
|
88
|
+
"lib/ri_cal/properties.rb",
|
89
|
+
"lib/ri_cal/properties/alarm.rb",
|
90
|
+
"lib/ri_cal/properties/calendar.rb",
|
91
|
+
"lib/ri_cal/properties/event.rb",
|
92
|
+
"lib/ri_cal/properties/freebusy.rb",
|
93
|
+
"lib/ri_cal/properties/journal.rb",
|
94
|
+
"lib/ri_cal/properties/timezone.rb",
|
95
|
+
"lib/ri_cal/properties/timezone_period.rb",
|
96
|
+
"lib/ri_cal/properties/todo.rb",
|
97
|
+
"lib/ri_cal/property_value.rb",
|
98
|
+
"lib/ri_cal/property_value/array.rb",
|
99
|
+
"lib/ri_cal/property_value/cal_address.rb",
|
100
|
+
"lib/ri_cal/property_value/date.rb",
|
101
|
+
"lib/ri_cal/property_value/date_time.rb",
|
102
|
+
"lib/ri_cal/property_value/date_time/additive_methods.rb",
|
103
|
+
"lib/ri_cal/property_value/date_time/time_machine.rb",
|
104
|
+
"lib/ri_cal/property_value/date_time/timezone_support.rb",
|
105
|
+
"lib/ri_cal/property_value/duration.rb",
|
106
|
+
"lib/ri_cal/property_value/geo.rb",
|
107
|
+
"lib/ri_cal/property_value/integer.rb",
|
108
|
+
"lib/ri_cal/property_value/occurrence_list.rb",
|
109
|
+
"lib/ri_cal/property_value/period.rb",
|
110
|
+
"lib/ri_cal/property_value/recurrence_rule.rb",
|
111
|
+
"lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb",
|
112
|
+
"lib/ri_cal/property_value/recurrence_rule/enumerator.rb",
|
113
|
+
"lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb",
|
114
|
+
"lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb",
|
115
|
+
"lib/ri_cal/property_value/recurrence_rule/numbered_span.rb",
|
116
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb",
|
117
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb",
|
118
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb",
|
119
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb",
|
120
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb",
|
121
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb",
|
122
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb",
|
123
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb",
|
124
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb",
|
125
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb",
|
126
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb",
|
127
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb",
|
128
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb",
|
129
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb",
|
130
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb",
|
131
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb",
|
132
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb",
|
133
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb",
|
134
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb",
|
135
|
+
"lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb",
|
136
|
+
"lib/ri_cal/property_value/recurrence_rule/recurring_day.rb",
|
137
|
+
"lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb",
|
138
|
+
"lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb",
|
139
|
+
"lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb",
|
140
|
+
"lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb",
|
141
|
+
"lib/ri_cal/property_value/recurrence_rule/validations.rb",
|
142
|
+
"lib/ri_cal/property_value/text.rb",
|
143
|
+
"lib/ri_cal/property_value/uri.rb",
|
144
|
+
"lib/ri_cal/property_value/utc_offset.rb",
|
145
|
+
"lib/ri_cal/property_value/zulu_date_time.rb",
|
146
|
+
"lib/ri_cal/required_timezones.rb",
|
147
|
+
"parked_specs/ri_cal/claudio_a_bug_spec.rb",
|
148
|
+
"performance/empty_propval/subject.rb",
|
149
|
+
"performance/paris_eastern/subject.rb",
|
150
|
+
"performance/penultimate_weekday/subject.rb",
|
151
|
+
"performance/psm_big_enum/ical.ics",
|
152
|
+
"performance/psm_big_enum/subject.rb",
|
153
|
+
"performance/utah_cycling/subject.rb",
|
154
|
+
"ri_cal.gemspec",
|
155
|
+
"script/benchmark_subject",
|
156
|
+
"script/console",
|
157
|
+
"script/destroy",
|
158
|
+
"script/generate",
|
159
|
+
"script/profile_subject",
|
160
|
+
"script/txt2html",
|
161
|
+
"spec/ri_cal/bugreports_spec.rb",
|
162
|
+
"spec/ri_cal/component/alarm_spec.rb",
|
163
|
+
"spec/ri_cal/component/calendar_spec.rb",
|
164
|
+
"spec/ri_cal/component/event_spec.rb",
|
165
|
+
"spec/ri_cal/component/freebusy_spec.rb",
|
166
|
+
"spec/ri_cal/component/journal_spec.rb",
|
167
|
+
"spec/ri_cal/component/t_z_info_timezone_spec.rb",
|
168
|
+
"spec/ri_cal/component/timezone_spec.rb",
|
169
|
+
"spec/ri_cal/component/todo_spec.rb",
|
170
|
+
"spec/ri_cal/component_spec.rb",
|
171
|
+
"spec/ri_cal/core_extensions/string/conversions_spec.rb",
|
172
|
+
"spec/ri_cal/core_extensions/time/calculations_spec.rb",
|
173
|
+
"spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb",
|
174
|
+
"spec/ri_cal/fast_date_time_spec.rb",
|
175
|
+
"spec/ri_cal/inf_loop_spec.rb",
|
176
|
+
"spec/ri_cal/occurrence_enumerator_spec.rb",
|
177
|
+
"spec/ri_cal/parser_spec.rb",
|
178
|
+
"spec/ri_cal/property_value/date_spec.rb",
|
179
|
+
"spec/ri_cal/property_value/date_time_spec.rb",
|
180
|
+
"spec/ri_cal/property_value/duration_spec.rb",
|
181
|
+
"spec/ri_cal/property_value/occurrence_list_spec.rb",
|
182
|
+
"spec/ri_cal/property_value/period_spec.rb",
|
183
|
+
"spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb",
|
184
|
+
"spec/ri_cal/property_value/recurrence_rule_spec.rb",
|
185
|
+
"spec/ri_cal/property_value/text_spec.rb",
|
186
|
+
"spec/ri_cal/property_value/utc_offset_spec.rb",
|
187
|
+
"spec/ri_cal/property_value_spec.rb",
|
188
|
+
"spec/ri_cal/required_timezones_spec.rb",
|
189
|
+
"spec/ri_cal_spec.rb",
|
190
|
+
"spec/spec.opts",
|
191
|
+
"spec/spec_helper.rb",
|
192
|
+
"tasks/gem_loader/load_active_support.rb",
|
193
|
+
"tasks/gem_loader/load_tzinfo_gem.rb",
|
194
|
+
"tasks/ri_cal.rake",
|
195
|
+
"tasks/spec.rake"
|
196
|
+
]
|
197
|
+
s.homepage = %q{http://github.com/rubyredrick/ri_cal}
|
198
|
+
s.require_paths = ["lib"]
|
199
|
+
s.rubygems_version = %q{1.3.7}
|
200
|
+
s.summary = %q{a new implementation of RFC2445 in Ruby}
|
201
|
+
s.test_files = [
|
202
|
+
"spec/ri_cal/bugreports_spec.rb",
|
203
|
+
"spec/ri_cal/component/alarm_spec.rb",
|
204
|
+
"spec/ri_cal/component/calendar_spec.rb",
|
205
|
+
"spec/ri_cal/component/event_spec.rb",
|
206
|
+
"spec/ri_cal/component/freebusy_spec.rb",
|
207
|
+
"spec/ri_cal/component/journal_spec.rb",
|
208
|
+
"spec/ri_cal/component/t_z_info_timezone_spec.rb",
|
209
|
+
"spec/ri_cal/component/timezone_spec.rb",
|
210
|
+
"spec/ri_cal/component/todo_spec.rb",
|
211
|
+
"spec/ri_cal/component_spec.rb",
|
212
|
+
"spec/ri_cal/core_extensions/string/conversions_spec.rb",
|
213
|
+
"spec/ri_cal/core_extensions/time/calculations_spec.rb",
|
214
|
+
"spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb",
|
215
|
+
"spec/ri_cal/fast_date_time_spec.rb",
|
216
|
+
"spec/ri_cal/inf_loop_spec.rb",
|
217
|
+
"spec/ri_cal/occurrence_enumerator_spec.rb",
|
218
|
+
"spec/ri_cal/parser_spec.rb",
|
219
|
+
"spec/ri_cal/property_value/date_spec.rb",
|
220
|
+
"spec/ri_cal/property_value/date_time_spec.rb",
|
221
|
+
"spec/ri_cal/property_value/duration_spec.rb",
|
222
|
+
"spec/ri_cal/property_value/occurrence_list_spec.rb",
|
223
|
+
"spec/ri_cal/property_value/period_spec.rb",
|
224
|
+
"spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb",
|
225
|
+
"spec/ri_cal/property_value/recurrence_rule_spec.rb",
|
226
|
+
"spec/ri_cal/property_value/text_spec.rb",
|
227
|
+
"spec/ri_cal/property_value/utc_offset_spec.rb",
|
228
|
+
"spec/ri_cal/property_value_spec.rb",
|
229
|
+
"spec/ri_cal/required_timezones_spec.rb",
|
230
|
+
"spec/ri_cal_spec.rb",
|
231
|
+
"spec/spec_helper.rb"
|
232
|
+
]
|
233
|
+
|
234
|
+
if s.respond_to? :specification_version then
|
235
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
236
|
+
s.specification_version = 3
|
237
|
+
|
238
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
239
|
+
else
|
240
|
+
end
|
241
|
+
else
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/benchmark_subject
|
3
|
+
|
4
|
+
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib ri_cal]))
|
5
|
+
require 'rubygems'
|
6
|
+
subject_name = ARGV[0] || "paris_eastern"
|
7
|
+
|
8
|
+
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. performance], [subject_name], "subject"))
|
9
|
+
|
10
|
+
devnul = Object.new
|
11
|
+
def devnul.puts(string)
|
12
|
+
end
|
13
|
+
|
14
|
+
subject = Subject.new(devnul)
|
15
|
+
|
16
|
+
require 'benchmark'
|
17
|
+
|
18
|
+
Benchmark.bmbm do |results|
|
19
|
+
results.report("Benchmark #{subject_name}:") { subject.run }
|
20
|
+
end
|
21
|
+
|
22
|
+
puts
|
23
|
+
puts
|
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/ri_cal_newgem.rb'}"
|
9
|
+
puts "Loading ri_cal_newgem gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/destroy'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/generate'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Generate.new.run(ARGV)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/profile_subject
|
3
|
+
|
4
|
+
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib ri_cal]))
|
5
|
+
require 'rubygems'
|
6
|
+
subject_name = ARGV[0] || "paris_eastern"
|
7
|
+
|
8
|
+
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. performance], [subject_name], "subject"))
|
9
|
+
|
10
|
+
devnul = Object.new
|
11
|
+
def devnul.puts(string)
|
12
|
+
end
|
13
|
+
|
14
|
+
subject = Subject.new(devnul)
|
15
|
+
|
16
|
+
require 'ruby-prof'
|
17
|
+
|
18
|
+
result = RubyProf.profile do
|
19
|
+
subject.run
|
20
|
+
end
|
21
|
+
|
22
|
+
out_file = File.expand_path(File.join(File.dirname(__FILE__), %w[.. performance_data], "#{subject_name}.calltree"))
|
23
|
+
puts "out_file is #{out_file}"
|
24
|
+
printer = RubyProf::CallTreePrinter.new(result)
|
25
|
+
puts "got printer"
|
26
|
+
|
27
|
+
File.open(out_file, 'w') do |f|
|
28
|
+
printer.print(f)
|
29
|
+
end
|
data/script/txt2html
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
load File.dirname(__FILE__) + "/../Rakefile"
|
4
|
+
require 'rubyforge'
|
5
|
+
require 'redcloth'
|
6
|
+
require 'syntax/convertors/html'
|
7
|
+
require 'erb'
|
8
|
+
|
9
|
+
download = "http://rubyforge.org/projects/#{$hoe.rubyforge_name}"
|
10
|
+
version = $hoe.version
|
11
|
+
|
12
|
+
def rubyforge_project_id
|
13
|
+
RubyForge.new.configure.autoconfig["group_ids"][$hoe.rubyforge_name]
|
14
|
+
end
|
15
|
+
|
16
|
+
class Fixnum #:nodoc:
|
17
|
+
def ordinal
|
18
|
+
# teens
|
19
|
+
return 'th' if (10..19).include?(self % 100)
|
20
|
+
# others
|
21
|
+
case self % 10
|
22
|
+
when 1: return 'st'
|
23
|
+
when 2: return 'nd'
|
24
|
+
when 3: return 'rd'
|
25
|
+
else return 'th'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
class Time
|
31
|
+
def pretty
|
32
|
+
return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def convert_syntax(syntax, source)
|
37
|
+
return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^<pre>|</pre>$!,'')
|
38
|
+
end
|
39
|
+
|
40
|
+
if ARGV.length >= 1
|
41
|
+
src, template = ARGV
|
42
|
+
template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
|
43
|
+
else
|
44
|
+
puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
|
45
|
+
exit!
|
46
|
+
end
|
47
|
+
|
48
|
+
template = ERB.new(File.open(template).read)
|
49
|
+
|
50
|
+
title = nil
|
51
|
+
body = nil
|
52
|
+
File.open(src) do |fsrc|
|
53
|
+
title_text = fsrc.readline
|
54
|
+
body_text_template = fsrc.read
|
55
|
+
body_text = ERB.new(body_text_template).result(binding)
|
56
|
+
syntax_items = []
|
57
|
+
body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</\1>!m){
|
58
|
+
ident = syntax_items.length
|
59
|
+
element, syntax, source = $1, $2, $3
|
60
|
+
syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}</#{element}>"
|
61
|
+
"syntax-temp-#{ident}"
|
62
|
+
}
|
63
|
+
title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip
|
64
|
+
body = RedCloth.new(body_text).to_html
|
65
|
+
body.gsub!(%r!(?:<pre><code>)?syntax-temp-(\d+)(?:</code></pre>)?!){ syntax_items[$1.to_i] }
|
66
|
+
end
|
67
|
+
stat = File.stat(src)
|
68
|
+
created = stat.ctime
|
69
|
+
modified = stat.mtime
|
70
|
+
|
71
|
+
$stdout << template.result(binding)
|