omniauth-discogs 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/README.md +4 -15
- data/lib/omniauth-discogs.rb +2 -2
- data/lib/omniauth-discogs/version.rb +1 -1
- data/lib/omniauth/strategies/discogs.rb +11 -9
- data/omniauth-discogs.gemspec +1 -2
- metadata +6 -27
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Y2Y0ZjMwNTVkNGQ0ZDMwNWVkYmRiODE4MWMxYTU3YWYwMjczNGUxNg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
M2U4MTY3YzI1MzNlNzQ2OGQ4MGJjYjM1OWU3OGUzYjhhMjMwZDU4Mg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OWUyZjIzYjc3ZGFmZThjYjViMzA5ZWY4ZDUxMDJlNmYyODAwYWIxY2ZkODE0
|
10
|
+
NDg0MTE3NWIxODI2NTg5NWEwZTA3ZWRkZmRhZjY3NDg5MGI5MzU3NzEwYjgx
|
11
|
+
M2IzNzFmMzUzY2M3ZjNhNmI4ZWNiZjdjOGFjNmJlODhjMjI2YTE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGFjYjQ5MGU0MjY3ZmQ0OTM0MTEzMTNkNGNmMzQ4NDZmM2Q4NjhmOGIxZmJi
|
14
|
+
NzhmNzZlOTdhZjg2NzIyYjY5YzZiNzdiMjI1YWQ4NGY1ZTE4YjUwN2E1NWFk
|
15
|
+
ZGRmMGYzOTU3MDY3ODIzNTI2ZTMwOWQwOGEyYjQ2ZmYwNGRlYzQ=
|
data/README.md
CHANGED
@@ -4,26 +4,15 @@ OmniAuth strategy for Discogs (http://www.discogs.com/)
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
Discogs uses OAuth 1.0a, so ensure these lines are in your application's Gemfile:
|
8
8
|
|
9
|
+
gem 'omniauth-oauth'
|
9
10
|
gem 'omniauth-discogs'
|
10
11
|
|
11
12
|
And then execute:
|
12
13
|
|
13
|
-
$ bundle
|
14
|
+
$ bundle install
|
14
15
|
|
15
|
-
Or install it yourself
|
16
|
+
Or install it yourself via:
|
16
17
|
|
17
18
|
$ gem install omniauth-discogs
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
22
|
-
|
23
|
-
## Contributing
|
24
|
-
|
25
|
-
1. Fork it
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create new Pull Request
|
data/lib/omniauth-discogs.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require
|
2
|
-
require 'omniauth/strategies/discogs'
|
1
|
+
require 'omniauth-discogs/version'
|
2
|
+
require 'omniauth/strategies/discogs'
|
@@ -1,14 +1,17 @@
|
|
1
|
-
require 'omniauth-
|
1
|
+
require 'omniauth-oauth'
|
2
|
+
require 'multi_json'
|
2
3
|
|
3
4
|
module OmniAuth
|
4
5
|
module Strategies
|
5
|
-
class Discogs < OmniAuth::Strategies::
|
6
|
+
class Discogs < OmniAuth::Strategies::OAuth
|
7
|
+
|
6
8
|
option :name, 'discogs'
|
9
|
+
|
7
10
|
option :client_options, {
|
8
|
-
:site => '
|
9
|
-
:
|
10
|
-
:
|
11
|
-
|
11
|
+
:site => 'http://api.discogs.com/',
|
12
|
+
:request_token_path => '/oauth/request_token',
|
13
|
+
:access_token_path => '/oauth/access_token',
|
14
|
+
:authorize_url => 'http://www.discogs.com/oauth/authorize',
|
12
15
|
}
|
13
16
|
|
14
17
|
uid { raw_info['id'] }
|
@@ -21,12 +24,11 @@ module OmniAuth
|
|
21
24
|
end
|
22
25
|
|
23
26
|
extra do
|
24
|
-
{:
|
27
|
+
{:user_info => raw_info}
|
25
28
|
end
|
26
29
|
|
27
30
|
def raw_info
|
28
|
-
access_token.
|
29
|
-
@raw_info ||= access_token.get('/oauth/identity').parsed
|
31
|
+
@raw_info ||= MultiJson.decode(access_token.get("/oauth/identity").body)
|
30
32
|
end
|
31
33
|
end
|
32
34
|
end
|
data/omniauth-discogs.gemspec
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-discogs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Eric Hill
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-06
|
11
|
+
date: 2013-08-06 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name: omniauth
|
14
|
+
name: omniauth-oauth
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,27 +20,10 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '1.0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: omniauth-oauth2
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ~>
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '1.1'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '1.1'
|
46
27
|
description: OmniAuth strategy for Discogs
|
47
28
|
email: eric@many9s.com
|
48
29
|
executables: []
|
@@ -62,27 +43,25 @@ files:
|
|
62
43
|
homepage: http://github.com/rhizome/omniauth-discogs
|
63
44
|
licenses:
|
64
45
|
- MIT
|
46
|
+
metadata: {}
|
65
47
|
post_install_message:
|
66
48
|
rdoc_options: []
|
67
49
|
require_paths:
|
68
50
|
- lib
|
69
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
52
|
requirements:
|
72
53
|
- - ! '>='
|
73
54
|
- !ruby/object:Gem::Version
|
74
55
|
version: '0'
|
75
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
57
|
requirements:
|
78
58
|
- - ! '>='
|
79
59
|
- !ruby/object:Gem::Version
|
80
60
|
version: '0'
|
81
61
|
requirements: []
|
82
62
|
rubyforge_project:
|
83
|
-
rubygems_version:
|
63
|
+
rubygems_version: 2.0.5
|
84
64
|
signing_key:
|
85
|
-
specification_version:
|
65
|
+
specification_version: 4
|
86
66
|
summary: OmniAuth strategy for Discogs
|
87
67
|
test_files: []
|
88
|
-
has_rdoc:
|