liangzan-contacts 1.2.19 → 1.2.20

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.
Files changed (3) hide show
  1. data/README.rdoc +3 -3
  2. data/lib/contacts/hotmail.rb +4 -5
  3. metadata +4 -4
data/README.rdoc CHANGED
@@ -1,10 +1,10 @@
1
1
  = liangzan-contacts
2
2
 
3
- liangzan-contacts is a fork of the contacts_19 gem. It aims to be compatible with 1.9 and above.
3
+ liangzan-contacts is a fork of the contacts_19 gem. It aims to be compatible with 1.9 and above. It also provide interfaces to many European email providers.
4
4
 
5
5
  == Intro
6
6
 
7
- Contacts is a universal interface to grab contact list information from various providers including Hotmail, AOL, Gmail, Plaxo and Yahoo.
7
+ Contacts is a universal interface to grab contact list information from various providers including Hotmail, AOL, Gmail, Plaxo, Yahoo, GMX.net, Web.de, inbox.it, sezname.cz.
8
8
 
9
9
  == Installation
10
10
 
@@ -63,6 +63,6 @@ See the examples/ directory.
63
63
  * Rusty Burchfield
64
64
  * justintv
65
65
  * Wong Liang Zan (mailto:zan@liangzan.net) - http://liangzan.net
66
+ * Laurynas Butkus
66
67
 
67
68
  This library is released under the terms of the BSD.
68
-
@@ -61,11 +61,10 @@ class Contacts
61
61
  def contacts(options = {})
62
62
  if @contacts.nil? && connected?
63
63
  url = URI.parse(contact_list_url)
64
- data, resp, cookies, forward = get(get_contact_list_url, @cookies )
65
-
64
+ contact_list_url = get_contact_list_url(get_contact_list_url)
65
+ data, resp, cookies, forward = get(contact_list_url, @cookies )
66
66
 
67
67
  data.force_encoding('ISO-8859-1')
68
-
69
68
  @contacts = CSV.parse(data, {:headers => true, :col_sep => data[7]}).map do |row|
70
69
  name = ""
71
70
  name = row["First Name"] if !row["First Name"].nil?
@@ -83,8 +82,8 @@ class Contacts
83
82
 
84
83
  # the contacts url is dynamic
85
84
  # luckily it tells us where to find it
86
- def get_contact_list_url
87
- data = get(CONTACT_LIST_URL, @cookies)[0]
85
+ def get_contact_list_url(url=CONTACT_LIST_URL)
86
+ data = get(url, @cookies)[0]
88
87
  html_doc = Nokogiri::HTML(data)
89
88
  html_doc.xpath("//a")[0]["href"]
90
89
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liangzan-contacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.19
4
+ version: 1.2.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-06-08 00:00:00.000000000 Z
16
+ date: 2012-08-01 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: json
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  segments:
106
106
  - 0
107
- hash: -4258229719453086248
107
+ hash: -3945600885967535156
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  none: false
110
110
  requirements:
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  version: '0'
114
114
  segments:
115
115
  - 0
116
- hash: -4258229719453086248
116
+ hash: -3945600885967535156
117
117
  requirements: []
118
118
  rubyforge_project:
119
119
  rubygems_version: 1.8.24