omniauth-genius 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84d0905fac6ef968868da50bdff33e33e60efc47
4
- data.tar.gz: 1546b3e7fb81cb1e24514cc1ba2375863c467ec0
3
+ metadata.gz: 3efd8bc49fefeb566725a8c513ba45cec4ebae12
4
+ data.tar.gz: 6b42bfaa9b6668f1312e5a6e3ed9788a5fe290a9
5
5
  SHA512:
6
- metadata.gz: 62412fbc5e79a90aae236ca0f0d5f34e35f8e1d046a205978b31a82ad8c183dad1f7069a8a5fc4c7c239457070d2f9f72528d49c761058e9fbbd8b5c6ee07238
7
- data.tar.gz: 3fa6ac724b3c15d2cc68f7b5b25147e7a26082014573b46eb70d513266dd54ef45da022a4d4a2304b120436a42a8cd3d34a92c6021c88bbf4f68943c0c052367
6
+ metadata.gz: 9f8bd663f64c888fd1ac149495de7e96197c8f4d84d37f46b204ab9643422a270e8b56688914db10e1a3e8214ce2ffc74aea832233b7bc2a9c35b1390eb56798
7
+ data.tar.gz: c0b292a9d9da619a84278fc4af8cda7947b9d1038728b50239e48ba8f5bf9139c9cc655d333f5c5c4038dfdc07195fdc13ddb3cc36a496f78b4e7ff9e89dc44e
@@ -0,0 +1 @@
1
+ require_relative 'omniauth/strategies/genius'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Genius
3
+ VERSION = '0.0.2'
4
+ end
5
+ end
@@ -0,0 +1,36 @@
1
+ require 'omniauth-oauth2'
2
+
3
+ module OmniAuth
4
+ module Strategies
5
+ class Genius < OmniAuth::Strategies::OAuth2
6
+
7
+ option :name, 'genius'
8
+
9
+ option :client_options, {
10
+ site: 'https://api.genius.com'
11
+ }
12
+
13
+ uid do
14
+ raw_info['id']
15
+ end
16
+
17
+ info do
18
+ {
19
+ :id => raw_info['id'],
20
+ :name => raw_info['name'],
21
+ :login => raw_info['login'],
22
+ :iq => raw_info['iq']
23
+ }
24
+ end
25
+
26
+ extra do
27
+ raw_info
28
+ end
29
+
30
+ def raw_info
31
+ @raw_info ||= access_token.get('/account').parsed['response']['user']
32
+ end
33
+
34
+ end
35
+ end
36
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-genius
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - john@genius.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-05 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -43,7 +43,10 @@ email:
43
43
  executables: []
44
44
  extensions: []
45
45
  extra_rdoc_files: []
46
- files: []
46
+ files:
47
+ - lib/omniauth-genius.rb
48
+ - lib/omniauth-genius/version.rb
49
+ - lib/omniauth/strategies/genius.rb
47
50
  homepage:
48
51
  licenses: []
49
52
  metadata: {}