icalendar 0.96 → 0.96.1

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.
Files changed (77) hide show
  1. data/README +3 -3
  2. data/Rakefile +3 -4
  3. data/docs/api/classes/Array.html +148 -0
  4. data/docs/api/classes/Date.html +159 -0
  5. data/docs/api/classes/DateTime.html +180 -0
  6. data/docs/api/classes/Fixnum.html +148 -0
  7. data/docs/api/classes/Float.html +148 -0
  8. data/docs/api/classes/HashAttrs.html +199 -0
  9. data/docs/api/classes/Icalendar/Alarm.html +228 -0
  10. data/docs/api/classes/Icalendar/Base.html +120 -0
  11. data/docs/api/classes/Icalendar/Calendar.html +365 -0
  12. data/docs/api/classes/Icalendar/Component.html +689 -0
  13. data/docs/api/classes/Icalendar/DateProp.html +187 -0
  14. data/docs/api/classes/Icalendar/DateProp/ClassMethods.html +195 -0
  15. data/docs/api/classes/Icalendar/Daylight.html +156 -0
  16. data/docs/api/classes/Icalendar/Event.html +650 -0
  17. data/docs/api/classes/Icalendar/Freebusy.html +297 -0
  18. data/docs/api/classes/Icalendar/InvalidPropertyValue.html +117 -0
  19. data/docs/api/classes/Icalendar/Journal.html +459 -0
  20. data/docs/api/classes/Icalendar/Parameter.html +166 -0
  21. data/docs/api/classes/Icalendar/Parser.html +447 -0
  22. data/docs/api/classes/Icalendar/Standard.html +156 -0
  23. data/docs/api/classes/Icalendar/Timezone.html +351 -0
  24. data/docs/api/classes/Icalendar/Todo.html +496 -0
  25. data/docs/api/classes/Icalendar/UnknownComponentClass.html +117 -0
  26. data/docs/api/classes/Icalendar/UnknownPropertyMethod.html +117 -0
  27. data/docs/api/classes/Object.html +270 -0
  28. data/docs/api/classes/String.html +148 -0
  29. data/docs/api/classes/Time.html +163 -0
  30. data/docs/api/classes/URI.html +111 -0
  31. data/docs/api/classes/URI/Generic.html +148 -0
  32. data/docs/api/created.rid +1 -0
  33. data/docs/api/files/COPYING.html +163 -0
  34. data/docs/api/files/GPL.html +531 -0
  35. data/docs/api/files/README.html +254 -0
  36. data/docs/api/files/lib/hash_attrs_rb.html +107 -0
  37. data/docs/api/files/lib/icalendar/base_rb.html +108 -0
  38. data/docs/api/files/lib/icalendar/calendar_rb.html +101 -0
  39. data/docs/api/files/lib/icalendar/component/alarm_rb.html +101 -0
  40. data/docs/api/files/lib/icalendar/component/event_rb.html +101 -0
  41. data/docs/api/files/lib/icalendar/component/freebusy_rb.html +101 -0
  42. data/docs/api/files/lib/icalendar/component/journal_rb.html +101 -0
  43. data/docs/api/files/lib/icalendar/component/timezone_rb.html +101 -0
  44. data/docs/api/files/lib/icalendar/component/todo_rb.html +101 -0
  45. data/docs/api/files/lib/icalendar/component_rb.html +101 -0
  46. data/docs/api/files/lib/icalendar/conversions_rb.html +109 -0
  47. data/docs/api/files/lib/icalendar/helpers_rb.html +101 -0
  48. data/docs/api/files/lib/icalendar/parameter_rb.html +101 -0
  49. data/docs/api/files/lib/icalendar/parser_rb.html +109 -0
  50. data/docs/api/files/lib/icalendar_rb.html +120 -0
  51. data/docs/api/files/lib/meta_rb.html +107 -0
  52. data/docs/api/fr_class_index.html +55 -0
  53. data/docs/api/fr_file_index.html +45 -0
  54. data/docs/api/fr_method_index.html +79 -0
  55. data/docs/api/index.html +24 -0
  56. data/docs/api/rdoc-style.css +208 -0
  57. data/{docs/examples → examples}/create_cal.rb +6 -2
  58. data/{docs/examples → examples}/parse_cal.rb +3 -2
  59. data/{docs/examples → examples}/single_event.ics +0 -0
  60. data/lib/hash_attrs.rb +29 -0
  61. data/lib/icalendar.rb +11 -2
  62. data/lib/icalendar/base.rb +6 -2
  63. data/lib/icalendar/calendar.rb +1 -1
  64. data/lib/icalendar/component.rb +98 -71
  65. data/lib/icalendar/component/alarm.rb +5 -3
  66. data/lib/icalendar/component/event.rb +1 -1
  67. data/lib/icalendar/component/freebusy.rb +23 -23
  68. data/lib/icalendar/component/journal.rb +1 -5
  69. data/lib/icalendar/component/timezone.rb +7 -0
  70. data/lib/icalendar/component/todo.rb +1 -6
  71. data/lib/icalendar/conversions.rb +10 -0
  72. data/lib/icalendar/parser.rb +82 -85
  73. data/lib/meta.rb +32 -0
  74. data/test/component_test.rb +69 -64
  75. metadata +74 -12
  76. data/lib/icalendar/foo.rb +0 -394
  77. data/test/property_helpers.rb +0 -35
