googlecalendar 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +4 -0
  2. data/lib/builders.rb +1 -0
  3. data/lib/googlecalendar.rb +17 -1
  4. metadata +27 -19
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  = Versions
2
2
 
3
+ === 0.0.3 (May 5th, 2007)
4
+ * Handle recurring events
5
+ ** Added a rrule property and a rrule_as_hash method
6
+
3
7
  === 0.0.2 (June 16th, 2006)
4
8
  * Refactor googlecalendar to a single rb file
5
9
  * Add Rakefile
@@ -77,6 +77,7 @@ class HtmlBuilder
77
77
  details << div(event, 'created')
78
78
  details << div(event, 'last_modified')
79
79
  details << div(event, 'status')
80
+ details << div(event, 'rrule')
80
81
  details << div(event, 'class_name')
81
82
  details << "</div>"
82
83
  end
@@ -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.8.10
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.2
7
- date: 2006-06-20
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
- - lib
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
- - !ruby/object:Gem::Version
26
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
27
24
  version:
28
25
  platform: ruby
29
- authors: []
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Benjamin Francisoud
30
31
  files:
31
- - README
32
- - CHANGELOG
33
- - lib/builders.rb
34
- - lib/googlecalendar.rb
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
- dependencies: []
47
+
48
+ dependencies: []
49
+