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 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:<br/>
78
- <b>Mislav Marohnić</b> (mislav.marohnic@gmail.com) (initial codebase)<br/>
79
- <b>Pieter Noordhuis</b> (pcnoordhuis@gmail.com) (further development)<br/>
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "contacts"
3
- s.version = "0.3.0"
3
+ s.version = "0.3.1"
4
4
  s.date = "2008-08-02"
5
5
  s.summary = "Interfacing with the Google Contacts API"
6
6
  s.email = "pcnoordhuis@gmail.com"
data/lib/contacts.rb CHANGED
@@ -8,3 +8,5 @@ module Contacts
8
8
  end
9
9
  end
10
10
  end
11
+
12
+ require 'contacts/google'
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pietern-contacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Mislav Marohni\xC4\x87"