@@ -0,0 +1,254 @@
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: README</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>README</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sun Oct 30 18:19:01 CET 2005</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <h1>iCalendar &#8212; Internet calendaring, Ruby style</h1>
73
+ <p>
74
+ This is a Ruby library for dealing with iCalendar files. Rather than
75
+ explaining myself, here is the introduction from RFC-2445, which defines
76
+ the format:
77
+ </p>
78
+ <p>
79
+ The use of calendaring and scheduling has grown considerably in the last
80
+ decade. Enterprise and inter-enterprise business has become dependent on
81
+ rapid scheduling of events and actions using this information technology.
82
+ However, the longer term growth of calendaring and scheduling, is currently
83
+ limited by the lack of Internet standards for the message content types
84
+ that are central to these knowledgeware applications. This memo is intended
85
+ to progress the level of interoperability possible between dissimilar
86
+ calendaring and scheduling applications. This memo defines a MIME content
87
+ type for exchanging electronic calendaring and scheduling information. The
88
+ Internet Calendaring and Scheduling Core <a
89
+ href="../classes/Object.html">Object</a> Specification, or iCalendar,
90
+ allows for the capture and exchange of information normally stored within a
91
+ calendaring and scheduling application; such as a Personal Information
92
+ Manager (PIM) or a Group Scheduling product.
93
+ </p>
94
+ <p>
95
+ The iCalendar format is suitable as an exchange format between applications
96
+ or systems. The format is defined in terms of a MIME content type. This
97
+ will enable the object to be exchanged using several transports, including
98
+ but not limited to SMTP, HTTP, a file system, desktop interactive protocols
99
+ such as the use of a memory- based clipboard or drag/drop interactions,
100
+ point-to-point asynchronous communication, wired-network transport, or some
101
+ form of unwired transport such as infrared might also be used.
102
+ </p>
103
+ <p>
104
+ Now for some examples:
105
+ </p>
106
+ <ul>
107
+ <li>Creating iCalendars.
108
+
109
+ <pre>
110
+ # Create a calendar with a single event (Method 1)
111
+ cal = Icalendar::Calendar.new
112
+ event = Icalendar::Event.new
113
+
114
+ # Set some properties for this event
115
+ event.user_id = &quot;joe-bob@somewhere.net&quot;
116
+ event.timestamp = DateTime.now
117
+ event.start = Date.new(2005, 04, 29)
118
+ event.end = Date.new(2005, 04, 28)
119
+ event.summary = &quot;Meeting with the man.&quot;
120
+ event.klass = &quot;PRIVATE&quot;
121
+
122
+ # Now add it to the calendar
123
+ cal.add event
124
+
125
+ # Create a calendar with a single event (Method 2)
126
+ cal2 = Icalendar::Calendar.new
127
+ event = cal.event # This automatically adds the event to the calendar
128
+ event.user_id = &quot;joe-bob@somewhere.net&quot;
129
+ event.timestamp = DateTime.now
130
+
131
+ # Create a calendar with a single event (Method 3)
132
+ cal3 = Icalendar::Calendar.new
133
+ cal3.event do
134
+ user_id &quot;joe-bob@somewhere.net&quot;
135
+ timestamp DateTime.now
136
+ end
137
+
138
+ # We can output the calendars as strings to write to a file,
139
+ # network port, database etc.
140
+ cal_string = cal.to_ical
141
+ puts cal_string
142
+ </pre>
143
+ </li>
144
+ </ul>
145
+ <h2>Parsing iCalendars:</h2>
146
+ <pre>
147
+ require 'icalendar'
148
+ require 'date'
149
+
150
+ # Open a file or string to parse
151
+ cal_file = File.open(&quot;single_event.ics&quot;)
152
+
153
+ # Parser returns an array of calendars because a single file
154
+ # can have multiple calendar objects.
155
+ cals = Icalendar::Parser.new(cal_file).parse
156
+ cal = cals.first
157
+
158
+ # Now you can access the cal object in just the same way I created it
159
+ event = cal.events.first
160
+
161
+ puts &quot;user_id: &quot; + event.user_id
162
+ puts &quot;summary: &quot; + event.summary
163
+ </pre>
164
+ <h2>Including the iCalendar library when using RubyGem:</h2>
165
+ <pre>
166
+ begin
167
+ require 'rubygems'
168
+ require_gem 'icalendar', &quot;&gt;= 0.96&quot;
169
+ rescue LoadError
170
+ require 'icalendar'
171
+ end
172
+ </pre>
173
+ <h2>Download</h2>
174
+ <p>
175
+ The latest release version of this library can be found at
176
+ </p>
177
+ <ul>
178
+ <li><a
179
+ href="http://rubyforge.org/projects/icalendar">rubyforge.org/projects/icalendar</a>/
180
+
181
+ </li>
182
+ </ul>
183
+ <p>
184
+ If you would like to help with development or use the most current version
185
+ you can check out the tree from the subversion repository:
186
+ </p>
187
+ <ul>
188
+ <li>svn co <a
189
+ href="https://rosejn.net/svn/icalendar">rosejn.net/svn/icalendar</a>
190
+ icalendar
191
+
192
+ </li>
193
+ </ul>
194
+ <p>
195
+ Documentation can be found at
196
+ </p>
197
+ <ul>
198
+ <li><a href="http://icalendar.rubyforge.org">icalendar.rubyforge.org</a>/
199
+
200
+ </li>
201
+ </ul>
202
+ <h2>Installation</h2>
203
+ <p>
204
+ This library uses rubygems for distribution and installation:
205
+ </p>
206
+ <p>
207
+ $ gem install icalendar
208
+ </p>
209
+ <h2>License</h2>
210
+ <p>
211
+ This library is released under the same license as Ruby itself.
212
+ </p>
213
+ <h2>Support &amp; Contributions</h2>
214
+ <p>
215
+ The iCalendar library homepage is <a
216
+ href="http://icalendar.rubyforge.org">icalendar.rubyforge.org</a>/
217
+ </p>
218
+ <p>
219
+ There is an icalendar-devel@rubyforge.org mailing list that can be used for
220
+ asking questions, making comments or submitting patches.
221
+ </p>
222
+
223
+ </div>
224
+
225
+
226
+ </div>
227
+
228
+
229
+ </div>
230
+
231
+
232
+ <!-- if includes -->
233
+
234
+ <div id="section">
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ <!-- if method_list -->
244
+
245
+
246
+ </div>
247
+
248
+
249
+ <div id="validator-badges">
250
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
251
+ </div>
252
+
253
+ </body>
254
+ </html>
@@ -0,0 +1,107 @@
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: hash_attrs.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>hash_attrs.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/hash_attrs.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Thu Oct 20 00:15:23 CEST 2005</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <p>
73
+ A module which adds some generators for hash based accessors.
74
+ </p>
75
+
76
+ </div>
77
+
78
+
79
+ </div>
80
+
81
+
82
+ </div>
83
+
84
+
85
+ <!-- if includes -->
86
+
87
+ <div id="section">
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+ <!-- if method_list -->
97
+
98
+
99
+ </div>
100
+
101
+
102
+ <div id="validator-badges">
103
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
104
+ </div>
105
+
106
+ </body>
107
+ </html>
@@ -0,0 +1,108 @@
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: base.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>base.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/icalendar/base.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Mon Oct 31 00:06:23 CET 2005</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+ <div id="requires-list">
73
+ <h3 class="section-bar">Required files</h3>
74
+
75
+ <div class="name-list">
76
+ logger&nbsp;&nbsp;
77
+ </div>
78
+ </div>
79
+
80
+ </div>
81
+
82
+
83
+ </div>
84
+
85
+
86
+ <!-- if includes -->
87
+
88
+ <div id="section">
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <!-- if method_list -->
98
+
99
+
100
+ </div>
101
+
102
+
103
+ <div id="validator-badges">
104
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
105
+ </div>
106
+
107
+ </body>
108
+ </html>