omnicontacts 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -65,6 +65,12 @@ OmniContacts supports OAuth 1.0 and OAuth 2.0 token refresh, but for both it nee
|
|
65
65
|
|
66
66
|
Gmail requires you to register the redirect_path on their website along with your application. Make sure to use the same value present in the configuration file, or `/contacts/gmail/callback` if using the default.
|
67
67
|
|
68
|
+
To configure the max number of contacts to download from Gmail, just add a max results parameter in your initializer:
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
importer :gmail, "xxx", "yyy", :max_results => 1000
|
72
|
+
```
|
73
|
+
|
68
74
|
Yahoo requires you to configure the Permissions your application requires. Make sure to go the Yahoo website and to select Read permission for Contacts.
|
69
75
|
|
70
76
|
Hotmail does not accept requests from localhost. This can be quite annoying during development, but unfortunately this is the way it is.
|
data/lib/omnicontacts.rb
CHANGED
@@ -19,7 +19,7 @@ class IntegrationTest
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def mock_authorization_from_user provider
|
22
|
-
[302, {"location" => provider.redirect_path}, []]
|
22
|
+
[302, {"Content-Type" => "application/x-www-form-urlencoded", "location" => provider.redirect_path}, []]
|
23
23
|
end
|
24
24
|
|
25
25
|
def mock_fetch_contacts provider
|
@@ -84,7 +84,7 @@ module OmniContacts
|
|
84
84
|
|
85
85
|
def handle_error error_type, exception
|
86
86
|
logger << ("Error #{error_type} while processing #{@env["PATH_INFO"]}: #{exception.message}") if logger
|
87
|
-
[302, {"location" => "/contacts/failure?error_message=#{error_type}&importer=#{class_name}"}, []]
|
87
|
+
[302, {"Content-Type" => "text/html", "location" => "/contacts/failure?error_message=#{error_type}&importer=#{class_name}"}, []]
|
88
88
|
end
|
89
89
|
|
90
90
|
def session
|
@@ -43,7 +43,7 @@ module OmniContacts
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def redirect_to_authorization_site auth_token
|
46
|
-
[302, {"location" => authorization_url(auth_token)}, []]
|
46
|
+
[302, {"Content-Type" => "application/x-www-form-urlencoded", "location" => authorization_url(auth_token)}, []]
|
47
47
|
end
|
48
48
|
|
49
49
|
# Parses the authorization token from the query string and
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnicontacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-02-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|