omniauth-proz 0.1.9 → 0.1.10

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
2
  SHA1:
3
- metadata.gz: 519e81141220c530c71ea5542c0ce01aa0e6d68a
4
- data.tar.gz: ce1f29c10305691147b762660ba12fbe76c3fedc
3
+ metadata.gz: 1c2ea7ba71187161246433294b64281caabd2fbd
4
+ data.tar.gz: 66e071bdce7251a4af6ec6466c0c10df04fc322e
5
5
  SHA512:
6
- metadata.gz: 7f0bfd77fdb98362dea43a1b96f9533212e8475949e9092659eef27423f681d6fae2dbb9fb8d4e72c8dd7212d4cce8038cab8b2d5e803259f228214e96fa5548
7
- data.tar.gz: d7c4c50c917d9c4508158d4ac1f5dca17e8fe4ddbbc50db5f24aa85e1ea5f5241024d620519c9fda4536ae61f7fb7b70885522d26af185406caaf0611a1e7e1d
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
- TODO: Write usage instructions here
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
 
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Proz
3
- VERSION = "0.1.9"
3
+ VERSION = "0.1.10"
4
4
  end
5
5
  end
@@ -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.9
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-06 00:00:00.000000000 Z
11
+ date: 2016-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler