contacts_cn 1.2.4 → 1.2.5

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 CHANGED
@@ -1,12 +1,12 @@
1
- == Welcome to Contacts
1
+ == Welcome to Contacts_cn
2
2
 
3
- Contacts_cn is a universal interface to grab contact list information from various providers including Hotmail, AOL, Gmail, Plaxo, 126, 163, Yeah, Sina, Sohu and Yahoo.
3
+ Contacts_cn is a universal interface to grab contact list information from various providers including Hotmail, AOL, Gmail, Plaxo, 126, 163, Yeah, Sina, Sohu and Yahoo.It is extended from contacts gem.
4
4
 
5
5
  == Download
6
6
 
7
7
  * gem install contacts_cn
8
- * http://github.com/cardmagic/contacts
9
- * git clone git://github.com/cardmagic/contacts.git
8
+ * http://github.com/kamechb/contacts_cn
9
+ * git clone git://github.com/kamechb/contacts_cn.git
10
10
 
11
11
  == Background
12
12
 
@@ -18,11 +18,13 @@ For a long time, the only way to get a list of contacts from your free online em
18
18
  Contacts::Yahoo.new(login, password).contacts
19
19
  Contacts::Gmail.new(login, password).contacts
20
20
  Contacts::NetEase.new(login,password).contacts
21
+ Contacts::Sina.new(login,password).contacts
21
22
 
22
23
  Contacts.new(:gmail, login, password).contacts
23
24
  Contacts.new(:hotmail, login, password).contacts
24
25
  Contacts.new(:yahoo, login, password).contacts
25
26
  Contacts.new(:net_ease,login,password).contacts
27
+ Contacts.new(:sina,login,password).contacts
26
28
 
27
29
  Contacts.guess(login, password).contacts
28
30
 
@@ -54,5 +56,6 @@ See the examples/ directory.
54
56
  * Leonardo Wong (mailto:mac@boy.name)
55
57
  * Rusty Burchfield
56
58
  * justintv
59
+ * kame
57
60
 
58
61
  This library is released under the terms of the BSD.
@@ -1,5 +1,5 @@
1
1
  require File.dirname(__FILE__)+"/../lib/contacts_cn"
2
-
2
+ =begin
3
3
  login = ARGV[0]
4
4
  password = ARGV[1]
5
5
 
@@ -10,3 +10,6 @@ Contacts.new(:gmail, login, password).contacts
10
10
  Contacts.new("gmail", login, password).contacts
11
11
 
12
12
  Contacts.guess(login, password).contacts
13
+ =end
14
+
15
+ p Contacts.new(:sina,'nonobo_t@sina.cn','123456').contacts
data/lib/contacts/base.rb CHANGED
@@ -9,7 +9,7 @@ require "erb"
9
9
 
10
10
  class Contacts
11
11
  TYPES = {}
12
- VERSION = "1.2.4"
12
+ VERSION = "1.2.5"
13
13
 
14
14
  class Base
15
15
  def initialize(login, password, options={})
data/lib/contacts/sina.rb CHANGED
@@ -49,10 +49,10 @@ class Contacts
49
49
  end
50
50
 
51
51
  def parse(data)
52
- data =~ /conf="(\{.*?\})"/m
52
+ data =~ /conf.*?contacts:.*?(\{.*?\}),\s*groups:/m
53
53
  contacts = $1.gsub(""",'')
54
54
  contacts = ActiveSupport::JSON.decode(contacts)
55
- contacts['contacts']['contact'].map{|contactor|
55
+ contacts['contact'].map{|contactor|
56
56
  [contactor['name'],contactor['email']]
57
57
  }
58
58
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contacts_cn
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 4
10
- version: 1.2.4
9
+ - 5
10
+ version: 1.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lucas Carlson
@@ -16,7 +16,7 @@ autorequire: contacts
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-08-31 00:00:00 +08:00
19
+ date: 2010-09-20 00:00:00 +08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency