ri_cal 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/History.txt +7 -0
  2. data/Rakefile +59 -46
  3. data/VERSION +1 -0
  4. data/component_attributes/component_property_defs.yml +3 -3
  5. data/lib/ri_cal/component/t_z_info_timezone.rb +17 -3
  6. data/lib/ri_cal/core_extensions/date/conversions.rb +0 -14
  7. data/lib/ri_cal/core_extensions/date_time/conversions.rb +0 -6
  8. data/lib/ri_cal/fast_date_time.rb +8 -0
  9. data/lib/ri_cal/properties/alarm.rb +8 -8
  10. data/lib/ri_cal/properties/calendar.rb +3 -3
  11. data/lib/ri_cal/properties/event.rb +62 -65
  12. data/lib/ri_cal/properties/freebusy.rb +19 -20
  13. data/lib/ri_cal/properties/journal.rb +50 -53
  14. data/lib/ri_cal/properties/timezone.rb +10 -11
  15. data/lib/ri_cal/properties/timezone_period.rb +10 -10
  16. data/lib/ri_cal/properties/todo.rb +68 -71
  17. data/lib/ri_cal/property_value.rb +1 -0
  18. data/lib/ri_cal/property_value/date.rb +4 -0
  19. data/lib/ri_cal/property_value/date_time.rb +8 -0
  20. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb +4 -3
  21. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb +5 -1
  22. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb +1 -1
  23. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb +5 -1
  24. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb +5 -1
  25. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb +9 -0
  26. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb +11 -1
  27. data/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb +4 -0
  28. data/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb +5 -1
  29. data/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb +5 -1
  30. data/lib/ri_cal/property_value/zulu_date_time.rb +34 -0
  31. data/parked_specs/ri_cal/claudio_a_bug_spec.rb +100 -0
  32. data/ri_cal.gemspec +218 -21
  33. data/spec/ri_cal/component/event_spec.rb +17 -0
  34. data/spec/ri_cal/component/t_z_info_timezone_spec.rb +5 -4
  35. data/spec/ri_cal/fast_date_time_spec.rb +10 -0
  36. data/spec/ri_cal/inf_loop_spec.rb +78 -0
  37. data/spec/ri_cal/parser_spec.rb +3 -3
  38. metadata +61 -60
@@ -1,3 +1,10 @@
1
+ === 0.8.6
2
+ Fixes an issue of RFC 2445 non-conformance - change management time attributes (dtstamp, last_modified, and created) MUST be zulu time
3
+ Changed VTIMEZONE export from tz_info
4
+ Discovered that RFC 2445 expects a timezone period onset to be local time before the change, while TZInfo gives it after the change
5
+ Thanks to both Michael Hale and H. Wade Minter for reporting this.
6
+ Changed from generating a single RDATE line for a timezone period with multiple values to multiple RDATE lines
7
+ to fix a problem reported by Michael Hale.
1
8
  === 0.8.5
2
9
  Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/26
3
10
  events with date parameters failing
data/Rakefile CHANGED
@@ -1,53 +1,66 @@
1
- #- ©2009 Rick DeNatale
2
- #- All rights reserved. Refer to the file README.txt for the license
3
- #
4
- # %w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
5
- #require File.dirname(__FILE__) + '/lib/ri_cal'
6
-
7
1
  require 'rubygems'
