pietern-contacts 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +3 -3
- data/contacts.gemspec +1 -1
- data/lib/contacts.rb +2 -0
- data/lib/contacts/google.rb +7 -2
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -74,6 +74,6 @@ for a contact, it needs to be reloaded.
|
|
74
74
|
|
75
75
|
More can be read in the rdoc of this lib, although they are not complete
|
76
76
|
|
77
|
-
Authors
|
78
|
-
<b>Mislav Marohnić</b> (mislav.marohnic@gmail.com) (initial codebase)
|
79
|
-
<b>Pieter Noordhuis</b> (pcnoordhuis@gmail.com) (further development)
|
77
|
+
Authors:
|
78
|
+
* <b>Mislav Marohnić</b> (mislav.marohnic@gmail.com) (initial codebase)
|
79
|
+
* <b>Pieter Noordhuis</b> (pcnoordhuis@gmail.com) (further development)
|
data/contacts.gemspec
CHANGED
data/lib/contacts.rb
CHANGED
data/lib/contacts/google.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'contacts'
|
2
1
|
require 'cgi'
|
3
2
|
require 'net/http'
|
4
3
|
require 'net/https'
|
@@ -308,6 +307,12 @@ module Contacts
|
|
308
307
|
@xml.at('title').inner_html = str
|
309
308
|
end
|
310
309
|
|
310
|
+
def updated_at
|
311
|
+
t = @xml.at('updated')
|
312
|
+
return nil if t.nil?
|
313
|
+
Time.parse(t.inner_html)
|
314
|
+
end
|
315
|
+
|
311
316
|
def [](attr)
|
312
317
|
el = get_extended_property(attr)
|
313
318
|
return nil if el.nil?
|
@@ -324,7 +329,7 @@ module Contacts
|
|
324
329
|
|
325
330
|
# Create element if it not already exists
|
326
331
|
if el.nil?
|
327
|
-
@xml.root.children.push *Hpricot.make("<gd:extendedProperty name='#{attr}' />")
|
332
|
+
@xml.root.children.push *Hpricot.make("<gd:extendedProperty name='#{attr}' />", :xml => true)
|
328
333
|
el = get_extended_property(attr)
|
329
334
|
end
|
330
335
|
|