gcal4ruby 0.2.10 → 0.2.11

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,8 @@
1
1
  #=CHANGELOG
2
- #=*version 0.2.10
2
+ #==version 0.2.11
3
+ #* Added support for GML elements in calendar events. Fix provided by nat.lownes.
4
+ #* Fixed event status bug where cancelled events were marked confirmed. Fix provided by rifraf.
5
+ #==version 0.2.10
3
6
  #* Fixed library support for Google Hosted Apps accounts running in forced SSL mode.
4
7
  #==version 0.2.9
5
8
  #* Fixed small SSL redirect bug due to variable misnaming in base.rb. Fix provided by JohnMetta
@@ -78,6 +78,8 @@ class Calendar
78
78
  entry.attributes["xmlns:gd"] = "http://schemas.google.com/g/2005"
79
79
  entry.attributes["xmlns:app"] = "http://www.w3.org/2007/app"
80
80
  entry.attributes["xmlns"] = "http://www.w3.org/2005/Atom"
81
+ entry.attributes["xmlns:georss"] = "http://www.georss.org/georss"
82
+ entry.attributes["xmlns:gml"] = "http://www.opengis.net/gml"
81
83
  e = Event.new(self)
82
84
  if e.load(entry.to_s)
83
85
  events << e
@@ -329,7 +329,7 @@ module GCal4Ruby
329
329
  @status = :confirmed
330
330
  when "http://schemas.google.com/g/2005#event.tentative"
331
331
  @status = :tentative
332
- when "http://schemas.google.com/g/2005#event.confirmed"
332
+ when "http://schemas.google.com/g/2005#event.cancelled"
333
333
  @status = :cancelled
334
334
  end
335
335
  when "transparency"
@@ -387,10 +387,7 @@ module GCal4Ruby
387
387
  entry.elements.each("id") {|v| id = v.text}
388
388
  puts "id = #{id}" if calendar.service.debug
389
389
  if id == query
390
- entry.attributes["xmlns:gCal"] = "http://schemas.google.com/gCal/2005"
391
- entry.attributes["xmlns:gd"] = "http://schemas.google.com/g/2005"
392
- entry.attributes["xmlns:app"] = "http://www.w3.org/2007/app" #Per http://twitter.com/mgornick
393
- entry.attributes["xmlns"] = "http://www.w3.org/2005/Atom"
390
+ Event.define_xml_namespaces(entry)
394
391
  event = Event.new(calendar)
395
392
  event.load("<?xml version='1.0' encoding='UTF-8'?>#{entry.to_s}")
396
393
  return event
@@ -428,10 +425,7 @@ module GCal4Ruby
428
425
  events = calendar.service.send_get("http://www.google.com/calendar/feeds/#{calendar.id}/private/full?"+query_string)
429
426
  ret = []
430
427
  REXML::Document.new(events.read_body).root.elements.each("entry"){}.map do |entry|
431
- entry.attributes["xmlns:gCal"] = "http://schemas.google.com/gCal/2005"
432
- entry.attributes["xmlns:gd"] = "http://schemas.google.com/g/2005"
433
- entry.attributes["xmlns:app"] = "http://www.w3.org/2007/app"
434
- entry.attributes["xmlns"] = "http://www.w3.org/2005/Atom"
428
+ Event.define_xml_namespaces(entry)
435
429
  event = Event.new(calendar)
436
430
  event.load("<?xml version='1.0' encoding='UTF-8'?>#{entry.to_s}")
437
431
  ret << event
@@ -458,6 +452,15 @@ module GCal4Ruby
458
452
  @deleted = false
459
453
  @edit_feed = ''
460
454
 
455
+ def self.define_xml_namespaces(entry)
456
+ entry.attributes["xmlns:gCal"] = "http://schemas.google.com/gCal/2005"
457
+ entry.attributes["xmlns:gd"] = "http://schemas.google.com/g/2005"
458
+ entry.attributes["xmlns:app"] = "http://www.w3.org/2007/app"
459
+ entry.attributes["xmlns"] = "http://www.w3.org/2005/Atom"
460
+ entry.attributes["xmlns:georss"] = "http://www.georss.org/georss"
461
+ entry.attributes["xmlns:gml"] = "http://www.opengis.net/gml"
462
+ end
463
+
461
464
  def set_reminder(ele)
462
465
  ele.delete_element("gd:reminder")
463
466
  if @reminder
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gcal4ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Reich
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-11 00:00:00 +11:00
12
+ date: 2010-01-23 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies: []
15
15