8
- gem 'hoe', '>=2.1.0'
9
- require 'hoe'
10
- require 'fileutils'
11
- require './lib/ri_cal'
12
-
13
- Hoe.plugin :newgem
14
- Hoe.plugin :website
15
- # Hoe.plugin :cucumberfeatures
16
-
17
- # Generate all the Rake tasks
18
- # Run 'rake -T' to see list of generated tasks (from gem root directory)
19
- $hoe = Hoe.spec('ri_cal') do |p|
20
- p.developer('author=Rick DeNatale', 'rick.denatale@gmail.com')
21
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
22
- p.rubyforge_name = 'ri-cal'
23
- p.readme_file = "README.txt"
24
- p.extra_dev_deps = [
25
- ['newgem', ">= #{::Newgem::VERSION}"],
26
- ['ruby-prof', ">= 0"]
27
- ]
28
-
29
- p.clean_globs |= %w[**/.DS_Store tmp *.log]
30
- path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
31
- p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
32
- p.rsync_args = '-av --delete --ignore-errors'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "ri_cal"
8
+ gem.summary = %Q{a new implementation of RFC2445 in Ruby}
9
+ gem.description = %Q{A new Ruby implementation of RFC2445 iCalendar.
10
+
11
+ The existing Ruby iCalendar libraries (e.g. icalendar, vpim) provide for parsing and generating icalendar files,
12
+ but do not support important things like enumerating occurrences of repeating events.
13
+
14
+ This is a clean-slate implementation of RFC2445.
15
+
16
+ A Google group for discussion of this library has been set up http://groups.google.com/group/rical_gem
17
+ }
18
+ gem.email = "rick.denatale@gmail.com"
19
+ gem.homepage = "http://github.com/rubyredrick/ri_cal"
20
+ gem.authors = ["Rick DeNatale"]
21
+ ['.gitignore', 'performance_data/*', 'sample_ical_files/*', 'website/*', 'config/website.yml'].each do |excl|
22
+ gem.files.exclude excl
23
+ end
24
+ gem.extra_rdoc_files.include %w{History.txt copyrights.txt}
25
+ # gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
26
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
27
+ end
28
+ Jeweler::GemcutterTasks.new
29
+ rescue LoadError
30
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
31
+ end
32
+
33
+ require 'rake/testtask'
34
+ Rake::TestTask.new(:test) do |test|
35
+ test.libs << 'lib' << 'test'
36
+ test.pattern = 'test/**/test_*.rb'
37
+ test.verbose = true
33
38
  end
34
39
 
35
- require 'newgem/tasks' # load /tasks/*.rake
36
-
37
- # It looks like newgem is already defining these
38
- # Rake::TaskManager.class_eval do
39
- # def remove_task(task_name)
40
- # @tasks.delete(task_name.to_s)
41
- # end
42
- # end
43
- #
44
- # def remove_task(task_name)
45
- # Rake.application.remove_task(task_name)
46
- # end
47
-
48
- # Override hoe's standard spec task
49
- remove_task :spec
40
+ begin
41
+ require 'rcov/rcovtask'
42
+ Rcov::RcovTask.new do |test|
43
+ test.libs << 'test'
44
+ test.pattern = 'test/**/test_*.rb'
45
+ test.verbose = true
46
+ end
47
+ rescue LoadError
48
+ task :rcov do
49
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
50
+ end
51
+ end
50
52
 
51
53
  Dir['tasks/**/*.rake'].each { |t| load t }
52
54
 
53
55
  task :default => [:"spec:with_tzinfo_gem", :"spec:with_active_support"]
56
+
57
+
58
+ require 'rake/rdoctask'
59
+ Rake::RDocTask.new do |rdoc|
60
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
61
+
62
+ rdoc.rdoc_dir = 'rdoc'
63
+ rdoc.title = "ri_cal #{version}"
64
+ rdoc.rdoc_files.include('README*')
65
+ rdoc.rdoc_files.include('lib/**/*.rb')
66
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.8.6
@@ -160,16 +160,16 @@ trigger:
160
160
  rfc_ref: '4.8.6.3 p 127-129'
161
161
  created:
162
162
  purpose: This property specifies the date and time that the calendar information was created by teh calendar user agent in the calendar store.
163
- type: DateTime
163
+ type: ZuluDateTime
164
164
  rfc_ref: '4.8.7.1 pp 129-130'
165
165
  dtstamp:
166
166
  purpose: This property indicates the date/time that the instance of the iCalendar object was created.
167
- type: DateTime
167
+ type: ZuluDateTime
168
168
  auto_set: to_ical
169
169
  rfc_ref: '4.8.7.2 pp 130-131'
170
170
  last-modified:
171
171
  purpose: This property specifies the date and time that the information associated with the calendar component was last revised in teh calendar store.
172
- type: DateTime
172
+ type: ZuluDateTime
173
173
  rfc_ref: '4.8.7.3 p 131'
174
174
  sequence:
175
175
  purpose: This property defines the revision sequence number of the calendar component within a sequence of revisions.
@@ -10,10 +10,11 @@ class RiCal::Component::TZInfoTimezone < RiCal::Component::Timezone
10
10
 
