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.
- 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
@@ -42,9 +42,13 @@ module RiCal
|
|
42
42
|
def target_date_time_for(date_time)
|
43
43
|
matches_for(date_time)[0]
|
44
44
|
end
|
45
|
+
|
46
|
+
def fixed_day?
|
47
|
+
@source > 0
|
48
|
+
end
|
45
49
|
|
46
50
|
def target_for(date_or_time)
|
47
|
-
if
|
51
|
+
if fixed_day?
|
48
52
|
@source
|
49
53
|
else
|
50
54
|
date_or_time.days_in_month + @source + 1
|
@@ -31,9 +31,13 @@ module RiCal
|
|
31
31
|
def target_date_time_for(date_time)
|
32
32
|
matches_for(date_time)[0]
|
33
33
|
end
|
34
|
+
|
35
|
+
def fixed_day?
|
36
|
+
@source > 0
|
37
|
+
end
|
34
38
|
|
35
39
|
def target_for(date_or_time)
|
36
|
-
if
|
40
|
+
if fixed_day?
|
37
41
|
@source
|
38
42
|
else
|
39
43
|
length_of_year(date_or_time.year) + @source + 1
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'date'
|
2
|
+
module RiCal
|
3
|
+
class PropertyValue
|
4
|
+
#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license
|
5
|
+
#
|
6
|
+
# RiCal::PropertyValue::CalAddress represents an icalendar CalAddress property value
|
7
|
+
# which is defined in RFC 2445 section 4.3.5 pp 35-37
|
8
|
+
class ZuluDateTime < PropertyValue::DateTime
|
9
|
+
|
10
|
+
def tzid
|
11
|
+
"UTC"
|
12
|
+
end
|
13
|
+
|
14
|
+
def value=(val) # :nodoc:
|
15
|
+
if DateTime === val
|
16
|
+
@date_time_value = val
|
17
|
+
else
|
18
|
+
super(val)
|
19
|
+
end
|
20
|
+
@date_time_value = @date_time_value.utc if @date_time_value
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_ri_cal_zulu_date_time
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.convert(timezone_finder, ruby_object) # :nodoc:
|
28
|
+
result = super
|
29
|
+
result.to_ri_cal_zulu_date_time
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require File.join(File.dirname(__FILE__), %w[.. spec_helper])
|
5
|
+
|
6
|
+
describe "RiCal TimeZone problem" do
|
7
|
+
it "should keep the original calendar timezone intact" do
|
8
|
+
original_calendar = RiCal.parse_string(original_calendar_contents).first
|
9
|
+
puts "*"*40
|
10
|
+
puts original_calendar
|
11
|
+
puts "*"*40
|
12
|
+
reply_calendar = reply original_calendar
|
13
|
+
#reply_calendar = RiCal.parse_string(reply_calendar_contents).first
|
14
|
+
puts reply_calendar
|
15
|
+
puts "*"*40
|
16
|
+
|
17
|
+
original_event = original_calendar.events.first
|
18
|
+
reply_event = reply_calendar.events.first
|
19
|
+
reply_event.start_time.to_s.should == original_event.start_time.to_s
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
# This is the calendar contents generated when we send the message >>#reply to the original calendar.
|
26
|
+
def reply_calendar_contents
|
27
|
+
"BEGIN:VCALENDAR
|
28
|
+
PRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN
|
29
|
+
CALSCALE:GREGORIAN
|
30
|
+
VERSION:2.0
|
31
|
+
METHOD:REPLY
|
32
|
+
BEGIN:VTIMEZONE
|
33
|
+
TZID;X-RICAL-TZSOURCE=TZINFO:America/Argentina/Buenos_Aires
|
34
|
+
BEGIN:STANDARD
|
35
|
+
DTSTART:20090314T230000
|
36
|
+
RDATE:20090314T230000
|
37
|
+
TZOFFSETFROM:-0200
|
38
|
+
TZOFFSETTO:-0300
|
39
|
+
TZNAME:ART
|
40
|
+
END:STANDARD
|
41
|
+
END:VTIMEZONE
|
42
|
+
BEGIN:VEVENT
|
43
|
+
CREATED;VALUE=DATE-TIME:20091217T155557Z
|
44
|
+
DTEND;TZID=America/Argentina/Buenos_Aires;VALUE=DATE-TIME:20091227T010000
|
45
|
+
STATUS:CONFIRMED
|
46
|
+
LAST-MODIFIED;TZID=America/Argentina/Buenos_Aires;VALUE=DATE-TIME:2009121
|
47
|
+
7T173400
|
48
|
+
DTSTART;TZID=America/Argentina/Buenos_Aires;VALUE=DATE-TIME:20091227T0000
|
49
|
+
00
|
50
|
+
ATTENDEE;CN=PoketyPoke;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT:barbarazopp
|
51
|
+
o@gmail.com
|
52
|
+
UID:1693CA3B-C528-4E5A-87FB-CDFAEC0EC662
|
53
|
+
ORGANIZER:mailto:nasif.lucas@gmail.com
|
54
|
+
DESCRIPTION:
|
55
|
+
SUMMARY:testing.. Event
|
56
|
+
SEQUENCE:3
|
57
|
+
LOCATION:
|
58
|
+
END:VEVENT
|
59
|
+
END:VCALENDAR".strip
|
60
|
+
end
|
61
|
+
|
62
|
+
def original_calendar_contents
|
63
|
+
"BEGIN:VCALENDAR\nPRODID:-//Apple Inc.//iCal 4.0.1//EN\nCALSCALE:GREGORIAN\nVERSION:2.0\nMETHOD:REQUEST\nBEGIN:VEVENT\nTRANSP:TRANSPARENT\nDTSTAMP;VALUE=DATE-TIME:20091217T155800Z\nCREATED;VALUE=DATE-TIME:20091217T155557Z\nDTEND;TZID=America/Argentina/Buenos_Aires;VALUE=DATE-TIME:20091227T010000\nDTSTART;TZID=America/Argentina/Buenos_Aires;VALUE=DATE-TIME:20091227T0000\n 00\nATTENDEE;CN=Lucas Nasif;CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:nasif.\n lucas@gmail.com\nATTENDEE;CN=barbarazoppo@gmail.com;CUTYPE=INDIVIDUAL;EMAIL=barbarazoppo@g\n mail.com;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:bar\n barazoppo@gmail.com\nUID:1693CA3B-C528-4E5A-87FB-CDFAEC0EC662\nORGANIZER;CN=Lucas Nasif:mailto:nasif.lucas@gmail.com\nSUMMARY:testing.. Event\nSEQUENCE:3\nEND:VEVENT\nBEGIN:VTIMEZONE\nTZID:America/Argentina/Buenos_Aires\nBEGIN:STANDARD\nTZOFFSETTO:-0300\nDTSTART;VALUE=DATE-TIME:20080316T000000\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=3SU\nTZOFFSETFROM:-0200\nTZNAME:GMT-03:00\nEND:STANDARD\nBEGIN:DAYLIGHT\nTZOFFSETTO:-0200\nDTSTART;VALUE=DATE-TIME:20081019T000000\nRRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=3SU\nTZOFFSETFROM:-0300\nTZNAME:GMT-02:00\nEND:DAYLIGHT\nEND:VTIMEZONE\nEND:VCALENDAR\n".strip
|
64
|
+
end
|
65
|
+
|
66
|
+
def reply(original_calendar)
|
67
|
+
icalendar = RiCal.Calendar do | calendar |
|
68
|
+
|
69
|
+
calendar.icalendar_method = "REPLY"
|
70
|
+
calendar.default_tzid = original_calendar.default_tzid
|
71
|
+
|
72
|
+
calendar.event do | event |
|
73
|
+
|
74
|
+
original_event = original_calendar.events.first
|
75
|
+
event.created = original_event.created
|
76
|
+
event.dtstart = original_event.start_time
|
77
|
+
event.dtend = original_event.finish_time
|
78
|
+
event.organizer = original_event.organizer
|
79
|
+
event.location = original_event.location.to_s
|
80
|
+
event.uid_property = original_event.uid_property
|
81
|
+
|
82
|
+
options = {'ROLE' => 'REQ-PARTICIPANT',
|
83
|
+
'PARTSTAT' => 'ACCEPTED',
|
84
|
+
'CN' => 'SomeName...'}
|
85
|
+
|
86
|
+
attendee_property = RiCal::PropertyValue::CalAddress.new(nil,
|
87
|
+
:value => @attendant,
|
88
|
+
:params => options)
|
89
|
+
|
90
|
+
event.attendee_property = attendee_property
|
91
|
+
event.description = original_event.description.to_s
|
92
|
+
event.summary = original_event.summary.to_s
|
93
|
+
|
94
|
+
event.sequence_property = original_event.sequence_property
|
95
|
+
event.status = "CONFIRMED"
|
96
|
+
event.last_modified = DateTime.parse(Time.now.to_s)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
icalendar
|
100
|
+
end
|
data/ri_cal.gemspec
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in RakeFile, and run the gemspec command
|
1
4
|
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = %q{ri_cal}
|
5
|
-
s.version = "0.8.
|
8
|
+
s.version = "0.8.6"
|
6
9
|
|
7
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["
|
9
|
-
s.date = %q{
|
11
|
+
s.authors = ["Rick DeNatale"]
|
12
|
+
s.date = %q{2010-04-15}
|
10
13
|
s.default_executable = %q{ri_cal}
|
11
14
|
s.description = %q{A new Ruby implementation of RFC2445 iCalendar.
|
12
15
|
|
@@ -15,34 +18,228 @@ but do not support important things like enumerating occurrences of repeating ev
|
|
15
18
|
|
16
19
|
This is a clean-slate implementation of RFC2445.
|
17
20
|
|
18
|
-
A Google group for discussion of this library has been set up http://groups.google.com/group/rical_gem
|
19
|
-
|
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}
|
20
24
|
s.executables = ["ri_cal"]
|
21
|
-
s.extra_rdoc_files = [
|
22
|
-
|
23
|
-
|
24
|
-
|
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.rdoc_options = ["--charset=UTF-8"]
|
25
199
|
s.require_paths = ["lib"]
|
26
|
-
s.
|
27
|
-
s.
|
28
|
-
s.
|
200
|
+
s.rubygems_version = %q{1.3.6}
|
201
|
+
s.summary = %q{a new implementation of RFC2445 in Ruby}
|
202
|
+
s.test_files = [
|
203
|
+
"spec/ri_cal/bugreports_spec.rb",
|
204
|
+
"spec/ri_cal/component/alarm_spec.rb",
|
205
|
+
"spec/ri_cal/component/calendar_spec.rb",
|
206
|
+
"spec/ri_cal/component/event_spec.rb",
|
207
|
+
"spec/ri_cal/component/freebusy_spec.rb",
|
208
|
+
"spec/ri_cal/component/journal_spec.rb",
|
209
|
+
"spec/ri_cal/component/t_z_info_timezone_spec.rb",
|
210
|
+
"spec/ri_cal/component/timezone_spec.rb",
|
211
|
+
"spec/ri_cal/component/todo_spec.rb",
|
212
|
+
"spec/ri_cal/component_spec.rb",
|
213
|
+
"spec/ri_cal/core_extensions/string/conversions_spec.rb",
|
214
|
+
"spec/ri_cal/core_extensions/time/calculations_spec.rb",
|
215
|
+
"spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb",
|
216
|
+
"spec/ri_cal/fast_date_time_spec.rb",
|
217
|
+
"spec/ri_cal/inf_loop_spec.rb",
|
218
|
+
"spec/ri_cal/occurrence_enumerator_spec.rb",
|
219
|
+
"spec/ri_cal/parser_spec.rb",
|
220
|
+
"spec/ri_cal/property_value/date_spec.rb",
|
221
|
+
"spec/ri_cal/property_value/date_time_spec.rb",
|
222
|
+
"spec/ri_cal/property_value/duration_spec.rb",
|
223
|
+
"spec/ri_cal/property_value/occurrence_list_spec.rb",
|
224
|
+
"spec/ri_cal/property_value/period_spec.rb",
|
225
|
+
"spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb",
|
226
|
+
"spec/ri_cal/property_value/recurrence_rule_spec.rb",
|
227
|
+
"spec/ri_cal/property_value/text_spec.rb",
|
228
|
+
"spec/ri_cal/property_value/utc_offset_spec.rb",
|
229
|
+
"spec/ri_cal/property_value_spec.rb",
|
230
|
+
"spec/ri_cal/required_timezones_spec.rb",
|
231
|
+
"spec/ri_cal_spec.rb",
|
232
|
+
"spec/spec_helper.rb"
|
233
|
+
]
|
29
234
|
|
30
235
|
if s.respond_to? :specification_version then
|
31
236
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
32
237
|
s.specification_version = 3
|
33
238
|
|
34
239
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
35
|
-
s.add_development_dependency(%q<newgem>, [">= 1.5.2"])
|
36
|
-
s.add_development_dependency(%q<ruby-prof>, [">= 0"])
|
37
|
-
s.add_development_dependency(%q<hoe>, [">= 2.3.3"])
|
38
240
|
else
|
39
|
-
s.add_dependency(%q<newgem>, [">= 1.5.2"])
|
40
|
-
s.add_dependency(%q<ruby-prof>, [">= 0"])
|
41
|
-
s.add_dependency(%q<hoe>, [">= 2.3.3"])
|
42
241
|
end
|
43
242
|
else
|
44
|
-
s.add_dependency(%q<newgem>, [">= 1.5.2"])
|
45
|
-
s.add_dependency(%q<ruby-prof>, [">= 0"])
|
46
|
-
s.add_dependency(%q<hoe>, [">= 2.3.3"])
|
47
243
|
end
|
48
244
|
end
|
245
|
+
|
@@ -5,6 +5,23 @@ require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])
|
|
5
5
|
|
6
6
|
describe RiCal::Component::Event do
|
7
7
|
|
8
|
+
context "with change management properties" do
|
9
|
+
it "should use zulu time for all change management datetime properties" do
|
10
|
+
new_york_offset = Rational(-1, 6)
|
11
|
+
cal = RiCal.Calendar
|
12
|
+
event = RiCal::Component::Event.new(cal)
|
13
|
+
event.dtstamp = result_time_in_zone(2010, 4, 1, 9, 23, 45, "America/New_York", new_york_offset)
|
14
|
+
event.created = result_time_in_zone(2010, 4, 1, 9, 23, 45, "America/New_York", new_york_offset)
|
15
|
+
event.last_modified = result_time_in_zone(2010, 4, 1, 12, 23, 45, "America/New_York", new_york_offset)
|
16
|
+
event.to_s.should == "BEGIN:VEVENT
|
17
|
+
CREATED;VALUE=DATE-TIME:20100401T132345Z
|
18
|
+
DTSTAMP;VALUE=DATE-TIME:20100401T132345Z
|
19
|
+
LAST-MODIFIED;VALUE=DATE-TIME:20100401T162345Z
|
20
|
+
END:VEVENT
|
21
|
+
"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
8
25
|
context ".finish_time" do
|
9
26
|
it "should be the end of the start day for an event with a date dtstart and no dtend or duration" do
|
10
27
|
@it = RiCal.Event do |evt|
|