omniauth-coding 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b5f3b3d39073e59a472476ff2ac1cafdeaf96787
4
- data.tar.gz: fa591c826fbad26583d72b8b169434e4afc51739
2
+ SHA256:
3
+ metadata.gz: '03668dbb94e03749812f0bbb86dc67954ea54edc72be03a9c8ea89ec5be6516c'
4
+ data.tar.gz: f7f547574518b07e04df9fdd922686015bc6700984ef1f387f25d3c5f01281f8
5
5
  SHA512:
6
- metadata.gz: e6d4ff26bbe30d60120a654da9cdd79abc3291f6de176ec5bba96d3eda15c59d8233a5a44eab9ed2044bf66fb416c9d776f6ee0015750861139369646a9f84ef
7
- data.tar.gz: f09aa93b49e4c0a7e0e09a9242e828031f3ab372574045c73fa49259a9fb96fc6c31840f35c22ad8560f1f5ddb187be357186b26503d571b5b367e658624e6dd
6
+ metadata.gz: b378afcb7cac59c13b140fa21c8ae70c3df35228cac4b47be749972afa668e661a8dcb57b83f85686c696ddd6f67fa416dee1a4cac3e736e8003231181a70654
7
+ data.tar.gz: e570bc65e72402e77bb531dfd7fcc963a5ee0ee3fd17efe4e189635eed42462daaeb21a6d5fb8fe658c8d467c7edfd1691660d6a019736e068ac38b3b84bbacc
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ /.idea
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Coding
3
- VERSION = "0.1"
3
+ VERSION = "0.2"
4
4
  end
5
- end
5
+ end
@@ -16,9 +16,10 @@ module OmniAuth
16
16
  info do
17
17
  {
18
18
  nickname: raw_info['name'],
19
- email: raw_info['email'],
19
+ email: email,
20
20
  sex: raw_info['sex'],
21
- avatar: raw_info['gravatar']
21
+ name: raw_info['global_key'],
22
+ avatar: raw_info['avatar']
22
23
  }
23
24
  end
24
25
 
@@ -28,8 +29,13 @@ module OmniAuth
28
29
 
29
30
  def raw_info
30
31
  access_token.options[:mode] = :query
32
+ @email ||= access_token.get('api/account/email').parsed['data']
31
33
  @raw_info ||= access_token.get('api/current_user').parsed['data']
32
34
  end
35
+
36
+ def email
37
+ @email
38
+ end
33
39
  end
34
40
  end
35
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-coding
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - liujun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-16 00:00:00.000000000 Z
11
+ date: 2018-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.5.1
128
+ rubygems_version: 2.7.6
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Omniauth strategy for Coding.