gmail_contacts 1.4.1 → 1.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.tar.gz.sig +0 -0
- data/.autotest +3 -0
- data/History.txt +5 -0
- data/Manifest.txt +1 -0
- data/Rakefile +9 -8
- data/lib/gmail_contacts.rb +8 -3
- data/test/test_gmail_contacts.rb +8 -0
- metadata +5 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/.autotest
ADDED
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/Rakefile
CHANGED
@@ -2,17 +2,18 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'hoe'
|
5
|
-
require './lib/gmail_contacts.rb'
|
6
5
|
|
7
|
-
Hoe.
|
8
|
-
p.rubyforge_name = 'seattlerb' # if different than lowercase project name
|
9
|
-
p.developer 'Eric Hodel', 'drbrain@segment7.net'
|
6
|
+
Hoe.plugin :seattlerb
|
10
7
|
|
11
|
-
|
8
|
+
Hoe.spec 'gmail_contacts' do
|
9
|
+
developer 'Eric Hodel', 'drbrain@segment7.net'
|
12
10
|
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
self.rubyforge_name = 'seattlerb'
|
12
|
+
self.testlib = :minitest
|
13
|
+
|
14
|
+
extra_deps << ['gdata', '~> 1.1']
|
15
|
+
extra_deps << ['nokogiri', '~> 1.2']
|
16
|
+
extra_dev_deps << ['minitest', '~> 1.3']
|
16
17
|
end
|
17
18
|
|
18
19
|
# vim: syntax=Ruby
|
data/lib/gmail_contacts.rb
CHANGED
@@ -10,7 +10,7 @@ require 'nokogiri'
|
|
10
10
|
|
11
11
|
class GmailContacts
|
12
12
|
|
13
|
-
VERSION = '1.
|
13
|
+
VERSION = '1.5'
|
14
14
|
|
15
15
|
Contact = Struct.new :title, :emails, :ims, :phone_numbers, :addresses,
|
16
16
|
:photo_url
|
@@ -110,10 +110,15 @@ class GmailContacts
|
|
110
110
|
end
|
111
111
|
|
112
112
|
##
|
113
|
-
# Fetches the photo data for +contact+
|
113
|
+
# Fetches the photo data for +contact+ which may be a photo URL
|
114
114
|
|
115
115
|
def fetch_photo(contact)
|
116
|
-
|
116
|
+
photo_url = if String === contact then
|
117
|
+
contact
|
118
|
+
else
|
119
|
+
contact.photo_url
|
120
|
+
end
|
121
|
+
res = @contact_api.get photo_url
|
117
122
|
|
118
123
|
res.body
|
119
124
|
end
|
data/test/test_gmail_contacts.rb
CHANGED
@@ -84,6 +84,14 @@ class TestGmailContacts < MiniTest::Unit::TestCase
|
|
84
84
|
assert_equal 'THIS IS A PHOTO!', photo
|
85
85
|
end
|
86
86
|
|
87
|
+
def test_fetch_photo_url
|
88
|
+
@api.stub_data << 'THIS IS A PHOTO!'
|
89
|
+
|
90
|
+
photo = @gc.fetch_photo @eric.photo_url
|
91
|
+
|
92
|
+
assert_equal 'THIS IS A PHOTO!', photo
|
93
|
+
end
|
94
|
+
|
87
95
|
def test_parse
|
88
96
|
@gc.parse Nokogiri::XML(GmailContacts::TestStub::CONTACTS)
|
89
97
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gmail_contacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: "1.5"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
x52qPcexcYZR7w==
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date: 2009-
|
33
|
+
date: 2009-08-20 00:00:00 -07:00
|
34
34
|
default_executable:
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
@@ -71,7 +71,7 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version:
|
74
|
+
version: 2.3.3
|
75
75
|
version:
|
76
76
|
description: |-
|
77
77
|
Simple Gmail contacts extraction using GData.
|
@@ -88,6 +88,7 @@ extra_rdoc_files:
|
|
88
88
|
- Manifest.txt
|
89
89
|
- README.txt
|
90
90
|
files:
|
91
|
+
- .autotest
|
91
92
|
- .document
|
92
93
|
- History.txt
|
93
94
|
- Manifest.txt
|
@@ -122,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
123
|
requirements: []
|
123
124
|
|
124
125
|
rubyforge_project: seattlerb
|
125
|
-
rubygems_version: 1.3.
|
126
|
+
rubygems_version: 1.3.5
|
126
127
|
signing_key:
|
127
128
|
specification_version: 3
|
128
129
|
summary: Simple Gmail contacts extraction using GData
|
metadata.gz.sig
CHANGED
Binary file
|