11
11
  def initialize(which, this_period, prev_period)
12
12
  @which = which
13
- @onset = period_local_start(this_period)
14
13
  if prev_period
14
+ @onset = period_local_end(prev_period)
15
15
  @offset_from = format_rfc2445_offset(prev_period.utc_total_offset)
16
16
  else
17
+ @onset = period_local_start(this_period)
17
18
  @offset_from = format_rfc2445_offset(this_period.utc_total_offset)
18
19
  end
19
20
  @offset_to = format_rfc2445_offset(this_period.utc_total_offset)
@@ -21,8 +22,19 @@ class RiCal::Component::TZInfoTimezone < RiCal::Component::Timezone
21
22
  @rdates = []
22
23
  end
23
24
 
25
+ def daylight?
26
+ @which == "DAYLIGHT"
27
+ end
28
+
29
+ def period_local_end(period)
30
+ (period.local_end || DateTime.parse("99990101T000000")).strftime("%Y%m%dT%H%M%S")
31
+ end
32
+
33
+ # This assumes a 1 hour shift which is why we use the previous period local end when
34
+ # possible
24
35
  def period_local_start(period)
25
- (period.local_start || DateTime.parse("16010101T000000")).strftime("%Y%m%dT%H%M%S")
36
+ shift = daylight? ? Rational(-1, 24) : Rational(1, 24)
37
+ ((period.local_start || DateTime.parse("16010101T000000")) + shift).strftime("%Y%m%dT%H%M%S")
26
38
  end
27
39
 
28
40
  def add_period(this_period)
@@ -41,7 +53,9 @@ class RiCal::Component::TZInfoTimezone < RiCal::Component::Timezone
41
53
  def export_to(export_stream)
42
54
  export_stream.puts "BEGIN:#{@which}"
43
55
  export_stream.puts "DTSTART:#{@onset}"
44
- export_stream.puts "RDATE:#{@rdates.join(",")}"
56
+ @rdates.each do |rdate|
57
+ export_stream.puts "RDATE:#{rdate}"
58
+ end
45
59
  export_stream.puts "TZOFFSETFROM:#{@offset_from}"
46
60
  export_stream.puts "TZOFFSETTO:#{@offset_to}"
47
61
  export_stream.puts "TZNAME:#{@abbreviation}"
@@ -38,20 +38,6 @@ module RiCal
38
38
  self
39
39
  end if RUBY_VERSION < '1.9'
40
40
 
41
- # Converts a Date instance to a Time, where the time is set to the beginning of the day.
42
- # The timezone can be either :local or :utc (default :local).
43
- #
44
- # ==== Examples
45
- # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007
46
- #
47
- # date.to_time # => Sat Nov 10 00:00:00 0800 2007
48
- # date.to_time(:local) # => Sat Nov 10 00:00:00 0800 2007
49
- #
50
- # date.to_time(:utc) # => Sat Nov 10 00:00:00 UTC 2007
51
- def to_time(form = :local)
52
- ::Time.send("#{form}_time", year, month, day)
53
- end
54
-
55
41
  # Converts a Date instance to a DateTime, where the time is set to the beginning of the day
56
42
  # and UTC offset is set to 0.
57
43
  #
@@ -38,12 +38,6 @@ module RiCal
38
38
  ::Date.new(year, month, day)
39
39
  end
40
40
 
41
- # Attempts to convert self to a Ruby Time object; returns self if out of range of Ruby Time class
42
- # If self has an offset other than 0, self will just be returned unaltered, since there's no clean way to map it to a Time
43
- def to_time
44
- self.offset == 0 ? ::Time.utc_time(year, month, day, hour, min, sec) : self
45
- end
46
-
47
41
  # To be able to keep Times, Dates and DateTimes interchangeable on conversions
48
42
  def to_datetime
49
43
  self
@@ -112,6 +112,14 @@ module RiCal
112
112
  # end
113
113
  # end
114
114
 
115
+ def utc
116
+ if offset == 0
117
+ self
118
+ else
119
+ advance(:seconds => -offset, :offset => 0)
120
+ end
121
+ end
122
+
115
123
  def hms_to_seconds(hours, minutes, seconds)
