omniauth-proz 0.1.9 → 0.1.10
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/README.md +9 -1
- data/lib/omniauth/proz/version.rb +1 -1
- data/lib/omniauth/strategies/proz.rb +15 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c2ea7ba71187161246433294b64281caabd2fbd
|
|
4
|
+
data.tar.gz: 66e071bdce7251a4af6ec6466c0c10df04fc322e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 941253a838d93312bb6b637af8f5f9966aff1501bfa48f3454d1d25a0dd9e56687e72e38bcf8023593f3b85e1a27bb8434f0a0f7fa24b5783e95425d3b508571
|
|
7
|
+
data.tar.gz: d784a172897788344bf2cc898454809e58369cd18c023804cf08ff1b0144c8147b82879c4cedf993250c3246fce5e38435aa3f560649c0f317ad65ca1af17c76
|
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# OmniAuth Proz
|
|
2
2
|
|
|
3
|
+
[ProZ.com](http://www.proz.com/) OAuth2 Strategy for OmniAuth. You can find the ProZ API docs [here](http://www.proz.com/api-docs).
|
|
4
|
+
|
|
3
5
|
## Installation
|
|
4
6
|
|
|
5
7
|
Add this line to your application's Gemfile:
|
|
@@ -18,7 +20,13 @@ Or install it yourself as:
|
|
|
18
20
|
|
|
19
21
|
## Usage
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
OmniAuth::Strategies::Proz is simply a Rack middleware. Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth.
|
|
24
|
+
|
|
25
|
+
Here's a quick example, adding the middleware to a Rails app with Devise in config/initializers/devise.rb:
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
config.omniauth :proz, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'], callback_url: '{your-site.com}/users/auth/proz/callback'
|
|
29
|
+
```
|
|
22
30
|
|
|
23
31
|
## Contributing
|
|
24
32
|
|
|
@@ -19,11 +19,23 @@ module OmniAuth
|
|
|
19
19
|
uid { raw_info['uuid'] }
|
|
20
20
|
|
|
21
21
|
info do
|
|
22
|
-
{
|
|
22
|
+
prune!({
|
|
23
23
|
:email => raw_info["email"],
|
|
24
24
|
:name => raw_info["site_name"],
|
|
25
|
-
:profile_url => raw_info["profile_url"]
|
|
26
|
-
|
|
25
|
+
:profile_url => raw_info["profile_url"],
|
|
26
|
+
:contact_info => {
|
|
27
|
+
:email => raw_info["contact_info"]["email"],
|
|
28
|
+
:first_name => raw_info["contact_info"]["first_name"],
|
|
29
|
+
:middle_name => raw_info["contact_info"]["middle_name"],
|
|
30
|
+
:last_name => raw_info["contact_info"]["last_name"]
|
|
31
|
+
},
|
|
32
|
+
:proz_membership => {
|
|
33
|
+
:status => raw_info["proz_membership"]["status"],
|
|
34
|
+
:expiration_date => raw_info["proz_membership"]["expiration_date"],
|
|
35
|
+
:expired_date => raw_info["proz_membership"]["expired_date"],
|
|
36
|
+
:certified_pro_network_status => raw_info["proz_membership"]["certified_pro_network_status"]
|
|
37
|
+
}
|
|
38
|
+
})
|
|
27
39
|
end
|
|
28
40
|
|
|
29
41
|
def raw_info
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-proz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.10
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin S. Dias
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|