ri_cal 0.8.5 → 0.8.6
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/History.txt +7 -0
- data/Rakefile +59 -46
- data/VERSION +1 -0
- data/component_attributes/component_property_defs.yml +3 -3
- data/lib/ri_cal/component/t_z_info_timezone.rb +17 -3
- data/lib/ri_cal/core_extensions/date/conversions.rb +0 -14
- data/lib/ri_cal/core_extensions/date_time/conversions.rb +0 -6
- data/lib/ri_cal/fast_date_time.rb +8 -0
- data/lib/ri_cal/properties/alarm.rb +8 -8
- data/lib/ri_cal/properties/calendar.rb +3 -3
- data/lib/ri_cal/properties/event.rb +62 -65
- data/lib/ri_cal/properties/freebusy.rb +19 -20
- data/lib/ri_cal/properties/journal.rb +50 -53
- data/lib/ri_cal/properties/timezone.rb +10 -11
- data/lib/ri_cal/properties/timezone_period.rb +10 -10
- data/lib/ri_cal/properties/todo.rb +68 -71
- data/lib/ri_cal/property_value.rb +1 -0
- data/lib/ri_cal/property_value/date.rb +4 -0
- data/lib/ri_cal/property_value/date_time.rb +8 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb +4 -3
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb +5 -1
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb +1 -1
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb +5 -1
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb +5 -1
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb +9 -0
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb +11 -1
- data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb +4 -0
- data/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb +5 -1
- data/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb +5 -1
- data/lib/ri_cal/property_value/zulu_date_time.rb +34 -0
- data/parked_specs/ri_cal/claudio_a_bug_spec.rb +100 -0
- data/ri_cal.gemspec +218 -21
- data/spec/ri_cal/component/event_spec.rb +17 -0
- data/spec/ri_cal/component/t_z_info_timezone_spec.rb +5 -4
- data/spec/ri_cal/fast_date_time_spec.rb +10 -0
- data/spec/ri_cal/inf_loop_spec.rb +78 -0
- data/spec/ri_cal/parser_spec.rb +3 -3
- metadata +61 -60
@@ -140,7 +140,7 @@ module RiCal
|
|
140
140
|
|
141
141
|
|
142
142
|
# return the the DTSTAMP property
|
143
|
-
# which will be an instances of RiCal::
|
143
|
+
# which will be an instances of RiCal::PropertyValueZuluDateTime
|
144
144
|
#
|
145
145
|
# [purpose (from RFC 2445)]
|
146
146
|
# This property indicates the date/time that the instance of the iCalendar object was created.
|
@@ -151,24 +151,24 @@ module RiCal
|
|
151
151
|
end
|
152
152
|
|
153
153
|
# set the DTSTAMP property
|
154
|
-
# property value should be an instance of RiCal::
|
154
|
+
# property value should be an instance of RiCal::PropertyValueZuluDateTime
|
155
155
|
def dtstamp_property=(property_value)
|
156
|
-
@dtstamp_property = property_value
|
156
|
+
@dtstamp_property = property_value
|
157
157
|
end
|
158
158
|
|
159
159
|
# set the value of the DTSTAMP property
|
160
160
|
def dtstamp=(ruby_value)
|
161
|
-
self.dtstamp_property= RiCal::PropertyValue::
|
161
|
+
self.dtstamp_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
|
162
162
|
end
|
163
163
|
|
164
164
|
# return the value of the DTSTAMP property
|
165
|
-
# which will be an instance of
|
165
|
+
# which will be an instance of ZuluDateTime
|
166
166
|
def dtstamp
|
167
167
|
dtstamp_property ? dtstamp_property.ruby_value : nil
|
168
168
|
end
|
169
169
|
|
170
170
|
def dtstamp_property_from_string(line) # :nodoc:
|
171
|
-
@dtstamp_property = RiCal::PropertyValue::
|
171
|
+
@dtstamp_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
|
172
172
|
end
|
173
173
|
|
174
174
|
|
@@ -521,33 +521,33 @@ module RiCal
|
|
521
521
|
end
|
522
522
|
|
523
523
|
def export_properties_to(export_stream) #:nodoc:
|
524
|
-
export_prop_to(export_stream, "
|
525
|
-
export_prop_to(export_stream, "
|
524
|
+
export_prop_to(export_stream, "CONTACT", @contact_property)
|
525
|
+
export_prop_to(export_stream, "DURATION", @duration_property)
|
526
526
|
export_prop_to(export_stream, "DTEND", @dtend_property)
|
527
527
|
export_prop_to(export_stream, "DTSTART", @dtstart_property)
|
528
|
-
export_prop_to(export_stream, "
|
528
|
+
export_prop_to(export_stream, "DTSTAMP", @dtstamp_property)
|
529
529
|
export_prop_to(export_stream, "ATTENDEE", @attendee_property)
|
530
530
|
export_prop_to(export_stream, "UID", @uid_property)
|
531
|
-
export_prop_to(export_stream, "DURATION", @duration_property)
|
532
531
|
export_prop_to(export_stream, "URL", @url_property)
|
533
532
|
export_prop_to(export_stream, "ORGANIZER", @organizer_property)
|
534
533
|
export_prop_to(export_stream, "FREEBUSY", @freebusy_property)
|
534
|
+
export_prop_to(export_stream, "REQUEST-STATUS", @request_status_property)
|
535
535
|
export_prop_to(export_stream, "COMMENT", @comment_property)
|
536
536
|
end
|
537
537
|
|
538
538
|
def ==(o) #:nodoc:
|
539
539
|
if o.class == self.class
|
540
|
-
(
|
541
|
-
(
|
540
|
+
(contact_property == o.contact_property) &&
|
541
|
+
(duration_property == o.duration_property) &&
|
542
542
|
(dtend_property == o.dtend_property) &&
|
543
543
|
(dtstart_property == o.dtstart_property) &&
|
544
|
-
(
|
544
|
+
(dtstamp_property == o.dtstamp_property) &&
|
545
545
|
(attendee_property == o.attendee_property) &&
|
546
546
|
(uid_property == o.uid_property) &&
|
547
|
-
(duration_property == o.duration_property) &&
|
548
547
|
(url_property == o.url_property) &&
|
549
548
|
(organizer_property == o.organizer_property) &&
|
550
549
|
(freebusy_property == o.freebusy_property) &&
|
550
|
+
(request_status_property == o.request_status_property) &&
|
551
551
|
(comment_property == o.comment_property)
|
552
552
|
else
|
553
553
|
super
|
@@ -556,29 +556,28 @@ module RiCal
|
|
556
556
|
|
557
557
|
def initialize_copy(o) #:nodoc:
|
558
558
|
super
|
559
|
-
|
560
|
-
|
559
|
+
contact_property = contact_property && contact_property.dup
|
560
|
+
duration_property = duration_property && duration_property.dup
|
561
561
|
dtend_property = dtend_property && dtend_property.dup
|
562
562
|
dtstart_property = dtstart_property && dtstart_property.dup
|
563
|
-
|
563
|
+
dtstamp_property = dtstamp_property && dtstamp_property.dup
|
564
564
|
attendee_property = attendee_property && attendee_property.dup
|
565
565
|
uid_property = uid_property && uid_property.dup
|
566
|
-
duration_property = duration_property && duration_property.dup
|
567
566
|
url_property = url_property && url_property.dup
|
568
567
|
organizer_property = organizer_property && organizer_property.dup
|
569
568
|
freebusy_property = freebusy_property && freebusy_property.dup
|
569
|
+
request_status_property = request_status_property && request_status_property.dup
|
570
570
|
comment_property = comment_property && comment_property.dup
|
571
571
|
end
|
572
572
|
|
573
573
|
def add_date_times_to(required_timezones) #:nodoc:
|
574
574
|
add_property_date_times_to(required_timezones, dtstart_property)
|
575
575
|
add_property_date_times_to(required_timezones, dtend_property)
|
576
|
-
add_property_date_times_to(required_timezones, dtstamp_property)
|
577
576
|
end
|
578
577
|
|
579
578
|
module ClassMethods #:nodoc:
|
580
579
|
def property_parser #:nodoc:
|
581
|
-
{"
|
580
|
+
{"COMMENT"=>:comment_property_from_string, "DTEND"=>:dtend_property_from_string, "URL"=>:url_property_from_string, "CONTACT"=>:contact_property_from_string, "UID"=>:uid_property_from_string, "ATTENDEE"=>:attendee_property_from_string, "ORGANIZER"=>:organizer_property_from_string, "FREEBUSY"=>:freebusy_property_from_string, "REQUEST-STATUS"=>:request_status_property_from_string, "DURATION"=>:duration_property_from_string, "DTSTART"=>:dtstart_property_from_string, "DTSTAMP"=>:dtstamp_property_from_string}
|
582
581
|
end
|
583
582
|
end
|
584
583
|
|
@@ -41,7 +41,7 @@ module RiCal
|
|
41
41
|
|
42
42
|
|
43
43
|
# return the the CREATED property
|
44
|
-
# which will be an instances of RiCal::
|
44
|
+
# which will be an instances of RiCal::PropertyValueZuluDateTime
|
45
45
|
#
|
46
46
|
# [purpose (from RFC 2445)]
|
47
47
|
# This property specifies the date and time that the calendar information was created by teh calendar user agent in the calendar store.
|
@@ -52,24 +52,24 @@ module RiCal
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# set the CREATED property
|
55
|
-
# property value should be an instance of RiCal::
|
55
|
+
# property value should be an instance of RiCal::PropertyValueZuluDateTime
|
56
56
|
def created_property=(property_value)
|
57
|
-
@created_property = property_value
|
57
|
+
@created_property = property_value
|
58
58
|
end
|
59
59
|
|
60
60
|
# set the value of the CREATED property
|
61
61
|
def created=(ruby_value)
|
62
|
-
self.created_property= RiCal::PropertyValue::
|
62
|
+
self.created_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
|
63
63
|
end
|
64
64
|
|
65
65
|
# return the value of the CREATED property
|
66
|
-
# which will be an instance of
|
66
|
+
# which will be an instance of ZuluDateTime
|
67
67
|
def created
|
68
68
|
created_property ? created_property.ruby_value : nil
|
69
69
|
end
|
70
70
|
|
71
71
|
def created_property_from_string(line) # :nodoc:
|
72
|
-
@created_property = RiCal::PropertyValue::
|
72
|
+
@created_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
|
73
73
|
end
|
74
74
|
|
75
75
|
|
@@ -140,7 +140,7 @@ module RiCal
|
|
140
140
|
|
141
141
|
|
142
142
|
# return the the DTSTAMP property
|
143
|
-
# which will be an instances of RiCal::
|
143
|
+
# which will be an instances of RiCal::PropertyValueZuluDateTime
|
144
144
|
#
|
145
145
|
# [purpose (from RFC 2445)]
|
146
146
|
# This property indicates the date/time that the instance of the iCalendar object was created.
|
@@ -151,29 +151,29 @@ module RiCal
|
|
151
151
|
end
|
152
152
|
|
153
153
|
# set the DTSTAMP property
|
154
|
-
# property value should be an instance of RiCal::
|
154
|
+
# property value should be an instance of RiCal::PropertyValueZuluDateTime
|
155
155
|
def dtstamp_property=(property_value)
|
156
|
-
@dtstamp_property = property_value
|
156
|
+
@dtstamp_property = property_value
|
157
157
|
end
|
158
158
|
|
159
159
|
# set the value of the DTSTAMP property
|
160
160
|
def dtstamp=(ruby_value)
|
161
|
-
self.dtstamp_property= RiCal::PropertyValue::
|
161
|
+
self.dtstamp_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
|
162
162
|
end
|
163
163
|
|
164
164
|
# return the value of the DTSTAMP property
|
165
|
-
# which will be an instance of
|
165
|
+
# which will be an instance of ZuluDateTime
|
166
166
|
def dtstamp
|
167
167
|
dtstamp_property ? dtstamp_property.ruby_value : nil
|
168
168
|
end
|
169
169
|
|
170
170
|
def dtstamp_property_from_string(line) # :nodoc:
|
171
|
-
@dtstamp_property = RiCal::PropertyValue::
|
171
|
+
@dtstamp_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
|
172
172
|
end
|
173
173
|
|
174
174
|
|
175
175
|
# return the the LAST-MODIFIED property
|
176
|
-
# which will be an instances of RiCal::
|
176
|
+
# which will be an instances of RiCal::PropertyValueZuluDateTime
|
177
177
|
#
|
178
178
|
# [purpose (from RFC 2445)]
|
179
179
|
# This property specifies the date and time that the information associated with the calendar component was last revised in teh calendar store.
|
@@ -184,24 +184,24 @@ module RiCal
|
|
184
184
|
end
|
185
185
|
|
186
186
|
# set the LAST-MODIFIED property
|
187
|
-
# property value should be an instance of RiCal::
|
187
|
+
# property value should be an instance of RiCal::PropertyValueZuluDateTime
|
188
188
|
def last_modified_property=(property_value)
|
189
|
-
@last_modified_property = property_value
|
189
|
+
@last_modified_property = property_value
|
190
190
|
end
|
191
191
|
|
192
192
|
# set the value of the LAST-MODIFIED property
|
193
193
|
def last_modified=(ruby_value)
|
194
|
-
self.last_modified_property= RiCal::PropertyValue::
|
194
|
+
self.last_modified_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
|
195
195
|
end
|
196
196
|
|
197
197
|
# return the value of the LAST-MODIFIED property
|
198
|
-
# which will be an instance of
|
198
|
+
# which will be an instance of ZuluDateTime
|
199
199
|
def last_modified
|
200
200
|
last_modified_property ? last_modified_property.ruby_value : nil
|
201
201
|
end
|
202
202
|
|
203
203
|
def last_modified_property_from_string(line) # :nodoc:
|
204
|
-
@last_modified_property = RiCal::PropertyValue::
|
204
|
+
@last_modified_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
|
205
205
|
end
|
206
206
|
|
207
207
|
|
@@ -1127,58 +1127,58 @@ module RiCal
|
|
1127
1127
|
end
|
1128
1128
|
|
1129
1129
|
def export_properties_to(export_stream) #:nodoc:
|
1130
|
-
export_prop_to(export_stream, "
|
1130
|
+
export_prop_to(export_stream, "RDATE", @rdate_property)
|
1131
|
+
export_prop_to(export_stream, "CONTACT", @contact_property)
|
1131
1132
|
export_prop_to(export_stream, "EXDATE", @exdate_property)
|
1132
|
-
export_prop_to(export_stream, "DTSTAMP", @dtstamp_property)
|
1133
1133
|
export_prop_to(export_stream, "CREATED", @created_property)
|
1134
|
-
export_prop_to(export_stream, "CONTACT", @contact_property)
|
1135
|
-
export_prop_to(export_stream, "CATEGORIES", @categories_property)
|
1136
1134
|
export_prop_to(export_stream, "STATUS", @status_property)
|
1137
|
-
export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
|
1138
1135
|
export_prop_to(export_stream, "DTSTART", @dtstart_property)
|
1139
1136
|
export_prop_to(export_stream, "RECURRENCE-ID", @recurrence_id_property)
|
1137
|
+
export_prop_to(export_stream, "DTSTAMP", @dtstamp_property)
|
1138
|
+
export_prop_to(export_stream, "CATEGORIES", @categories_property)
|
1139
|
+
export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
|
1140
1140
|
export_prop_to(export_stream, "ATTENDEE", @attendee_property)
|
1141
1141
|
export_prop_to(export_stream, "UID", @uid_property)
|
1142
|
+
export_prop_to(export_stream, "DESCRIPTION", @description_property)
|
1142
1143
|
export_prop_to(export_stream, "URL", @url_property)
|
1144
|
+
export_prop_to(export_stream, "SUMMARY", @summary_property)
|
1143
1145
|
export_prop_to(export_stream, "ORGANIZER", @organizer_property)
|
1144
1146
|
export_prop_to(export_stream, "RRULE", @rrule_property)
|
1145
|
-
export_prop_to(export_stream, "DESCRIPTION", @description_property)
|
1146
|
-
export_prop_to(export_stream, "CLASS", @class_property)
|
1147
|
-
export_prop_to(export_stream, "SUMMARY", @summary_property)
|
1148
1147
|
export_prop_to(export_stream, "ATTACH", @attach_property)
|
1149
|
-
export_prop_to(export_stream, "
|
1150
|
-
export_prop_to(export_stream, "
|
1148
|
+
export_prop_to(export_stream, "CLASS", @class_property)
|
1149
|
+
export_prop_to(export_stream, "REQUEST-STATUS", @request_status_property)
|
1151
1150
|
export_prop_to(export_stream, "RELATED-TO", @related_to_property)
|
1152
1151
|
export_prop_to(export_stream, "EXRULE", @exrule_property)
|
1153
1152
|
export_prop_to(export_stream, "COMMENT", @comment_property)
|
1153
|
+
export_prop_to(export_stream, "SEQUENCE", @sequence_property)
|
1154
1154
|
end
|
1155
1155
|
|
1156
1156
|
def ==(o) #:nodoc:
|
1157
1157
|
if o.class == self.class
|
1158
|
-
(
|
1158
|
+
(rdate_property == o.rdate_property) &&
|
1159
|
+
(contact_property == o.contact_property) &&
|
1159
1160
|
(exdate_property == o.exdate_property) &&
|
1160
|
-
(dtstamp_property == o.dtstamp_property) &&
|
1161
1161
|
(created_property == o.created_property) &&
|
1162
|
-
(contact_property == o.contact_property) &&
|
1163
|
-
(categories_property == o.categories_property) &&
|
1164
1162
|
(status_property == o.status_property) &&
|
1165
|
-
(last_modified_property == o.last_modified_property) &&
|
1166
1163
|
(dtstart_property == o.dtstart_property) &&
|
1167
1164
|
(recurrence_id_property == o.recurrence_id_property) &&
|
1165
|
+
(dtstamp_property == o.dtstamp_property) &&
|
1166
|
+
(categories_property == o.categories_property) &&
|
1167
|
+
(last_modified_property == o.last_modified_property) &&
|
1168
1168
|
(attendee_property == o.attendee_property) &&
|
1169
1169
|
(uid_property == o.uid_property) &&
|
1170
|
+
(description_property == o.description_property) &&
|
1170
1171
|
(url_property == o.url_property) &&
|
1172
|
+
(summary_property == o.summary_property) &&
|
1171
1173
|
(organizer_property == o.organizer_property) &&
|
1172
1174
|
(rrule_property == o.rrule_property) &&
|
1173
|
-
(description_property == o.description_property) &&
|
1174
|
-
(class_property == o.class_property) &&
|
1175
|
-
(summary_property == o.summary_property) &&
|
1176
1175
|
(attach_property == o.attach_property) &&
|
1177
|
-
(
|
1178
|
-
(
|
1176
|
+
(class_property == o.class_property) &&
|
1177
|
+
(request_status_property == o.request_status_property) &&
|
1179
1178
|
(related_to_property == o.related_to_property) &&
|
1180
1179
|
(exrule_property == o.exrule_property) &&
|
1181
|
-
(comment_property == o.comment_property)
|
1180
|
+
(comment_property == o.comment_property) &&
|
1181
|
+
(sequence_property == o.sequence_property)
|
1182
1182
|
else
|
1183
1183
|
super
|
1184
1184
|
end
|
@@ -1186,37 +1186,34 @@ module RiCal
|
|
1186
1186
|
|
1187
1187
|
def initialize_copy(o) #:nodoc:
|
1188
1188
|
super
|
1189
|
-
|
1189
|
+
rdate_property = rdate_property && rdate_property.dup
|
1190
|
+
contact_property = contact_property && contact_property.dup
|
1190
1191
|
exdate_property = exdate_property && exdate_property.dup
|
1191
|
-
dtstamp_property = dtstamp_property && dtstamp_property.dup
|
1192
1192
|
created_property = created_property && created_property.dup
|
1193
|
-
contact_property = contact_property && contact_property.dup
|
1194
|
-
categories_property = categories_property && categories_property.dup
|
1195
1193
|
status_property = status_property && status_property.dup
|
1196
|
-
last_modified_property = last_modified_property && last_modified_property.dup
|
1197
1194
|
dtstart_property = dtstart_property && dtstart_property.dup
|
1198
1195
|
recurrence_id_property = recurrence_id_property && recurrence_id_property.dup
|
1196
|
+
dtstamp_property = dtstamp_property && dtstamp_property.dup
|
1197
|
+
categories_property = categories_property && categories_property.dup
|
1198
|
+
last_modified_property = last_modified_property && last_modified_property.dup
|
1199
1199
|
attendee_property = attendee_property && attendee_property.dup
|
1200
1200
|
uid_property = uid_property && uid_property.dup
|
1201
|
+
description_property = description_property && description_property.dup
|
1201
1202
|
url_property = url_property && url_property.dup
|
1203
|
+
summary_property = summary_property && summary_property.dup
|
1202
1204
|
organizer_property = organizer_property && organizer_property.dup
|
1203
1205
|
rrule_property = rrule_property && rrule_property.dup
|
1204
|
-
description_property = description_property && description_property.dup
|
1205
|
-
class_property = class_property && class_property.dup
|
1206
|
-
summary_property = summary_property && summary_property.dup
|
1207
1206
|
attach_property = attach_property && attach_property.dup
|
1208
|
-
|
1209
|
-
|
1207
|
+
class_property = class_property && class_property.dup
|
1208
|
+
request_status_property = request_status_property && request_status_property.dup
|
1210
1209
|
related_to_property = related_to_property && related_to_property.dup
|
1211
1210
|
exrule_property = exrule_property && exrule_property.dup
|
1212
1211
|
comment_property = comment_property && comment_property.dup
|
1212
|
+
sequence_property = sequence_property && sequence_property.dup
|
1213
1213
|
end
|
1214
1214
|
|
1215
1215
|
def add_date_times_to(required_timezones) #:nodoc:
|
1216
|
-
add_property_date_times_to(required_timezones, created_property)
|
1217
1216
|
add_property_date_times_to(required_timezones, dtstart_property)
|
1218
|
-
add_property_date_times_to(required_timezones, dtstamp_property)
|
1219
|
-
add_property_date_times_to(required_timezones, last_modified_property)
|
1220
1217
|
add_property_date_times_to(required_timezones, recurrence_id_property)
|
1221
1218
|
add_property_date_times_to(required_timezones, exdate_property)
|
1222
1219
|
add_property_date_times_to(required_timezones, rdate_property)
|
@@ -1224,7 +1221,7 @@ module RiCal
|
|
1224
1221
|
|
1225
1222
|
module ClassMethods #:nodoc:
|
1226
1223
|
def property_parser #:nodoc:
|
1227
|
-
{"RDATE"=>:rdate_property_from_string, "
|
1224
|
+
{"RDATE"=>:rdate_property_from_string, "COMMENT"=>:comment_property_from_string, "CONTACT"=>:contact_property_from_string, "URL"=>:url_property_from_string, "RECURRENCE-ID"=>:recurrence_id_property_from_string, "LAST-MODIFIED"=>:last_modified_property_from_string, "CLASS"=>:class_property_from_string, "EXDATE"=>:exdate_property_from_string, "UID"=>:uid_property_from_string, "SEQUENCE"=>:sequence_property_from_string, "EXRULE"=>:exrule_property_from_string, "ATTENDEE"=>:attendee_property_from_string, "ORGANIZER"=>:organizer_property_from_string, "RRULE"=>:rrule_property_from_string, "ATTACH"=>:attach_property_from_string, "CATEGORIES"=>:categories_property_from_string, "SUMMARY"=>:summary_property_from_string, "DESCRIPTION"=>:description_property_from_string, "REQUEST-STATUS"=>:request_status_property_from_string, "RELATED-TO"=>:related_to_property_from_string, "STATUS"=>:status_property_from_string, "DTSTART"=>:dtstart_property_from_string, "DTSTAMP"=>:dtstamp_property_from_string, "CREATED"=>:created_property_from_string}
|
1228
1225
|
end
|
1229
1226
|
end
|
1230
1227
|
|
@@ -41,7 +41,7 @@ module RiCal
|
|
41
41
|
|
42
42
|
|
43
43
|
# return the the LAST-MODIFIED property
|
44
|
-
# which will be an instances of RiCal::
|
44
|
+
# which will be an instances of RiCal::PropertyValueZuluDateTime
|
45
45
|
#
|
46
46
|
# [purpose (from RFC 2445)]
|
47
47
|
# This property specifies the date and time that the information associated with the calendar component was last revised in teh calendar store.
|
@@ -52,24 +52,24 @@ module RiCal
|
|
52
52
|
end
|
53
53
|
|
54
54
|
# set the LAST-MODIFIED property
|
55
|
-
# property value should be an instance of RiCal::
|
55
|
+
# property value should be an instance of RiCal::PropertyValueZuluDateTime
|
56
56
|
def last_modified_property=(property_value)
|
57
|
-
@last_modified_property = property_value
|
57
|
+
@last_modified_property = property_value
|
58
58
|
end
|
59
59
|
|
60
60
|
# set the value of the LAST-MODIFIED property
|
61
61
|
def last_modified=(ruby_value)
|
62
|
-
self.last_modified_property= RiCal::PropertyValue::
|
62
|
+
self.last_modified_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
|
63
63
|
end
|
64
64
|
|
65
65
|
# return the value of the LAST-MODIFIED property
|
66
|
-
# which will be an instance of
|
66
|
+
# which will be an instance of ZuluDateTime
|
67
67
|
def last_modified
|
68
68
|
last_modified_property ? last_modified_property.ruby_value : nil
|
69
69
|
end
|
70
70
|
|
71
71
|
def last_modified_property_from_string(line) # :nodoc:
|
72
|
-
@last_modified_property = RiCal::PropertyValue::
|
72
|
+
@last_modified_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
|
73
73
|
end
|
74
74
|
|
75
75
|
|
@@ -107,15 +107,15 @@ module RiCal
|
|
107
107
|
|
108
108
|
|
109
109
|
def export_properties_to(export_stream) #:nodoc:
|
110
|
-
export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
|
111
110
|
export_prop_to(export_stream, "TZURL", @tzurl_property)
|
111
|
+
export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
|
112
112
|
export_prop_to(export_stream, "TZID", @tzid_property)
|
113
113
|
end
|
114
114
|
|
115
115
|
def ==(o) #:nodoc:
|
116
116
|
if o.class == self.class
|
117
|
-
(last_modified_property == o.last_modified_property) &&
|
118
117
|
(tzurl_property == o.tzurl_property) &&
|
118
|
+
(last_modified_property == o.last_modified_property) &&
|
119
119
|
(tzid_property == o.tzid_property)
|
120
120
|
else
|
121
121
|
super
|
@@ -124,18 +124,17 @@ module RiCal
|
|
124
124
|
|
125
125
|
def initialize_copy(o) #:nodoc:
|
126
126
|
super
|
127
|
-
last_modified_property = last_modified_property && last_modified_property.dup
|
128
127
|
tzurl_property = tzurl_property && tzurl_property.dup
|
128
|
+
last_modified_property = last_modified_property && last_modified_property.dup
|
129
129
|
tzid_property = tzid_property && tzid_property.dup
|
130
130
|
end
|
131
131
|
|
132
132
|
def add_date_times_to(required_timezones) #:nodoc:
|
133
|
-
add_property_date_times_to(required_timezones, last_modified_property)
|
134
133
|
end
|
135
134
|
|
136
135
|
module ClassMethods #:nodoc:
|
137
136
|
def property_parser #:nodoc:
|
138
|
-
{"
|
137
|
+
{"TZURL"=>:tzurl_property_from_string, "TZID"=>:tzid_property_from_string, "LAST-MODIFIED"=>:last_modified_property_from_string}
|
139
138
|
end
|
140
139
|
end
|
141
140
|
|
@@ -359,23 +359,23 @@ module RiCal
|
|
359
359
|
end
|
360
360
|
|
361
361
|
def export_properties_to(export_stream) #:nodoc:
|
362
|
+
export_prop_to(export_stream, "RDATE", @rdate_property)
|
362
363
|
export_prop_to(export_stream, "TZOFFSETTO", @tzoffsetto_property)
|
363
364
|
export_prop_to(export_stream, "DTSTART", @dtstart_property)
|
364
|
-
export_prop_to(export_stream, "RRULE", @rrule_property)
|
365
|
-
export_prop_to(export_stream, "TZOFFSETFROM", @tzoffsetfrom_property)
|
366
365
|
export_prop_to(export_stream, "TZNAME", @tzname_property)
|
367
|
-
export_prop_to(export_stream, "
|
366
|
+
export_prop_to(export_stream, "TZOFFSETFROM", @tzoffsetfrom_property)
|
367
|
+
export_prop_to(export_stream, "RRULE", @rrule_property)
|
368
368
|
export_prop_to(export_stream, "COMMENT", @comment_property)
|
369
369
|
end
|
370
370
|
|
371
371
|
def ==(o) #:nodoc:
|
372
372
|
if o.class == self.class
|
373
|
+
(rdate_property == o.rdate_property) &&
|
373
374
|
(tzoffsetto_property == o.tzoffsetto_property) &&
|
374
375
|
(dtstart_property == o.dtstart_property) &&
|
375
|
-
(rrule_property == o.rrule_property) &&
|
376
|
-
(tzoffsetfrom_property == o.tzoffsetfrom_property) &&
|
377
376
|
(tzname_property == o.tzname_property) &&
|
378
|
-
(
|
377
|
+
(tzoffsetfrom_property == o.tzoffsetfrom_property) &&
|
378
|
+
(rrule_property == o.rrule_property) &&
|
379
379
|
(comment_property == o.comment_property)
|
380
380
|
else
|
381
381
|
super
|
@@ -384,12 +384,12 @@ module RiCal
|
|
384
384
|
|
385
385
|
def initialize_copy(o) #:nodoc:
|
386
386
|
super
|
387
|
+
rdate_property = rdate_property && rdate_property.dup
|
387
388
|
tzoffsetto_property = tzoffsetto_property && tzoffsetto_property.dup
|
388
389
|
dtstart_property = dtstart_property && dtstart_property.dup
|
389
|
-
rrule_property = rrule_property && rrule_property.dup
|
390
|
-
tzoffsetfrom_property = tzoffsetfrom_property && tzoffsetfrom_property.dup
|
391
390
|
tzname_property = tzname_property && tzname_property.dup
|
392
|
-
|
391
|
+
tzoffsetfrom_property = tzoffsetfrom_property && tzoffsetfrom_property.dup
|
392
|
+
rrule_property = rrule_property && rrule_property.dup
|
393
393
|
comment_property = comment_property && comment_property.dup
|
394
394
|
end
|
395
395
|
|
@@ -400,7 +400,7 @@ module RiCal
|
|
400
400
|
|
401
401
|
module ClassMethods #:nodoc:
|
402
402
|
def property_parser #:nodoc:
|
403
|
-
{"RDATE"=>:rdate_property_from_string, "
|
403
|
+
{"RDATE"=>:rdate_property_from_string, "COMMENT"=>:comment_property_from_string, "RRULE"=>:rrule_property_from_string, "TZOFFSETFROM"=>:tzoffsetfrom_property_from_string, "TZNAME"=>:tzname_property_from_string, "TZOFFSETTO"=>:tzoffsetto_property_from_string, "DTSTART"=>:dtstart_property_from_string}
|
404
404
|
end
|
405
405
|
end
|
406
406
|
|