116
124
  seconds + 60 *(minutes + (60 * hours))
117
125
  end
@@ -332,26 +332,26 @@ module RiCal
332
332
  end
333
333
 
334
334
  def export_properties_to(export_stream) #:nodoc:
335
- export_prop_to(export_stream, "ACTION", @action_property)
336
- export_prop_to(export_stream, "ATTENDEE", @attendee_property)
337
335
  export_prop_to(export_stream, "DURATION", @duration_property)
336
+ export_prop_to(export_stream, "ATTENDEE", @attendee_property)
338
337
  export_prop_to(export_stream, "TRIGGER", @trigger_property)
339
338
  export_prop_to(export_stream, "DESCRIPTION", @description_property)
340
339
  export_prop_to(export_stream, "SUMMARY", @summary_property)
341
340
  export_prop_to(export_stream, "REPEAT", @repeat_property)
342
341
  export_prop_to(export_stream, "ATTACH", @attach_property)
342
+ export_prop_to(export_stream, "ACTION", @action_property)
343
343
  end
344
344
 
345
345
  def ==(o) #:nodoc:
346
346
  if o.class == self.class
347
- (action_property == o.action_property) &&
348
- (attendee_property == o.attendee_property) &&
349
347
  (duration_property == o.duration_property) &&
348
+ (attendee_property == o.attendee_property) &&
350
349
  (trigger_property == o.trigger_property) &&
351
350
  (description_property == o.description_property) &&
352
351
  (summary_property == o.summary_property) &&
353
352
  (repeat_property == o.repeat_property) &&
354
- (attach_property == o.attach_property)
353
+ (attach_property == o.attach_property) &&
354
+ (action_property == o.action_property)
355
355
  else
356
356
  super
357
357
  end
@@ -359,14 +359,14 @@ module RiCal
359
359
 
360
360
  def initialize_copy(o) #:nodoc:
361
361
  super
362
- action_property = action_property && action_property.dup
363
- attendee_property = attendee_property && attendee_property.dup
364
362
  duration_property = duration_property && duration_property.dup
363
+ attendee_property = attendee_property && attendee_property.dup
365
364
  trigger_property = trigger_property && trigger_property.dup
366
365
  description_property = description_property && description_property.dup
367
366
  summary_property = summary_property && summary_property.dup
368
367
  repeat_property = repeat_property && repeat_property.dup
369
368
  attach_property = attach_property && attach_property.dup
369
+ action_property = action_property && action_property.dup
370
370
  end
371
371
 
372
372
  def add_date_times_to(required_timezones) #:nodoc:
@@ -374,7 +374,7 @@ module RiCal
374
374
 
375
375
  module ClassMethods #:nodoc:
376
376
  def property_parser #:nodoc:
377
- {"ACTION"=>:action_property_from_string, "ATTACH"=>:attach_property_from_string, "REPEAT"=>:repeat_property_from_string, "SUMMARY"=>:summary_property_from_string, "TRIGGER"=>:trigger_property_from_string, "ATTENDEE"=>:attendee_property_from_string, "DURATION"=>:duration_property_from_string, "DESCRIPTION"=>:description_property_from_string}
377
+ {"ACTION"=>:action_property_from_string, "REPEAT"=>:repeat_property_from_string, "ATTENDEE"=>:attendee_property_from_string, "TRIGGER"=>:trigger_property_from_string, "ATTACH"=>:attach_property_from_string, "SUMMARY"=>:summary_property_from_string, "DESCRIPTION"=>:description_property_from_string, "DURATION"=>:duration_property_from_string}
378
378
  end
379
379
  end
380
380
 
@@ -118,16 +118,16 @@ module RiCal
118
118
 
119
119
 
120
120
  def export_properties_to(export_stream) #:nodoc:
121
- export_prop_to(export_stream, "PRODID", @prodid_property)
122
121
  export_prop_to(export_stream, "CALSCALE", @calscale_property)
122
+ export_prop_to(export_stream, "PRODID", @prodid_property)
123
123
  export_prop_to(export_stream, "VERSION", @version_property)
124
124
  export_prop_to(export_stream, "METHOD", @method_property)
125
125
  end
126
126
 
127
127
  def ==(o) #:nodoc:
