googlecalendar 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/builders.rb +1 -0
- data/lib/googlecalendar.rb +17 -1
- metadata +27 -19
data/CHANGELOG
CHANGED
data/lib/builders.rb
CHANGED
data/lib/googlecalendar.rb
CHANGED
@@ -24,7 +24,7 @@ class Calendar
|
|
24
24
|
end
|
25
25
|
|
26
26
|
class Event
|
27
|
-
attr_accessor :start_date, :end_date, :time_stamp, :class_name, :created, :last_modified, :status, :summary
|
27
|
+
attr_accessor :start_date, :end_date, :time_stamp, :class_name, :created, :last_modified, :status, :summary, :rrule
|
28
28
|
|
29
29
|
def to_s
|
30
30
|
data = "---------- event ----------\n"
|
@@ -35,9 +35,21 @@ class Event
|
|
35
35
|
data << 'created: ' + @created.to_s + "\n"
|
36
36
|
data << 'last_modified: ' + @last_modified.to_s + "\n"
|
37
37
|
data << 'status: ' + @status.to_s + "\n"
|
38
|
+
data << 'rrule: ' + @rrule.to_s + "\n"
|
38
39
|
data << 'summary: ' + @summary.to_s + "\n"
|
39
40
|
return data
|
40
41
|
end
|
42
|
+
|
43
|
+
# 'FREQ=WEEKLY;BYDAY=MO;WKST=MO'
|
44
|
+
def rrule_as_hash
|
45
|
+
array = @rrule.split(';')
|
46
|
+
hash = Hash.new
|
47
|
+
array.each do |item|
|
48
|
+
pair = item.split('=')
|
49
|
+
hash[pair[0]] = pair[1]
|
50
|
+
end
|
51
|
+
return hash
|
52
|
+
end
|
41
53
|
end
|
42
54
|
|
43
55
|
class ICALParser
|
@@ -140,6 +152,10 @@ class ICALParser
|
|
140
152
|
def handle_vevent_summary(value)
|
141
153
|
@calendar.events.last.summary = value
|
142
154
|
end
|
155
|
+
|
156
|
+
def handle_vevent_rrule(value)
|
157
|
+
@calendar.events.last.rrule = value
|
158
|
+
end
|
143
159
|
end
|
144
160
|
|
145
161
|
def parse(data)
|
metadata
CHANGED
@@ -1,41 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: googlecalendar
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date:
|
6
|
+
version: 0.0.3
|
7
|
+
date: 2007-05-03 00:00:00 +02:00
|
8
8
|
summary: Google Calendar api for Ruby
|
9
9
|
require_paths:
|
10
|
-
|
11
|
-
email:
|
12
|
-
homepage:
|
10
|
+
- lib
|
11
|
+
email: cogito@rubyforge.org
|
12
|
+
homepage: http://benjamin.francisoud.googlepages.com/googlecalendar
|
13
13
|
rubyforge_project: googlecalendar
|
14
|
-
description: "The Google Calendar project provides: Export features (text file, simple html
|
15
|
-
page or excel files), Ruby api's to connect to google calendars, A plugin for
|
16
|
-
Ruby On Rails."
|
14
|
+
description: "The Google Calendar project provides: Export features (text file, simple html page or excel files), Ruby api's to connect to google calendars, A plugin for Ruby On Rails."
|
17
15
|
autorequire: googlecalendar
|
18
16
|
default_executable:
|
19
17
|
bindir: bin
|
20
18
|
has_rdoc: true
|
21
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
22
20
|
requirements:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
27
24
|
version:
|
28
25
|
platform: ruby
|
29
|
-
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
29
|
+
authors:
|
30
|
+
- Benjamin Francisoud
|
30
31
|
files:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
- README
|
33
|
+
- CHANGELOG
|
34
|
+
- lib/builders.rb
|
35
|
+
- lib/googlecalendar.rb
|
35
36
|
test_files: []
|
37
|
+
|
36
38
|
rdoc_options: []
|
39
|
+
|
37
40
|
extra_rdoc_files: []
|
41
|
+
|
38
42
|
executables: []
|
43
|
+
|
39
44
|
extensions: []
|
45
|
+
|
40
46
|
requirements: []
|
41
|
-
|
47
|
+
|
48
|
+
dependencies: []
|
49
|
+
|