agcaldav 0.2.3.beta → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/agcaldav/format.rb +1 -7
- data/lib/agcaldav/todo.rb +63 -0
- data/lib/agcaldav/version.rb +1 -1
- metadata +5 -4
data/lib/agcaldav/format.rb
CHANGED
@@ -13,15 +13,9 @@ module AgCalDAV
|
|
13
13
|
def parse_calendar(s)
|
14
14
|
result = ""
|
15
15
|
xml = REXML::Document.new(s)
|
16
|
-
|
17
|
-
p s
|
18
|
-
puts "-"*10
|
16
|
+
|
19
17
|
REXML::XPath.each( xml, '//c:calendar-data/', {"c"=>"urn:ietf:params:xml:ns:caldav"} ){|c| result << c.text}
|
20
18
|
r = Icalendar.parse(result)
|
21
|
-
|
22
|
-
puts "."*10
|
23
|
-
p r
|
24
|
-
puts "."*10
|
25
19
|
r
|
26
20
|
end
|
27
21
|
|
@@ -0,0 +1,63 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (C) 2005 Jeff Rose
|
3
|
+
|
4
|
+
This library is free software; you can redistribute it and/or modify it
|
5
|
+
under the same terms as the ruby language itself, see the file COPYING for
|
6
|
+
details.
|
7
|
+
=end
|
8
|
+
module Icalendar
|
9
|
+
# A Todo calendar component is a grouping of component
|
10
|
+
# properties and possibly Alarm calendar components that represent
|
11
|
+
# an action-item or assignment. For example, it can be used to
|
12
|
+
# represent an item of work assigned to an individual; such as "turn in
|
13
|
+
# travel expense today".
|
14
|
+
class Todo < Component
|
15
|
+
ical_component :alarms
|
16
|
+
|
17
|
+
# Single properties
|
18
|
+
ical_property :ip_class
|
19
|
+
ical_property :completed
|
20
|
+
ical_property :created
|
21
|
+
ical_property :description
|
22
|
+
ical_property :dtstamp, :timestamp
|
23
|
+
ical_property :dtstart, :start
|
24
|
+
ical_property :geo
|
25
|
+
ical_property :last_modified
|
26
|
+
ical_property :location
|
27
|
+
ical_property :organizer
|
28
|
+
ical_property :percent_complete, :percent
|
29
|
+
ical_property :priority
|
30
|
+
ical_property :recurid, :recurrence_id
|
31
|
+
ical_property :sequence, :seq
|
32
|
+
ical_property :status
|
33
|
+
ical_property :summary
|
34
|
+
ical_property :uid, :user_id
|
35
|
+
ical_property :url
|
36
|
+
|
37
|
+
# Single but mutually exclusive TODO: not testing anything yet
|
38
|
+
ical_property :due
|
39
|
+
ical_property :duration
|
40
|
+
|
41
|
+
# Multi-properties
|
42
|
+
ical_multi_property :attach, :attachment, :attachments
|
43
|
+
ical_multiline_property :attendee, :attendee, :attendees
|
44
|
+
ical_multi_property :categories, :category, :categories
|
45
|
+
ical_multi_property :comment, :comment, :comments
|
46
|
+
ical_multi_property :contact, :contact, :contacts
|
47
|
+
ical_multi_property :exdate, :exception_date, :exception_dates
|
48
|
+
ical_multi_property :exrule, :exception_rule, :exception_rules
|
49
|
+
ical_multi_property :rstatus, :request_status, :request_statuses
|
50
|
+
ical_multi_property :related_to, :related_to, :related_tos
|
51
|
+
ical_multi_property :resources, :resource, :resources
|
52
|
+
ical_multi_property :rdate, :recurrence_date, :recurrence_dates
|
53
|
+
ical_multi_property :rrule, :recurrence_rule, :recurrence_rules
|
54
|
+
|
55
|
+
def initialize()
|
56
|
+
super("VTODO")
|
57
|
+
|
58
|
+
sequence 0
|
59
|
+
timestamp DateTime.now
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
data/lib/agcaldav/version.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: agcaldav
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.3
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.3
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alex Ebeling-Hoppe
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- lib/agcaldav/net.rb
|
93
93
|
- lib/agcaldav/query.rb
|
94
94
|
- lib/agcaldav/request.rb
|
95
|
+
- lib/agcaldav/todo.rb
|
95
96
|
- lib/agcaldav/version.rb
|
96
97
|
homepage: https://github.com/agilastic/agcaldav
|
97
98
|
licenses:
|
@@ -109,9 +110,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
111
|
none: false
|
111
112
|
requirements:
|
112
|
-
- - ! '
|
113
|
+
- - ! '>='
|
113
114
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
115
|
+
version: '0'
|
115
116
|
requirements: []
|
116
117
|
rubyforge_project:
|
117
118
|
rubygems_version: 1.8.24
|