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 +7 -4
- data/examples/grab_contacts.rb +4 -1
- data/lib/contacts/base.rb +1 -1
- data/lib/contacts/sina.rb +2 -2
- metadata +4 -4
data/README
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
== Welcome to
|
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/
|
9
|
-
* git clone git://github.com/
|
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.
|
data/examples/grab_contacts.rb
CHANGED
@@ -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
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
|
52
|
+
data =~ /conf.*?contacts:.*?(\{.*?\}),\s*groups:/m
|
53
53
|
contacts = $1.gsub(""",'')
|
54
54
|
contacts = ActiveSupport::JSON.decode(contacts)
|
55
|
-
contacts['
|
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:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 1.2.
|
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-
|
19
|
+
date: 2010-09-20 00:00:00 +08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|