128
128
  if o.class == self.class
129
- (prodid_property == o.prodid_property) &&
130
129
  (calscale_property == o.calscale_property) &&
130
+ (prodid_property == o.prodid_property) &&
131
131
  (version_property == o.version_property) &&
132
132
  (method_property == o.method_property)
133
133
  else
@@ -137,8 +137,8 @@ module RiCal
137
137
 
138
138
  def initialize_copy(o) #:nodoc:
139
139
  super
140
- prodid_property = prodid_property && prodid_property.dup
141
140
  calscale_property = calscale_property && calscale_property.dup
141
+ prodid_property = prodid_property && prodid_property.dup
142
142
  version_property = version_property && version_property.dup
143
143
  method_property = method_property && method_property.dup
144
144
  end
@@ -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::PropertyValueDateTime
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::PropertyValueDateTime
55
+ # property value should be an instance of RiCal::PropertyValueZuluDateTime
56
56
  def created_property=(property_value)
57
- @created_property = property_value ? property_value.for_parent(self) : nil
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::DateTime.convert(self, ruby_value)
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 DateTime
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::DateTime.new(self, line)
72
+ @created_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
73
73
  end
74
74
 
75
75
 
@@ -173,7 +173,7 @@ module RiCal
173
173
 
174
174
 
175
175
  # return the the LAST-MODIFIED property
176
- # which will be an instances of RiCal::PropertyValueDateTime
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::PropertyValueDateTime
187
+ # property value should be an instance of RiCal::PropertyValueZuluDateTime
188
188
  def last_modified_property=(property_value)
189
- @last_modified_property = property_value ? property_value.for_parent(self) : nil
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::DateTime.convert(self, ruby_value)
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 DateTime
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::DateTime.new(self, line)
204
+ @last_modified_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
205
205
  end
206
206
 
207
207
 
@@ -305,7 +305,7 @@ module RiCal
305
305
 
306
306
 
307
307
  # return the the DTSTAMP property
308
- # which will be an instances of RiCal::PropertyValueDateTime
308
+ # which will be an instances of RiCal::PropertyValueZuluDateTime
309
309
  #
310
310
  # [purpose (from RFC 2445)]
311
311
  # This property indicates the date/time that the instance of the iCalendar object was created.
@@ -316,24 +316,24 @@ module RiCal
316
316
  end
317
317
 
318
318
  # set the DTSTAMP property
319
- # property value should be an instance of RiCal::PropertyValueDateTime
319
+ # property value should be an instance of RiCal::PropertyValueZuluDateTime
320
320
  def dtstamp_property=(property_value)
321
- @dtstamp_property = property_value ? property_value.for_parent(self) : nil
321
+ @dtstamp_property = property_value
322
322
  end
323
323
 
324
324
  # set the value of the DTSTAMP property
325
325
  def dtstamp=(ruby_value)
326
- self.dtstamp_property= RiCal::PropertyValue::DateTime.convert(self, ruby_value)
326
+ self.dtstamp_property= RiCal::PropertyValue::ZuluDateTime.convert(self, ruby_value)
327
327
  end
328
328
 
329
329
  # return the value of the DTSTAMP property
330
- # which will be an instance of DateTime
330
+ # which will be an instance of ZuluDateTime
331
331
  def dtstamp
332
332
  dtstamp_property ? dtstamp_property.ruby_value : nil
333
333
  end
334
334
 
335
335
  def dtstamp_property_from_string(line) # :nodoc:
336
- @dtstamp_property = RiCal::PropertyValue::DateTime.new(self, line)
336
+ @dtstamp_property = RiCal::PropertyValue::ZuluDateTime.new(self, line)
337
337
  end
338
338
 
339
339
 
@@ -1390,72 +1390,72 @@ module RiCal
1390
1390
  end
1391
1391
 
1392
1392
  def export_properties_to(export_stream) #:nodoc:
1393
- export_prop_to(export_stream, "REQUEST-STATUS", @request_status_property)
1393
+ export_prop_to(export_stream, "RDATE", @rdate_property)
1394
+ export_prop_to(export_stream, "CONTACT", @contact_property)
1394
1395
  export_prop_to(export_stream, "EXDATE", @exdate_property)
