omniauth-500px 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.md +9 -0
- data/README.md +43 -0
- data/lib/omniauth-500px/version.rb +2 -2
- data/lib/omniauth/strategies/500px.rb +12 -3
- data/omniauth-500px.gemspec +2 -2
- metadata +42 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 40cede96940b8fc063b5a6191048561136b0d669
|
4
|
+
data.tar.gz: ae07788c94ca1e1d6e5a8d3ddb774182b064ed55
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f52e631eb5a86d237ddc697a3e31fd74538869820d06763ab204f8e2e236eec81d91f128e84298ecffd9aa85701585cbab513f263111fdbb81220b88468cc62c
|
7
|
+
data.tar.gz: aedd75adb0ace85d31e1365940bbb1e90239dae4d842cbed77a6b89e0375e11bd3a964b15e58cdcaaebf463dbb23442e2c6beee65740dbc68f8bed2496933f2c
|
data/LICENSE.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2011-2013 by Arthur Neves
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
+
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
+
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
OmniAuth 500px
|
2
|
+
==============
|
3
|
+
|
4
|
+
This gem contains the 500px strategy for OmniAuth.
|
5
|
+
|
6
|
+
For more information about the 500px api: http://developer.500px.com/
|
7
|
+
|
8
|
+
How To Use It
|
9
|
+
-------------
|
10
|
+
|
11
|
+
If you are using rails, you need to add the gem to your `Gemfile`:
|
12
|
+
|
13
|
+
gem 'omniauth-500px'
|
14
|
+
|
15
|
+
You can pull them in directly from github e.g.:
|
16
|
+
|
17
|
+
gem "omniauth-500px", :git => "git://github.com/arthurnn/omniauth-500px.git"
|
18
|
+
|
19
|
+
Once these are in, you need to add the following to your `config/initializers/omniauth.rb`:
|
20
|
+
|
21
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
22
|
+
provider :fiveHundredPx, 'consumer_key', 'consumer_secret'
|
23
|
+
end
|
24
|
+
|
25
|
+
User the name of the class as provider(fiveHundredPx), however to authorize, you should use the provider name which is '500px'.
|
26
|
+
|
27
|
+
|
28
|
+
You will obviously have to put in your key and secret, which you can get from http://developer.500px.com/oauth_clients/new
|
29
|
+
|
30
|
+
|
31
|
+
After you have the gem running and the configuration is done, you can get to the follow url to log the user in:
|
32
|
+
|
33
|
+
http://localhost:3000/auth/500px
|
34
|
+
|
35
|
+
Now just follow the README at: https://github.com/intridea/omniauth
|
36
|
+
|
37
|
+
Questions
|
38
|
+
---------
|
39
|
+
|
40
|
+
For any question, fell free to send me a tweet [@arthurnn](http://twitter.com/arthurnn)
|
41
|
+
|
42
|
+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/arthurnn/omniauth-500px/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
43
|
+
|
@@ -21,8 +21,17 @@ module OmniAuth
|
|
21
21
|
|
22
22
|
info do
|
23
23
|
{
|
24
|
-
:
|
25
|
-
:
|
24
|
+
:nickname => user_info['username'],
|
25
|
+
:email => user_info['email'],
|
26
|
+
:name => user_info['fullname'],
|
27
|
+
:first_name => user_info['firstname'],
|
28
|
+
:last_name => user_info['lastname'],
|
29
|
+
:description => user_info['about'],
|
30
|
+
:image => user_info['userpic_url'],
|
31
|
+
:urls => {
|
32
|
+
'500px' => user_info['domain'],
|
33
|
+
'Website' => user_info['contacts']['website']
|
34
|
+
}
|
26
35
|
}
|
27
36
|
end
|
28
37
|
|
@@ -35,7 +44,7 @@ module OmniAuth
|
|
35
44
|
# Return info gathered from the flickr.people.getInfo API call
|
36
45
|
|
37
46
|
def raw_info
|
38
|
-
@raw_info ||= MultiJson.
|
47
|
+
@raw_info ||= MultiJson.decode(access_token.get('/v1/users.json').body)
|
39
48
|
rescue ::Errno::ETIMEDOUT
|
40
49
|
raise ::Timeout::Error
|
41
50
|
end
|
data/omniauth-500px.gemspec
CHANGED
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_development_dependency 'rspec', '~> 2.7'
|
24
24
|
s.add_development_dependency 'rack-test'
|
25
25
|
s.add_development_dependency 'simplecov'
|
26
|
-
s.add_development_dependency 'webmock'
|
27
|
-
end
|
26
|
+
s.add_development_dependency 'webmock'
|
27
|
+
end
|
metadata
CHANGED
@@ -1,71 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-500px
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Arthur Neves
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-10-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: omniauth-oauth
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '1.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: rspec
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '2.7'
|
33
34
|
type: :development
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.7'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: rack-test
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
|
-
- -
|
45
|
+
- - '>='
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '0'
|
44
48
|
type: :development
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: simplecov
|
49
|
-
requirement:
|
50
|
-
none: false
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - '>='
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '0'
|
55
62
|
type: :development
|
56
63
|
prerelease: false
|
57
|
-
version_requirements:
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
58
69
|
- !ruby/object:Gem::Dependency
|
59
70
|
name: webmock
|
60
|
-
requirement:
|
61
|
-
none: false
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
62
72
|
requirements:
|
63
|
-
- -
|
73
|
+
- - '>='
|
64
74
|
- !ruby/object:Gem::Version
|
65
75
|
version: '0'
|
66
76
|
type: :development
|
67
77
|
prerelease: false
|
68
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: OmniAuth strategy for 500px
|
70
84
|
email:
|
71
85
|
- arthurnn@gmail.com
|
@@ -75,6 +89,8 @@ extra_rdoc_files: []
|
|
75
89
|
files:
|
76
90
|
- .gitignore
|
77
91
|
- Gemfile
|
92
|
+
- LICENSE.md
|
93
|
+
- README.md
|
78
94
|
- Rakefile
|
79
95
|
- lib/omniauth-500px.rb
|
80
96
|
- lib/omniauth-500px/version.rb
|
@@ -84,27 +100,26 @@ files:
|
|
84
100
|
- spec/spec_helper.rb
|
85
101
|
homepage: https://github.com/arthurnn/omniauth-500px
|
86
102
|
licenses: []
|
103
|
+
metadata: {}
|
87
104
|
post_install_message:
|
88
105
|
rdoc_options: []
|
89
106
|
require_paths:
|
90
107
|
- lib
|
91
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
109
|
requirements:
|
94
|
-
- -
|
110
|
+
- - '>='
|
95
111
|
- !ruby/object:Gem::Version
|
96
112
|
version: '0'
|
97
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
114
|
requirements:
|
100
|
-
- -
|
115
|
+
- - '>='
|
101
116
|
- !ruby/object:Gem::Version
|
102
117
|
version: '0'
|
103
118
|
requirements: []
|
104
119
|
rubyforge_project: omniauth-500px
|
105
|
-
rubygems_version:
|
120
|
+
rubygems_version: 2.0.3
|
106
121
|
signing_key:
|
107
|
-
specification_version:
|
122
|
+
specification_version: 4
|
108
123
|
summary: OmniAuth strategy for 500px
|
109
124
|
test_files:
|
110
125
|
- spec/omniauth/strategies/500px_spec.rb
|