intouch-gcal4ruby 0.5.7.3 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -242,6 +242,8 @@ module GCal4Ruby
242
242
  case ele.name
243
243
  when "id"
244
244
  @id = ele.text.gsub("http://www.google.com/calendar/feeds/default/calendars/", "")
245
+ @id = @id.gsub("http://www.google.com/calendar/feeds/default/owncalendars/full/", "")
246
+ @id = @id.gsub("http://www.google.com/calendar/feeds/default/allcalendars/full/", "")
245
247
  when "updated"
246
248
  @updated_at = Time.xmlschema ele.text
247
249
  when 'summary'
@@ -358,8 +360,8 @@ module GCal4Ruby
358
360
 
359
361
  private
360
362
  def self.get_instance(service, d)
361
- if d.status == 200
362
- xml = REXML::Document.new(d).root
363
+ if d.is_a? Net::HTTPOK
364
+ xml = REXML::Document.new(d.read_body).root
363
365
  if xml.name == 'feed'
364
366
  xml = xml.elements.each("entry"){}[0]
365
367
  end
@@ -395,14 +395,14 @@ module GCal4Ruby
395
395
  if args[:calendar]
396
396
  feed_uri = args[:calendar].is_a?(Calendar) ? args[:calendar].content_uri : self.event_feed_uri(args[:calendar])
397
397
  args.delete(:calendar)
398
- ret = service.send_request(GData4Ruby::Request.new(:get, feed_uri, '', '', args))
398
+ ret = service.send_request(GData4Ruby::Request.new(:get, feed_uri, '', {}, args))
399
399
  xml = REXML::Document.new(ret).root
400
400
  xml.elements.each("entry") do |e|
401
401
  results << get_instance(service, e)
402
402
  end
403
403
  else
404
404
  service.calendars.each do |cal|
405
- ret = service.send_request(GData4Ruby::Request.new(:get, cal.content_uri, '', ';, args))
405
+ ret = service.send_request(GData4Ruby::Request.new(:get, cal.content_uri, '', {}, args))
406
406
  xml = REXML::Document.new(ret).root
407
407
  xml.elements.each("entry") do |e|
408
408
  results << get_instance(service, e)
@@ -438,8 +438,8 @@ module GCal4Ruby
438
438
  end
439
439
 
440
440
  def self.get_instance(service, d)
441
- if d.status == 200
442
- xml = REXML::Document.new(d).root
441
+ if d.is_a? Net::HTTPOK
442
+ xml = REXML::Document.new(d.read_body).root
443
443
  if xml.name == 'feed'
444
444
  xml = xml.elements.each("entry"){}[0]
445
445
  end
@@ -452,5 +452,4 @@ module GCal4Ruby
452
452
  e
453
453
  end
454
454
  end
455
- end
456
-
455
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: intouch-gcal4ruby
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.7.3
5
+ version: 0.5.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mike Reich
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-29 00:00:00 Z
13
+ date: 2011-04-30 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: intouch-gdata4ruby
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 0.1.5.3
23
+ version: 0.1.6
24
24
  type: :runtime
25
25
  version_requirements: *id001
26
26
  description: "GCal4Ruby is a Ruby Gem that can be used to interact with the current version of the Google Calendar API. GCal4Ruby provides the following features: Create and edit calendar events, Add and invite users to events, Set reminders, Make recurring events."