1395
- export_prop_to(export_stream, "TRANSP", @transp_property)
1396
- export_prop_to(export_stream, "DTSTAMP", @dtstamp_property)
1397
1396
  export_prop_to(export_stream, "CREATED", @created_property)
1398
- export_prop_to(export_stream, "CONTACT", @contact_property)
1399
- export_prop_to(export_stream, "CATEGORIES", @categories_property)
1397
+ export_prop_to(export_stream, "DURATION", @duration_property)
1400
1398
  export_prop_to(export_stream, "DTEND", @dtend_property)
1401
1399
  export_prop_to(export_stream, "STATUS", @status_property)
1402
- export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
1403
1400
  export_prop_to(export_stream, "DTSTART", @dtstart_property)
1404
1401
  export_prop_to(export_stream, "RECURRENCE-ID", @recurrence_id_property)
1402
+ export_prop_to(export_stream, "TRANSP", @transp_property)
1403
+ export_prop_to(export_stream, "DTSTAMP", @dtstamp_property)
1405
1404
  export_prop_to(export_stream, "RESOURCES", @resources_property)
1405
+ export_prop_to(export_stream, "CATEGORIES", @categories_property)
1406
+ export_prop_to(export_stream, "LAST-MODIFIED", @last_modified_property)
1407
+ export_prop_to(export_stream, "PRIORITY", @priority_property)
1408
+ export_prop_to(export_stream, "GEO", @geo_property)
1406
1409
  export_prop_to(export_stream, "ATTENDEE", @attendee_property)
1407
- export_prop_to(export_stream, "DURATION", @duration_property)
1408
1410
  export_prop_to(export_stream, "UID", @uid_property)
1411
+ export_prop_to(export_stream, "DESCRIPTION", @description_property)
1409
1412
  export_prop_to(export_stream, "URL", @url_property)
1410
- export_prop_to(export_stream, "PRIORITY", @priority_property)
1413
+ export_prop_to(export_stream, "SUMMARY", @summary_property)
1411
1414
  export_prop_to(export_stream, "ORGANIZER", @organizer_property)
1412
1415
  export_prop_to(export_stream, "RRULE", @rrule_property)
1413
- export_prop_to(export_stream, "DESCRIPTION", @description_property)
1414
- export_prop_to(export_stream, "CLASS", @class_property)
1415
- export_prop_to(export_stream, "SUMMARY", @summary_property)
1416
- export_prop_to(export_stream, "GEO", @geo_property)
1417
1416
  export_prop_to(export_stream, "ATTACH", @attach_property)
1418
- export_prop_to(export_stream, "SEQUENCE", @sequence_property)
1417
+ export_prop_to(export_stream, "CLASS", @class_property)
1419
1418
  export_prop_to(export_stream, "RELATED-TO", @related_to_property)
1419
+ export_prop_to(export_stream, "REQUEST-STATUS", @request_status_property)
1420
1420
  export_prop_to(export_stream, "EXRULE", @exrule_property)
1421
- export_prop_to(export_stream, "RDATE", @rdate_property)
1422
1421
  export_prop_to(export_stream, "LOCATION", @location_property)
1423
1422
  export_prop_to(export_stream, "COMMENT", @comment_property)
1423
+ export_prop_to(export_stream, "SEQUENCE", @sequence_property)
1424
1424
  end
1425
1425
 
1426
1426
  def ==(o) #:nodoc:
1427
1427
  if o.class == self.class
1428
- (request_status_property == o.request_status_property) &&
1428
+ (rdate_property == o.rdate_property) &&
1429
+ (contact_property == o.contact_property) &&
1429
1430
  (exdate_property == o.exdate_property) &&
1430
- (transp_property == o.transp_property) &&
1431
- (dtstamp_property == o.dtstamp_property) &&
1432
1431
  (created_property == o.created_property) &&
1433
- (contact_property == o.contact_property) &&
1434
- (categories_property == o.categories_property) &&
1432
+ (duration_property == o.duration_property) &&
1435
1433
  (dtend_property == o.dtend_property) &&
1436
1434
  (status_property == o.status_property) &&
1437
- (last_modified_property == o.last_modified_property) &&
1438
1435
  (dtstart_property == o.dtstart_property) &&
1439
1436
  (recurrence_id_property == o.recurrence_id_property) &&
1437
+ (transp_property == o.transp_property) &&
1438
+ (dtstamp_property == o.dtstamp_property) &&
1440
1439
  (resources_property == o.resources_property) &&
1440
+ (categories_property == o.categories_property) &&
1441
+ (last_modified_property == o.last_modified_property) &&
1442
+ (priority_property == o.priority_property) &&
1443
+ (geo_property == o.geo_property) &&
1441
1444
  (attendee_property == o.attendee_property) &&
1442
- (duration_property == o.duration_property) &&
1443
1445
  (uid_property == o.uid_property) &&
1446
+ (description_property == o.description_property) &&
1444
1447
  (url_property == o.url_property) &&
1445
- (priority_property == o.priority_property) &&
1448
+ (summary_property == o.summary_property) &&
1446
1449
  (organizer_property == o.organizer_property) &&
1447
1450
  (rrule_property == o.rrule_property) &&
1448
- (description_property == o.description_property) &&
1449
- (class_property == o.class_property) &&
1450
- (summary_property == o.summary_property) &&
1451
- (geo_property == o.geo_property) &&
1452
1451
  (attach_property == o.attach_property) &&
1453
- (sequence_property == o.sequence_property) &&
1452
+ (class_property == o.class_property) &&
1454
1453
  (related_to_property == o.related_to_property) &&
1454
+ (request_status_property == o.request_status_property) &&
1455
1455
  (exrule_property == o.exrule_property) &&
1456
- (rdate_property == o.rdate_property) &&
1457
1456
  (location_property == o.location_property) &&
1458
- (comment_property == o.comment_property)
1457
+ (comment_property == o.comment_property) &&
1458
+ (sequence_property == o.sequence_property)
1459
1459
  else
1460
1460
  super
1461
1461
  end
@@ -1463,44 +1463,41 @@ module RiCal
1463
1463
 
1464
1464
  def initialize_copy(o) #:nodoc:
1465
1465
  super
1466
- request_status_property = request_status_property && request_status_property.dup
1466
+ rdate_property = rdate_property && rdate_property.dup
1467
+ contact_property = contact_property && contact_property.dup
1467
1468
  exdate_property = exdate_property && exdate_property.dup
1468
- transp_property = transp_property && transp_property.dup
1469
- dtstamp_property = dtstamp_property && dtstamp_property.dup
1470
1469
  created_property = created_property && created_property.dup
1471
- contact_property = contact_property && contact_property.dup
1472
- categories_property = categories_property && categories_property.dup
1470
+ duration_property = duration_property && duration_property.dup
1473
1471
  dtend_property = dtend_property && dtend_property.dup
1474
1472
  status_property = status_property && status_property.dup
1475
- last_modified_property = last_modified_property && last_modified_property.dup
1476
1473
  dtstart_property = dtstart_property && dtstart_property.dup
1477
1474
  recurrence_id_property = recurrence_id_property && recurrence_id_property.dup
1475
+ transp_property = transp_property && transp_property.dup
1476
+ dtstamp_property = dtstamp_property && dtstamp_property.dup
1478
1477
  resources_property = resources_property && resources_property.dup
1478
+ categories_property = categories_property && categories_property.dup
1479
+ last_modified_property = last_modified_property && last_modified_property.dup
1480
+ priority_property = priority_property && priority_property.dup
1481
+ geo_property = geo_property && geo_property.dup
1479
1482
  attendee_property = attendee_property && attendee_property.dup
1480
- duration_property = duration_property && duration_property.dup
1481
1483
  uid_property = uid_property && uid_property.dup
1484
+ description_property = description_property && description_property.dup
1482
1485
  url_property = url_property && url_property.dup
1483
- priority_property = priority_property && priority_property.dup
1486
+ summary_property = summary_property && summary_property.dup
1484
1487
  organizer_property = organizer_property && organizer_property.dup
1485
1488
  rrule_property = rrule_property && rrule_property.dup
1486
- description_property = description_property && description_property.dup
1487
- class_property = class_property && class_property.dup
1488
- summary_property = summary_property && summary_property.dup
1489
- geo_property = geo_property && geo_property.dup
1490
1489
  attach_property = attach_property && attach_property.dup
