xmppify 0.0.51 → 0.0.52
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 +4 -4
- data/lib/xmppify/strategies/doorkeeper.rb +30 -0
- data/lib/xmppify/version.rb +1 -1
- data/lib/xmppify.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35dbdd2ea3a922150717c1c5d60cae09227b9640
|
|
4
|
+
data.tar.gz: 86ffd7f986f65b34a3c4b5b97bc54a8c625d751c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79b6e1f660911c33f626687f11f589233ca181f696537157e35d1d7197bf53fe429050ef348c2478461801cff92a3375274dc84dfb7c0685f4f9d94022b9ddba
|
|
7
|
+
data.tar.gz: 7f97358e6a38a6c42ccd36d65cdf1d308b8177475a4297062814c4be9e2ba549be69abc2414e3e53e7197d08450d30229f163c8c4f75cab1b9b41a64001c8d1f
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module OmniAuth
|
|
2
|
+
module Strategies
|
|
3
|
+
class Doorkeeper < OmniAuth::Strategies::OAuth2
|
|
4
|
+
option :name, :doorkeeper
|
|
5
|
+
|
|
6
|
+
option :client_options, {
|
|
7
|
+
:site => "http://localhost:3003",
|
|
8
|
+
:authorize_path => "/oauth/authorize"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
uid do
|
|
12
|
+
raw_info["id"]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
info do
|
|
16
|
+
{
|
|
17
|
+
:email => raw_info["email"],
|
|
18
|
+
:github_auth_token => raw_info['identities'][0]['auth_token'],
|
|
19
|
+
:github_email => raw_info['identities'][0]['email'],
|
|
20
|
+
:name => raw_info["name"]
|
|
21
|
+
# :github_auth_token => raw_info['identities'][1]['auth_token']
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def raw_info
|
|
26
|
+
@raw_info ||= access_token.get('/api/v1/me.json').parsed
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
data/lib/xmppify/version.rb
CHANGED
data/lib/xmppify.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require "xmppify/version"
|
|
2
|
+
require "xmppify/strategies/doorkeeper"
|
|
2
3
|
require 'rails'
|
|
3
4
|
require 'devise'
|
|
4
5
|
require 'omniauth-oauth2'
|
|
@@ -7,6 +8,7 @@ require 'doorkeeper'
|
|
|
7
8
|
require 'hpricot'
|
|
8
9
|
require 'gon'
|
|
9
10
|
require 'high_voltage'
|
|
11
|
+
|
|
10
12
|
module Xmppify
|
|
11
13
|
class Engine < Rails::Engine
|
|
12
14
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xmppify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.52
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Charlie
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-04-
|
|
11
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -485,6 +485,7 @@ files:
|
|
|
485
485
|
- db/migrate/20140329070238_create_identities.rb
|
|
486
486
|
- db/migrate/20140330183230_devise_create_users.rb
|
|
487
487
|
- lib/xmppify.rb
|
|
488
|
+
- lib/xmppify/strategies/doorkeeper.rb
|
|
488
489
|
- lib/xmppify/version.rb
|
|
489
490
|
- xmppify.gemspec
|
|
490
491
|
homepage: https://github.com/charlieanna/xmppify
|