Mike -- thanks for contributing this great Gem to the community.
I noticed, like Scott mentioned in an earlier post (http://
groups.google.com/group/gcal4ruby/msg/78240409464f3bad), a problem in
the GData4Module::Service class when using Ruby 1.9.
Here's a simple fix, based on Jame's Gray's post (http://
blog.grayproductions.net/articles/getting_code_ready_for_ruby_19), so
it will support Ruby 1.8 & Ruby 1.9.
--- a/gdata4ruby-0.1.2/lib/gdata4ruby/service.rb
+++ b/gdata4ruby/lib/gdata4ruby/service.rb
@@ -43,7 +43,9 @@ module GData4Ruby
ret = nil
ret = send_request(Request.new(:post, AUTH_URL,
"Email=#{username}&Passwd
if ret.class == Net::HTTPOK
- @auth_token = ret.read_body.lines.to_a[2].gsub("Auth=",
"").strip
+ body = ret.read_body
+ lines = body.send(body.respond_to?
(:lines) ? :lines : :to_s).to_a
+ @auth_token = lines.to_a[2].gsub("Auth=", "").strip
@account = username
@password = password
return true
Thanks again.
Dave