gdata4ruby 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,7 @@
1
1
  #=CHANGELOG
2
+ #==version 0.1.3
3
+ #* Added support for Geo/GeoRSS namespaces in base gdata object
4
+ #* Added support for Ruby 1.9
2
5
  #==version 0.1.2
3
6
  #* Added better support for 'default' users in AccessRule
4
7
  #==version 0.1.1
@@ -18,13 +18,13 @@
18
18
  require 'gdata4ruby/base'
19
19
 
20
20
  module GData4Ruby
21
- #The service class is the main handler for all direct interactions with the
22
- #Google Data API.
23
-
21
+ #The service class is the main handler for all direct interactions with the
22
+ #Google Data API.
23
+
24
24
  class Service < Base
25
25
  #Convenience attribute contains the currently authenticated account name
26
26
  attr_reader :account
27
-
27
+
28
28
  # The token returned by the Google servers, used to authorize all subsequent messages
29
29
  attr_reader :auth_token
30
30
 
@@ -35,15 +35,18 @@ module GData4Ruby
35
35
  self.send("#{key}=", value)
36
36
  end
37
37
  end
38
-
38
+
39
39
  # The authenticate method passes the username and password to google servers.
40
40
  # If authentication succeeds, returns true, otherwise raises the AuthenticationFailed error.
41
+ # Thanks to David King and Scott Taylor for Ruby 1.9 fix.
41
42
  def authenticate(username, password, service)
42
43
  @auth_token = nil
43
44
  ret = nil
44
45
  ret = send_request(Request.new(:post, AUTH_URL, "Email=#{username}&Passwd=#{password}&source=GCal4Ruby&service=#{service}&accountType=HOSTED_OR_GOOGLE"))
45
46
  if ret.class == Net::HTTPOK
46
- @auth_token = ret.read_body.to_a[2].gsub("Auth=", "").strip
47
+ body = ret.read_body
48
+ lines = body.send(body.respond_to?(:lines) ? :lines : :to_s).to_a
49
+ @auth_token = lines.to_a[2].gsub("Auth=", "").strip
47
50
  @account = username
48
51
  @password = password
49
52
  return true
@@ -27,6 +27,8 @@ module GData4Ruby
27
27
  entry.attributes["xmlns:app"] = "http://www.w3.org/2007/app"
28
28
  entry.attributes["xmlns:docs"] = "http://schemas.google.com/docs/2007"
29
29
  entry.attributes["xmlns"] = "http://www.w3.org/2005/Atom"
30
+ entry.attributes["xmlns:georss"] = ""
31
+ entry.attributes["xmlns:gml"] = ""
30
32
  entry
31
33
  end
32
34
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mike Reich
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-13 00:00:00 +10:00
17
+ date: 2010-08-11 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies: []
20
20