icalendar 0.98 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/docs/api/classes/HashAttrs.html +15 -15
- data/docs/api/classes/HashAttrs.src/M000070.html +12 -5
- data/docs/api/classes/HashAttrs.src/{M000069.html → M000071.html} +0 -0
- data/docs/api/classes/HashAttrs.src/M000072.html +19 -0
- data/docs/api/classes/Icalendar/Alarm.html +5 -29
- data/docs/api/classes/Icalendar/Alarm.src/{M000020.html → M000021.html} +0 -0
- data/docs/api/classes/Icalendar/Calendar.html +58 -57
- data/docs/api/classes/Icalendar/Calendar.src/M000056.html +9 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000057.html +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000058.html +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000059.html +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000060.html +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000061.html +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000062.html +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000063.html +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000064.html +4 -5
- data/docs/api/classes/Icalendar/Calendar.src/{M000055.html → M000065.html} +4 -4
- data/docs/api/classes/Icalendar/Calendar.src/M000066.html +19 -0
- data/docs/api/classes/Icalendar/Component.html +61 -25
- data/docs/api/classes/Icalendar/Component.src/M000029.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000030.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000035.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000040.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000041.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000042.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000043.html +22 -12
- data/docs/api/classes/Icalendar/Component.src/M000044.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000045.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000046.html +1 -1
- data/docs/api/classes/Icalendar/Component.src/M000047.html +4 -4
- data/docs/api/classes/Icalendar/Component.src/M000048.html +4 -12
- data/docs/api/classes/Icalendar/Component.src/M000049.html +10 -14
- data/docs/api/classes/Icalendar/Component.src/M000050.html +14 -7
- data/docs/api/classes/Icalendar/Component.src/M000051.html +19 -0
- data/docs/api/classes/Icalendar/Component.src/M000052.html +22 -0
- data/docs/api/classes/Icalendar/Daylight.html +5 -5
- data/docs/api/classes/Icalendar/Daylight.src/{M000051.html → M000053.html} +1 -1
- data/docs/api/classes/Icalendar/Event.html +10 -34
- data/docs/api/classes/Icalendar/Event.src/{M000052.html → M000054.html} +0 -0
- data/docs/api/classes/Icalendar/Event.src/{M000053.html → M000055.html} +0 -0
- data/docs/api/classes/Icalendar/Freebusy.html +5 -44
- data/docs/api/classes/Icalendar/Freebusy.src/{M000065.html → M000067.html} +0 -0
- data/docs/api/classes/Icalendar/Geo.html +2 -2
- data/docs/api/classes/Icalendar/Journal.html +0 -15
- data/docs/api/classes/Icalendar/Parameter.html +5 -5
- data/docs/api/classes/Icalendar/Parameter.src/{M000066.html → M000068.html} +0 -0
- data/docs/api/classes/Icalendar/Parser.src/M000019.html +1 -1
- data/docs/api/classes/Icalendar/Standard.src/M000015.html +1 -1
- data/docs/api/classes/Icalendar/Timezone.src/M000027.html +3 -1
- data/docs/api/classes/Icalendar/Timezone.src/M000028.html +1 -1
- data/docs/api/classes/Icalendar/Todo.html +5 -20
- data/docs/api/classes/Icalendar/Todo.src/{M000021.html → M000020.html} +0 -0
- data/docs/api/classes/Object.html +7 -5
- data/docs/api/classes/URI/Generic.html +5 -5
- data/docs/api/classes/URI/Generic.src/{M000067.html → M000069.html} +0 -0
- data/docs/api/created.rid +1 -1
- data/docs/api/files/COPYING.html +1 -1
- data/docs/api/files/GPL.html +3 -3
- data/docs/api/files/README.html +5 -5
- data/docs/api/files/lib/hash_attrs_rb.html +1 -1
- data/docs/api/files/lib/icalendar/base_rb.html +1 -1
- data/docs/api/files/lib/icalendar/calendar_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/alarm_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/event_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/freebusy_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/journal_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/timezone_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/todo_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component_rb.html +1 -1
- data/docs/api/files/lib/icalendar/conversions_rb.html +1 -1
- data/docs/api/files/lib/icalendar/helpers_rb.html +1 -1
- data/docs/api/files/lib/icalendar/parameter_rb.html +1 -1
- data/docs/api/files/lib/icalendar/parser_rb.html +1 -1
- data/docs/api/files/lib/icalendar_rb.html +1 -1
- data/docs/api/files/lib/meta_rb.html +1 -1
- data/docs/api/fr_method_index.html +32 -30
- data/lib/icalendar/component/alarm.rb +1 -1
- data/lib/icalendar/component/event.rb +1 -1
- data/lib/icalendar/component/freebusy.rb +2 -2
- data/lib/icalendar/component/journal.rb +1 -1
- data/lib/icalendar/component/timezone.rb +3 -1
- data/lib/icalendar/component/todo.rb +1 -1
- data/lib/icalendar/component.rb +36 -14
- data/lib/icalendar/parser.rb +1 -2
- metadata +34 -32
- data/docs/api/classes/HashAttrs.src/M000068.html +0 -26
- data/docs/api/classes/Icalendar/Calendar.src/M000054.html +0 -23
@@ -21,75 +21,77 @@
|
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
23
|
<a href="classes/Icalendar/Component.html#M000031">add (Icalendar::Component)</a><br />
|
24
|
-
<a href="classes/Icalendar/Component.html#M000030">add_component (Icalendar::Component)</a><br />
|
25
24
|
<a href="classes/Icalendar/Timezone.html#M000026">add_component (Icalendar::Timezone)</a><br />
|
25
|
+
<a href="classes/Icalendar/Component.html#M000030">add_component (Icalendar::Component)</a><br />
|
26
26
|
<a href="classes/Icalendar/Component.html#M000032">add_event (Icalendar::Component)</a><br />
|
27
27
|
<a href="classes/Icalendar/Component.html#M000034">add_journal (Icalendar::Component)</a><br />
|
28
28
|
<a href="classes/Icalendar/Component.html#M000033">add_todo (Icalendar::Component)</a><br />
|
29
|
-
<a href="classes/Icalendar/Event.html#
|
29
|
+
<a href="classes/Icalendar/Event.html#M000055">alarm (Icalendar::Event)</a><br />
|
30
30
|
<a href="classes/Icalendar/DateProp.html#M000013">append_features (Icalendar::DateProp)</a><br />
|
31
31
|
<a href="classes/Object.html#M000010">class_def (Object)</a><br />
|
32
32
|
<a href="classes/Icalendar/Component.html#M000045">custom_property (Icalendar::Component)</a><br />
|
33
33
|
<a href="classes/Icalendar/DateProp/ClassMethods.html#M000014">date_property (Icalendar::DateProp::ClassMethods)</a><br />
|
34
34
|
<a href="classes/Icalendar/Base.html#M000022">debug (Icalendar::Base)</a><br />
|
35
|
-
<a href="classes/Icalendar/Calendar.html#
|
36
|
-
<a href="classes/Icalendar/Calendar.html#
|
37
|
-
<a href="classes/Icalendar/Calendar.html#
|
38
|
-
<a href="classes/Icalendar/Calendar.html#
|
39
|
-
<a href="classes/Icalendar/Calendar.html#
|
40
|
-
<a href="classes/Icalendar/Calendar.html#
|
41
|
-
<a href="classes/HashAttrs.html#
|
42
|
-
<a href="classes/HashAttrs.html#
|
43
|
-
<a href="classes/HashAttrs.html#
|
44
|
-
<a href="classes/Icalendar/Component.html#
|
45
|
-
<a href="classes/Icalendar/Component.html#
|
46
|
-
<a href="classes/Icalendar/Component.html#
|
47
|
-
<a href="classes/Icalendar/
|
35
|
+
<a href="classes/Icalendar/Calendar.html#M000057">event (Icalendar::Calendar)</a><br />
|
36
|
+
<a href="classes/Icalendar/Calendar.html#M000058">find_event (Icalendar::Calendar)</a><br />
|
37
|
+
<a href="classes/Icalendar/Calendar.html#M000064">find_freebusy (Icalendar::Calendar)</a><br />
|
38
|
+
<a href="classes/Icalendar/Calendar.html#M000062">find_journal (Icalendar::Calendar)</a><br />
|
39
|
+
<a href="classes/Icalendar/Calendar.html#M000060">find_todo (Icalendar::Calendar)</a><br />
|
40
|
+
<a href="classes/Icalendar/Calendar.html#M000063">freebusy (Icalendar::Calendar)</a><br />
|
41
|
+
<a href="classes/HashAttrs.html#M000072">hash_accessor (HashAttrs)</a><br />
|
42
|
+
<a href="classes/HashAttrs.html#M000070">hash_reader (HashAttrs)</a><br />
|
43
|
+
<a href="classes/HashAttrs.html#M000071">hash_writer (HashAttrs)</a><br />
|
44
|
+
<a href="classes/Icalendar/Component.html#M000048">ical_component (Icalendar::Component)</a><br />
|
45
|
+
<a href="classes/Icalendar/Component.html#M000050">ical_multi_property (Icalendar::Component)</a><br />
|
46
|
+
<a href="classes/Icalendar/Component.html#M000051">ical_multiline_property (Icalendar::Component)</a><br />
|
47
|
+
<a href="classes/Icalendar/Component.html#M000049">ical_property (Icalendar::Component)</a><br />
|
48
|
+
<a href="classes/Icalendar/Calendar.html#M000061">journal (Icalendar::Calendar)</a><br />
|
48
49
|
<a href="classes/Object.html#M000009">meta_def (Object)</a><br />
|
49
50
|
<a href="classes/Object.html#M000007">meta_eval (Object)</a><br />
|
50
51
|
<a href="classes/Object.html#M000008">meta_include (Object)</a><br />
|
51
52
|
<a href="classes/Object.html#M000006">metaclass (Object)</a><br />
|
52
53
|
<a href="classes/Icalendar/Component.html#M000046">multi_property? (Icalendar::Component)</a><br />
|
54
|
+
<a href="classes/Icalendar/Component.html#M000047">multiline_property? (Icalendar::Component)</a><br />
|
55
|
+
<a href="classes/Icalendar/Daylight.html#M000053">new (Icalendar::Daylight)</a><br />
|
56
|
+
<a href="classes/Icalendar/Alarm.html#M000021">new (Icalendar::Alarm)</a><br />
|
57
|
+
<a href="classes/Icalendar/Todo.html#M000020">new (Icalendar::Todo)</a><br />
|
58
|
+
<a href="classes/Icalendar/Calendar.html#M000056">new (Icalendar::Calendar)</a><br />
|
53
59
|
<a href="classes/Icalendar/Component.html#M000029">new (Icalendar::Component)</a><br />
|
60
|
+
<a href="classes/Icalendar/Event.html#M000054">new (Icalendar::Event)</a><br />
|
54
61
|
<a href="classes/Icalendar/Timezone.html#M000028">new (Icalendar::Timezone)</a><br />
|
55
|
-
<a href="classes/Icalendar/Freebusy.html#M000065">new (Icalendar::Freebusy)</a><br />
|
56
62
|
<a href="classes/Icalendar/Standard.html#M000015">new (Icalendar::Standard)</a><br />
|
57
|
-
<a href="classes/Icalendar/
|
63
|
+
<a href="classes/Icalendar/Freebusy.html#M000067">new (Icalendar::Freebusy)</a><br />
|
64
|
+
<a href="classes/Icalendar/Parser.html#M000017">new (Icalendar::Parser)</a><br />
|
58
65
|
<a href="classes/Icalendar/Journal.html#M000016">new (Icalendar::Journal)</a><br />
|
59
|
-
<a href="classes/Icalendar/Todo.html#M000021">new (Icalendar::Todo)</a><br />
|
60
|
-
<a href="classes/Icalendar/Daylight.html#M000051">new (Icalendar::Daylight)</a><br />
|
61
66
|
<a href="classes/Icalendar/Geo.html#M000024">new (Icalendar::Geo)</a><br />
|
62
|
-
<a href="classes/Icalendar/Alarm.html#M000020">new (Icalendar::Alarm)</a><br />
|
63
|
-
<a href="classes/Icalendar/Parser.html#M000017">new (Icalendar::Parser)</a><br />
|
64
|
-
<a href="classes/Icalendar/Event.html#M000052">new (Icalendar::Event)</a><br />
|
65
67
|
<a href="classes/Icalendar/Component.html#M000040">new_uid (Icalendar::Component)</a><br />
|
66
68
|
<a href="classes/Icalendar/Parser.html#M000018">next_line (Icalendar::Parser)</a><br />
|
67
69
|
<a href="classes/Icalendar/Parser.html#M000019">parse (Icalendar::Parser)</a><br />
|
68
70
|
<a href="classes/Icalendar/Component.html#M000042">print_component (Icalendar::Component)</a><br />
|
69
71
|
<a href="classes/Icalendar/Component.html#M000044">print_parameters (Icalendar::Component)</a><br />
|
70
72
|
<a href="classes/Icalendar/Component.html#M000043">print_properties (Icalendar::Component)</a><br />
|
71
|
-
<a href="classes/Icalendar/Calendar.html#
|
73
|
+
<a href="classes/Icalendar/Calendar.html#M000066">publish (Icalendar::Calendar)</a><br />
|
72
74
|
<a href="classes/Icalendar/Base.html#M000023">quiet (Icalendar::Base)</a><br />
|
73
75
|
<a href="classes/Icalendar/Component.html#M000036">remove (Icalendar::Component)</a><br />
|
74
76
|
<a href="classes/Icalendar/Component.html#M000035">remove_component (Icalendar::Component)</a><br />
|
75
77
|
<a href="classes/Icalendar/Component.html#M000037">remove_event (Icalendar::Component)</a><br />
|
76
78
|
<a href="classes/Icalendar/Component.html#M000039">remove_journal (Icalendar::Component)</a><br />
|
77
79
|
<a href="classes/Icalendar/Component.html#M000038">remove_todo (Icalendar::Component)</a><br />
|
78
|
-
<a href="classes/Icalendar/Component.html#
|
79
|
-
<a href="classes/Icalendar/Calendar.html#
|
80
|
-
<a href="classes/Fixnum.html#M000011">to_ical (Fixnum)</a><br />
|
80
|
+
<a href="classes/Icalendar/Component.html#M000052">respond_to? (Icalendar::Component)</a><br />
|
81
|
+
<a href="classes/Icalendar/Calendar.html#M000065">timezone (Icalendar::Calendar)</a><br />
|
81
82
|
<a href="classes/Icalendar/Geo.html#M000025">to_ical (Icalendar::Geo)</a><br />
|
82
|
-
<a href="classes/String.html#M000012">to_ical (String)</a><br />
|
83
83
|
<a href="classes/Time.html#M000001">to_ical (Time)</a><br />
|
84
|
+
<a href="classes/String.html#M000012">to_ical (String)</a><br />
|
85
|
+
<a href="classes/Fixnum.html#M000011">to_ical (Fixnum)</a><br />
|
84
86
|
<a href="classes/DateTime.html#M000005">to_ical (DateTime)</a><br />
|
85
87
|
<a href="classes/Icalendar/Timezone.html#M000027">to_ical (Icalendar::Timezone)</a><br />
|
86
88
|
<a href="classes/Icalendar/Component.html#M000041">to_ical (Icalendar::Component)</a><br />
|
87
89
|
<a href="classes/Float.html#M000003">to_ical (Float)</a><br />
|
88
90
|
<a href="classes/Array.html#M000002">to_ical (Array)</a><br />
|
89
|
-
<a href="classes/URI/Generic.html#
|
91
|
+
<a href="classes/URI/Generic.html#M000069">to_ical (URI::Generic)</a><br />
|
90
92
|
<a href="classes/Date.html#M000004">to_ical (Date)</a><br />
|
91
|
-
<a href="classes/Icalendar/Parameter.html#
|
92
|
-
<a href="classes/Icalendar/Calendar.html#
|
93
|
+
<a href="classes/Icalendar/Parameter.html#M000068">to_s (Icalendar::Parameter)</a><br />
|
94
|
+
<a href="classes/Icalendar/Calendar.html#M000059">todo (Icalendar::Calendar)</a><br />
|
93
95
|
</div>
|
94
96
|
</div>
|
95
97
|
</body>
|
@@ -30,7 +30,7 @@ module Icalendar
|
|
30
30
|
ical_property :sequence
|
31
31
|
|
32
32
|
# Multi properties
|
33
|
-
|
33
|
+
ical_multiline_property :attendee, :attendee, :attendees
|
34
34
|
ical_multi_property :attach, :attachment, :attachments
|
35
35
|
|
36
36
|
def initialize()
|
@@ -77,7 +77,7 @@ module Icalendar
|
|
77
77
|
ical_multi_property :attach, :attachment, :attachments
|
78
78
|
|
79
79
|
# Defines an attendee for this calendar item
|
80
|
-
|
80
|
+
ical_multiline_property :attendee, :attendee, :attendees
|
81
81
|
|
82
82
|
# Defines the categories for a calendar component (school, work...)
|
83
83
|
ical_multi_property :categories, :category, :categories
|
@@ -22,9 +22,9 @@ module Icalendar
|
|
22
22
|
ical_property :url
|
23
23
|
|
24
24
|
# Multi-properties
|
25
|
-
|
25
|
+
ical_multiline_property :attendee, :attendee, :attendees
|
26
26
|
ical_multi_property :comment, :comment, :comments
|
27
|
-
|
27
|
+
ical_multiline_property :freebusy, :freebusy, :freebusys
|
28
28
|
ical_multi_property :rstatus, :request_status, :request_statuses
|
29
29
|
|
30
30
|
def initialize()
|
@@ -36,7 +36,7 @@ module Icalendar
|
|
36
36
|
|
37
37
|
# Multi-properties
|
38
38
|
ical_multi_property :attach, :attachment, :attachments
|
39
|
-
|
39
|
+
ical_multiline_property :attendee, :attendee, :attendees
|
40
40
|
ical_multi_property :categories, :category, :categories
|
41
41
|
ical_multi_property :comment, :comment, :comments
|
42
42
|
ical_multi_property :contact, :contact, :contacts
|
@@ -49,10 +49,12 @@ module Icalendar
|
|
49
49
|
# Also need a custom to_ical because typically it iterates over an array
|
50
50
|
# of components.
|
51
51
|
def to_ical
|
52
|
-
print_component do
|
52
|
+
print_component do
|
53
|
+
s = ""
|
53
54
|
@components.each_value do |comp|
|
54
55
|
s << comp.to_ical
|
55
56
|
end
|
57
|
+
s
|
56
58
|
end
|
57
59
|
end
|
58
60
|
|
@@ -40,7 +40,7 @@ module Icalendar
|
|
40
40
|
|
41
41
|
# Multi-properties
|
42
42
|
ical_multi_property :attach, :attachment, :attachments
|
43
|
-
|
43
|
+
ical_multiline_property :attendee, :attendee, :attendees
|
44
44
|
ical_multi_property :categories, :category, :categories
|
45
45
|
ical_multi_property :comment, :comment, :comments
|
46
46
|
ical_multi_property :contact, :contact, :contacts
|
data/lib/icalendar/component.rb
CHANGED
@@ -41,6 +41,7 @@ module Icalendar
|
|
41
41
|
attr_accessor :properties
|
42
42
|
|
43
43
|
@@multi_properties = {}
|
44
|
+
@@multiline_properties = {}
|
44
45
|
|
45
46
|
def initialize(name)
|
46
47
|
@name = name
|
@@ -136,20 +137,30 @@ module Icalendar
|
|
136
137
|
end
|
137
138
|
|
138
139
|
# Property name
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
140
|
+
unless multiline_property?(key)
|
141
|
+
prelude = "#{key.gsub(/_/, '-').upcase}" +
|
142
|
+
|
143
|
+
# Possible parameters
|
144
|
+
print_parameters(val)
|
145
|
+
|
146
|
+
# Property value
|
147
|
+
value = ":#{val.to_ical}"
|
148
|
+
escaped = prelude + value.gsub("\\", "\\\\").gsub("\n", "\\n").gsub(",", "\\,").gsub(";", "\\;")
|
149
|
+
s << escaped.slice!(0, MAX_LINE_LENGTH) << "\r\n " while escaped.size > MAX_LINE_LENGTH
|
150
|
+
s << escaped << "\r\n"
|
151
|
+
s.gsub!(/ *$/, '')
|
152
|
+
else
|
153
|
+
prelude = "#{key.gsub(/_/, '-').upcase}"
|
154
|
+
val.each do |v|
|
155
|
+
params = print_parameters(v)
|
156
|
+
value = ":#{v.to_ical}"
|
157
|
+
escaped = prelude + params + value.gsub("\\", "\\\\").gsub("\n", "\\n").gsub(",", "\\,").gsub(";", "\\;")
|
158
|
+
s << escaped.slice!(0, MAX_LINE_LENGTH) << "\r\n " while escaped.size > MAX_LINE_LENGTH
|
159
|
+
s << escaped << "\r\n"
|
160
|
+
s.gsub!(/ *$/, '')
|
161
|
+
end
|
162
|
+
end
|
151
163
|
end
|
152
|
-
|
153
164
|
s
|
154
165
|
end
|
155
166
|
|
@@ -188,6 +199,10 @@ module Icalendar
|
|
188
199
|
@@multi_properties.has_key?(name.downcase)
|
189
200
|
end
|
190
201
|
|
202
|
+
def multiline_property?(name)
|
203
|
+
@@multiline_properties.has_key?(name.downcase)
|
204
|
+
end
|
205
|
+
|
191
206
|
# Make it protected so we can monitor usage...
|
192
207
|
protected
|
193
208
|
|
@@ -199,7 +214,6 @@ module Icalendar
|
|
199
214
|
def Component.ical_property(property, alias_name = nil, prop_name = nil)
|
200
215
|
property = "#{property}".strip.downcase
|
201
216
|
alias_name = "#{alias_name}".strip.downcase unless alias_name.nil?
|
202
|
-
|
203
217
|
# If a prop_name was given then we use that for the actual storage
|
204
218
|
property = "#{prop_name}".strip.downcase unless prop_name.nil?
|
205
219
|
|
@@ -225,6 +239,14 @@ module Icalendar
|
|
225
239
|
generate_multi_remover(property, singular)
|
226
240
|
end
|
227
241
|
|
242
|
+
# Define a set of methods defining a new property, which
|
243
|
+
# supports multiple values in multiple lines with same property name
|
244
|
+
def Component.ical_multiline_property(property, singular, plural)
|
245
|
+
@@multiline_properties["#{property}"] = true
|
246
|
+
ical_multi_property(property, singular, plural)
|
247
|
+
end
|
248
|
+
|
249
|
+
|
228
250
|
private
|
229
251
|
|
230
252
|
def Component.generate_getter(property, alias_name)
|
data/lib/icalendar/parser.rb
CHANGED
@@ -93,7 +93,7 @@ module Icalendar
|
|
93
93
|
|
94
94
|
@@logger.debug "parsing..."
|
95
95
|
# Outer loop for Calendar objects
|
96
|
-
while (line = next_line)
|
96
|
+
while (line = next_line)
|
97
97
|
fields = parse_line(line)
|
98
98
|
|
99
99
|
# Just iterate through until we find the beginning of a calendar object
|
@@ -148,7 +148,6 @@ module Icalendar
|
|
148
148
|
next
|
149
149
|
end
|
150
150
|
else # If its not a component then it should be a property
|
151
|
-
|
152
151
|
params = fields[:params]
|
153
152
|
value = fields[:value]
|
154
153
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: icalendar
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "0
|
7
|
-
date: 2007-
|
6
|
+
version: "1.0"
|
7
|
+
date: 2007-09-27 00:00:00 +02:00
|
8
8
|
summary: A ruby implementation of the iCalendar specification (RFC-2445).
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -54,24 +54,17 @@ files:
|
|
54
54
|
- lib/icalendar/parameter.rb
|
55
55
|
- lib/icalendar/component.rb
|
56
56
|
- lib/icalendar/helpers.rb
|
57
|
+
- lib/icalendar/parser.rb
|
57
58
|
- lib/icalendar/calendar.rb
|
58
59
|
- lib/icalendar/base.rb
|
59
|
-
- lib/icalendar/
|
60
|
-
- lib/icalendar/component/freebusy.rb
|
60
|
+
- lib/icalendar/component/alarm.rb
|
61
61
|
- lib/icalendar/component/event.rb
|
62
|
+
- lib/icalendar/component/freebusy.rb
|
62
63
|
- lib/icalendar/component/journal.rb
|
63
|
-
- lib/icalendar/component/todo.rb
|
64
64
|
- lib/icalendar/component/timezone.rb
|
65
|
-
- lib/icalendar/component/
|
66
|
-
- docs/rfcs
|
65
|
+
- lib/icalendar/component/todo.rb
|
67
66
|
- docs/api
|
68
|
-
- docs/rfcs
|
69
|
-
- docs/rfcs/rfc2425.pdf
|
70
|
-
- docs/rfcs/rfc2426.pdf
|
71
|
-
- docs/rfcs/rfc2445.pdf
|
72
|
-
- docs/rfcs/rfc2446.pdf
|
73
|
-
- docs/rfcs/rfc2447.pdf
|
74
|
-
- docs/rfcs/rfc3283.txt
|
67
|
+
- docs/rfcs
|
75
68
|
- docs/api/created.rid
|
76
69
|
- docs/api/rdoc-style.css
|
77
70
|
- docs/api/files
|
@@ -92,16 +85,16 @@ files:
|
|
92
85
|
- docs/api/files/lib/icalendar/parameter_rb.html
|
93
86
|
- docs/api/files/lib/icalendar/component_rb.html
|
94
87
|
- docs/api/files/lib/icalendar/helpers_rb.html
|
88
|
+
- docs/api/files/lib/icalendar/parser_rb.html
|
95
89
|
- docs/api/files/lib/icalendar/calendar_rb.html
|
96
90
|
- docs/api/files/lib/icalendar/base_rb.html
|
97
|
-
- docs/api/files/lib/icalendar/parser_rb.html
|
98
91
|
- docs/api/files/lib/icalendar/component
|
99
|
-
- docs/api/files/lib/icalendar/component/
|
92
|
+
- docs/api/files/lib/icalendar/component/alarm_rb.html
|
100
93
|
- docs/api/files/lib/icalendar/component/event_rb.html
|
94
|
+
- docs/api/files/lib/icalendar/component/freebusy_rb.html
|
101
95
|
- docs/api/files/lib/icalendar/component/journal_rb.html
|
102
|
-
- docs/api/files/lib/icalendar/component/todo_rb.html
|
103
96
|
- docs/api/files/lib/icalendar/component/timezone_rb.html
|
104
|
-
- docs/api/files/lib/icalendar/component/
|
97
|
+
- docs/api/files/lib/icalendar/component/todo_rb.html
|
105
98
|
- docs/api/classes/Time.src
|
106
99
|
- docs/api/classes/Array.src
|
107
100
|
- docs/api/classes/Float.src
|
@@ -140,8 +133,8 @@ files:
|
|
140
133
|
- docs/api/classes/Icalendar/Standard.src
|
141
134
|
- docs/api/classes/Icalendar/Journal.src
|
142
135
|
- docs/api/classes/Icalendar/Parser.src
|
143
|
-
- docs/api/classes/Icalendar/Alarm.src
|
144
136
|
- docs/api/classes/Icalendar/Todo.src
|
137
|
+
- docs/api/classes/Icalendar/Alarm.src
|
145
138
|
- docs/api/classes/Icalendar/Base.src
|
146
139
|
- docs/api/classes/Icalendar/Geo.src
|
147
140
|
- docs/api/classes/Icalendar/Timezone.src
|
@@ -158,8 +151,8 @@ files:
|
|
158
151
|
- docs/api/classes/Icalendar/UnknownPropertyMethod.html
|
159
152
|
- docs/api/classes/Icalendar/InvalidPropertyValue.html
|
160
153
|
- docs/api/classes/Icalendar/UnknownComponentClass.html
|
161
|
-
- docs/api/classes/Icalendar/Alarm.html
|
162
154
|
- docs/api/classes/Icalendar/Todo.html
|
155
|
+
- docs/api/classes/Icalendar/Alarm.html
|
163
156
|
- docs/api/classes/Icalendar/Base.html
|
164
157
|
- docs/api/classes/Icalendar/Geo.html
|
165
158
|
- docs/api/classes/Icalendar/Timezone.html
|
@@ -178,8 +171,8 @@ files:
|
|
178
171
|
- docs/api/classes/Icalendar/Parser.src/M000017.html
|
179
172
|
- docs/api/classes/Icalendar/Parser.src/M000018.html
|
180
173
|
- docs/api/classes/Icalendar/Parser.src/M000019.html
|
181
|
-
- docs/api/classes/Icalendar/
|
182
|
-
- docs/api/classes/Icalendar/
|
174
|
+
- docs/api/classes/Icalendar/Todo.src/M000020.html
|
175
|
+
- docs/api/classes/Icalendar/Alarm.src/M000021.html
|
183
176
|
- docs/api/classes/Icalendar/Base.src/M000022.html
|
184
177
|
- docs/api/classes/Icalendar/Base.src/M000023.html
|
185
178
|
- docs/api/classes/Icalendar/Geo.src/M000024.html
|
@@ -201,11 +194,11 @@ files:
|
|
201
194
|
- docs/api/classes/Icalendar/Component.src/M000048.html
|
202
195
|
- docs/api/classes/Icalendar/Component.src/M000049.html
|
203
196
|
- docs/api/classes/Icalendar/Component.src/M000050.html
|
204
|
-
- docs/api/classes/Icalendar/
|
205
|
-
- docs/api/classes/Icalendar/
|
206
|
-
- docs/api/classes/Icalendar/
|
207
|
-
- docs/api/classes/Icalendar/
|
208
|
-
- docs/api/classes/Icalendar/
|
197
|
+
- docs/api/classes/Icalendar/Component.src/M000051.html
|
198
|
+
- docs/api/classes/Icalendar/Component.src/M000052.html
|
199
|
+
- docs/api/classes/Icalendar/Daylight.src/M000053.html
|
200
|
+
- docs/api/classes/Icalendar/Event.src/M000054.html
|
201
|
+
- docs/api/classes/Icalendar/Event.src/M000055.html
|
209
202
|
- docs/api/classes/Icalendar/Calendar.src/M000056.html
|
210
203
|
- docs/api/classes/Icalendar/Calendar.src/M000057.html
|
211
204
|
- docs/api/classes/Icalendar/Calendar.src/M000058.html
|
@@ -215,14 +208,23 @@ files:
|
|
215
208
|
- docs/api/classes/Icalendar/Calendar.src/M000062.html
|
216
209
|
- docs/api/classes/Icalendar/Calendar.src/M000063.html
|
217
210
|
- docs/api/classes/Icalendar/Calendar.src/M000064.html
|
218
|
-
- docs/api/classes/Icalendar/
|
219
|
-
- docs/api/classes/Icalendar/
|
211
|
+
- docs/api/classes/Icalendar/Calendar.src/M000065.html
|
212
|
+
- docs/api/classes/Icalendar/Calendar.src/M000066.html
|
213
|
+
- docs/api/classes/Icalendar/Freebusy.src/M000067.html
|
214
|
+
- docs/api/classes/Icalendar/Parameter.src/M000068.html
|
220
215
|
- docs/api/classes/URI/Generic.src
|
221
216
|
- docs/api/classes/URI/Generic.html
|
222
|
-
- docs/api/classes/URI/Generic.src/
|
223
|
-
- docs/api/classes/HashAttrs.src/M000068.html
|
224
|
-
- docs/api/classes/HashAttrs.src/M000069.html
|
217
|
+
- docs/api/classes/URI/Generic.src/M000069.html
|
225
218
|
- docs/api/classes/HashAttrs.src/M000070.html
|
219
|
+
- docs/api/classes/HashAttrs.src/M000071.html
|
220
|
+
- docs/api/classes/HashAttrs.src/M000072.html
|
221
|
+
- docs/rfcs/itip_notes.txt
|
222
|
+
- docs/rfcs/rfc2425.pdf
|
223
|
+
- docs/rfcs/rfc2426.pdf
|
224
|
+
- docs/rfcs/rfc2445.pdf
|
225
|
+
- docs/rfcs/rfc2446.pdf
|
226
|
+
- docs/rfcs/rfc2447.pdf
|
227
|
+
- docs/rfcs/rfc3283.txt
|
226
228
|
- examples/single_event.ics
|
227
229
|
- examples/create_cal.rb
|
228
230
|
- examples/parse_cal.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>hash_reader (HashAttrs)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 4</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_reader</span>(<span class="ruby-identifier">hash_sym</span>, <span class="ruby-identifier">syms</span>)
|
15
|
-
<span class="ruby-identifier">syms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
|
16
|
-
<span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
|
17
|
-
<span class="ruby-identifier">func</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
|
18
|
-
<span class="ruby-identifier">hash</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">hash_sym</span>)
|
19
|
-
<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span>]
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
21
|
-
|
22
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:define_method</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">func</span>)
|
23
|
-
<span class="ruby-keyword kw">end</span>
|
24
|
-
<span class="ruby-keyword kw">end</span></pre>
|
25
|
-
</body>
|
26
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html>
|
7
|
-
<head>
|
8
|
-
<title>new (Icalendar::Calendar)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/icalendar/calendar.rb, line 19</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>()
|
15
|
-
<span class="ruby-keyword kw">super</span>(<span class="ruby-value str">"VCALENDAR"</span>)
|
16
|
-
|
17
|
-
<span class="ruby-comment cmt"># Set some defaults</span>
|
18
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">calscale</span> = <span class="ruby-value str">"GREGORIAN"</span> <span class="ruby-comment cmt"># Who knows, but this is the only one in the spec.</span>
|
19
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">prodid</span> = <span class="ruby-value str">"iCalendar-Ruby"</span> <span class="ruby-comment cmt"># Current product... Should be overwritten by apps that use the library</span>
|
20
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">version</span> = <span class="ruby-value str">"2.0"</span> <span class="ruby-comment cmt"># Version of the specification</span>
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
22
|
-
</body>
|
23
|
-
</html>
|