cloudsponge 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/cloudsponge/contact_importer.rb +2 -1
- data/lib/cloudsponge/version.rb +1 -1
- data/test/test_contact_importer.rb +16 -0
- data/test/test_helper.rb +2 -0
- metadata +3 -3
data/Gemfile.lock
CHANGED
@@ -39,13 +39,14 @@ module Cloudsponge
|
|
39
39
|
# look at the given service and decide how which begin function to invoke.
|
40
40
|
unless username.nil? || username.empty?
|
41
41
|
resp = begin_import_username_password(source_name, username, password, user_id)
|
42
|
+
consent_url = resp['url'] if resp['url']
|
42
43
|
else
|
43
44
|
unless (source_name =~ /OUTLOOK/i || source_name =~ /ADDRESSBOOK/i).nil?
|
44
45
|
resp = begin_import_applet(source_name, user_id)
|
45
46
|
applet_tag = create_applet_tag(resp['id'], resp['url'])
|
46
47
|
else
|
47
48
|
resp = begin_import_consent(source_name, user_id, redirect_url)
|
48
|
-
consent_url = resp['url']
|
49
|
+
consent_url = resp['url'] if resp['url']
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
data/lib/cloudsponge/version.rb
CHANGED
@@ -14,6 +14,22 @@ class TestContactImporter < Test::Unit::TestCase
|
|
14
14
|
contacts = events_wait(importer)
|
15
15
|
assert contacts
|
16
16
|
end
|
17
|
+
|
18
|
+
def test_aol_import
|
19
|
+
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
20
|
+
resp = importer.begin_import('AOL', 'u', 'p')
|
21
|
+
puts "Navigate to #{resp[:consent_url]} and complete the authentication process." if resp[:consent_url]
|
22
|
+
contacts = events_wait(importer)
|
23
|
+
assert contacts
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_wl_import
|
27
|
+
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
28
|
+
resp = importer.begin_import('WINDOWSLIVE')
|
29
|
+
puts "Navigate to #{resp[:consent_url]} and complete the authentication process." if resp[:consent_url]
|
30
|
+
contacts = events_wait(importer)
|
31
|
+
assert contacts
|
32
|
+
end
|
17
33
|
|
18
34
|
def test_auth_import
|
19
35
|
importer = Cloudsponge::ContactImporter.new(DOMAIN_KEY, DOMAIN_PASSWORD)
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 0.9.
|
8
|
+
- 12
|
9
|
+
version: 0.9.12
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Graeme Rouse
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2013-08-
|
17
|
+
date: 2013-08-20 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|