1491
- sequence_property = sequence_property && sequence_property.dup
1490
+ class_property = class_property && class_property.dup
1492
1491
  related_to_property = related_to_property && related_to_property.dup
1492
+ request_status_property = request_status_property && request_status_property.dup
1493
1493
  exrule_property = exrule_property && exrule_property.dup
1494
- rdate_property = rdate_property && rdate_property.dup
1495
1494
  location_property = location_property && location_property.dup
1496
1495
  comment_property = comment_property && comment_property.dup
1496
+ sequence_property = sequence_property && sequence_property.dup
1497
1497
  end
1498
1498
 
1499
1499
  def add_date_times_to(required_timezones) #:nodoc:
1500
- add_property_date_times_to(required_timezones, created_property)
1501
1500
  add_property_date_times_to(required_timezones, dtstart_property)
1502
- add_property_date_times_to(required_timezones, last_modified_property)
1503
- add_property_date_times_to(required_timezones, dtstamp_property)
1504
1501
  add_property_date_times_to(required_timezones, recurrence_id_property)
1505
1502
  add_property_date_times_to(required_timezones, dtend_property)
1506
1503
  add_property_date_times_to(required_timezones, exdate_property)
@@ -1509,7 +1506,7 @@ module RiCal
1509
1506
 
1510
1507
  module ClassMethods #:nodoc:
1511
1508
  def property_parser #:nodoc:
1512
- {"RELATED-TO"=>:related_to_property_from_string, "RDATE"=>:rdate_property_from_string, "DTEND"=>:dtend_property_from_string, "DTSTART"=>:dtstart_property_from_string, "TRANSP"=>:transp_property_from_string, "DTSTAMP"=>:dtstamp_property_from_string, "LOCATION"=>:location_property_from_string, "EXRULE"=>:exrule_property_from_string, "CONTACT"=>:contact_property_from_string, "URL"=>:url_property_from_string, "LAST-MODIFIED"=>:last_modified_property_from_string, "RESOURCES"=>:resources_property_from_string, "EXDATE"=>:exdate_property_from_string, "ATTACH"=>:attach_property_from_string, "UID"=>:uid_property_from_string, "SEQUENCE"=>:sequence_property_from_string, "CATEGORIES"=>:categories_property_from_string, "RECURRENCE-ID"=>:recurrence_id_property_from_string, "SUMMARY"=>:summary_property_from_string, "GEO"=>:geo_property_from_string, "CLASS"=>:class_property_from_string, "RRULE"=>:rrule_property_from_string, "STATUS"=>:status_property_from_string, "ATTENDEE"=>:attendee_property_from_string, "PRIORITY"=>:priority_property_from_string, "ORGANIZER"=>:organizer_property_from_string, "CREATED"=>:created_property_from_string, "REQUEST-STATUS"=>:request_status_property_from_string, "COMMENT"=>:comment_property_from_string, "DURATION"=>:duration_property_from_string, "DESCRIPTION"=>:description_property_from_string}
1509
+ {"RDATE"=>:rdate_property_from_string, "COMMENT"=>:comment_property_from_string, "TRANSP"=>:transp_property_from_string, "DTEND"=>:dtend_property_from_string, "LOCATION"=>:location_property_from_string, "CONTACT"=>:contact_property_from_string, "RECURRENCE-ID"=>:recurrence_id_property_from_string, "URL"=>:url_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, "GEO"=>:geo_property_from_string, "RRULE"=>:rrule_property_from_string, "RESOURCES"=>:resources_property_from_string, "ATTACH"=>:attach_property_from_string, "CATEGORIES"=>:categories_property_from_string, "SUMMARY"=>:summary_property_from_string, "PRIORITY"=>:priority_property_from_string, "DESCRIPTION"=>:description_property_from_string, "RELATED-TO"=>:related_to_property_from_string, "REQUEST-STATUS"=>:request_status_property_from_string, "DURATION"=>:duration_property_from_string, "STATUS"=>:status_property_from_string, "DTSTART"=>:dtstart_property_from_string, "DTSTAMP"=>:dtstamp_property_from_string, "CREATED"=>:created_property_from_string}
1513
1510
  end
1514
1511
  end
1515
1512