oauth-contacts 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,6 @@ module Oauth
10
10
  super
11
11
  @callback_url = Settings.oauth.contacts.google.callback_url
12
12
 
13
- # GOOGLE
14
13
  opts = { key: Settings.oauth.contacts.google.key, secret: Settings.oauth.contacts.google.secret,
15
14
  extra: { site: 'https://accounts.google.com',
16
15
  authorize_url: '/o/oauth2/auth',
@@ -27,7 +26,6 @@ module Oauth
27
26
  def authorize_url
28
27
  scopes = Settings.oauth.contacts.google.scopes
29
28
 
30
- # http://code.google.com/intl/fr-FR/apis/contacts/docs/3.0/developers_guide.html
31
29
  extra_params = { scope: scopes.join(' '),
32
30
  redirect_uri: callback_url,
33
31
  response_type: 'code',
@@ -38,6 +36,7 @@ module Oauth
38
36
  consumer.auth_code.authorize_url( extra_params )
39
37
  end
40
38
 
39
+ # http://code.google.com/intl/fr-FR/apis/contacts/docs/3.0/developers_guide.html
41
40
  def contacts
42
41
  token!
43
42
 
@@ -45,23 +44,6 @@ module Oauth
45
44
  @contacts = normalize(access_token.get(request, :parse => :json).parsed)
46
45
  end
47
46
 
48
- class << self
49
- def slim(contacts) #:nodoc:
50
- _contacts = { 'contacts' => [] }
51
-
52
- contacts['feed']['entry'].each do |contact|
53
- emails, nickname = [], nil
54
- nickname = contact['title']['$t']
55
-
56
- contact['gd$email'].each do |email|
57
- emails << email['address']
58
- end
59
- _contacts['contacts'] << { :email => emails.first, :emails => emails, :name => nickname }
60
- end
61
- _contacts
62
- end
63
- end
64
-
65
47
  private
66
48
 
67
49
  def token!
@@ -1,5 +1,5 @@
1
1
  module Oauth
2
2
  module Contacts
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth-contacts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-21 00:00:00.000000000 Z
12
+ date: 2012-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2
16
- requirement: &70334006980520 !ruby/object:Gem::Requirement
16
+ requirement: &70277237628740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70334006980520
24
+ version_requirements: *70277237628740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rails_config
27
- requirement: &70334006979840 !ruby/object:Gem::Requirement
27
+ requirement: &70277237619180 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70334006979840
35
+ version_requirements: *70277237619180
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: multi_json
38
- requirement: &70334006978560 !ruby/object:Gem::Requirement
38
+ requirement: &70277237618060 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.0.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70334006978560
46
+ version_requirements: *70277237618060
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70334006977620 !ruby/object:Gem::Requirement
49
+ requirement: &70277237617000 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '2.7'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70334006977620
57
+ version_requirements: *70277237617000
58
58
  description:
59
59
  email:
60
60
  - joel.azemar@gmail.com