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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39a709764fa93344b774d61d8962edc43bea2eec
4
- data.tar.gz: 6526cb70ec0d9e150a43326f021833683674a129
3
+ metadata.gz: 35dbdd2ea3a922150717c1c5d60cae09227b9640
4
+ data.tar.gz: 86ffd7f986f65b34a3c4b5b97bc54a8c625d751c
5
5
  SHA512:
6
- metadata.gz: d043bd1f684cd6f8a239ca737954ec62d450eb0f450cc0ee6cfd1d04e4ef0e6bf38d03e64c5020e7541eed20d44fb802f9ca4cb395c1c28b6673ec906c3b0373
7
- data.tar.gz: 9dcb1256052645d63f19331a3d147062f504d47abaaf8ebe15e053f66c30c6fd151bca9183bac443db1f798dae56f8c083d55279effb4eeb72d8ee7da27d0359
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
@@ -1,3 +1,3 @@
1
1
  module Xmppify
2
- VERSION = "0.0.51"
2
+ VERSION = "0.0.52"
3
3
  end
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.51
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-17 00:00:00.000000000 Z
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