omniauth-etsy 0.0.1.alpha → 0.0.2.alpha
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.
- data/README.md +16 -12
- data/lib/omniauth-etsy/version.rb +1 -1
- data/lib/omniauth/strategies/etsy.rb +3 -2
- metadata +4 -4
data/README.md
CHANGED
@@ -1,27 +1,30 @@
|
|
1
|
-
#
|
1
|
+
# OmniAuth Etsy
|
2
2
|
|
3
|
-
A
|
3
|
+
A very alpha and unofficial [OmniAuth](https://github.com/intridea/omniauth) strategy for Etsy. To use it, you'll need OmniAuth and a registered application on [Etsy](https://www.etsy.com/developers/register) to get a token and secret.
|
4
4
|
|
5
|
-
## Useage
|
5
|
+
## Useage with Rails
|
6
6
|
|
7
|
-
|
8
|
-
provider :etsy, 'token', 'secret'
|
9
|
-
end
|
7
|
+
Create an initializer file, and tell OmniAuth you'd like to register etsy as a provider:
|
10
8
|
|
11
|
-
|
9
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
10
|
+
provider :etsy, 'token', 'secret'
|
11
|
+
end
|
12
12
|
|
13
|
+
Optionally, you may also pass in comma separated [Permission Scopes](http://www.etsy.com/developers/documentation/getting_started/oauth#section_permission_scopes):
|
13
14
|
|
14
|
-
Rails.application.config.middleware.use OmniAuth::Builder do
|
15
|
-
provider :etsy, 'token', 'secret', :scope => 'email_r,listings_r'
|
16
|
-
end
|
17
15
|
|
16
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
17
|
+
provider :etsy, 'token', 'secret', :scope => 'email_r'
|
18
|
+
end
|
18
19
|
|
20
|
+
Note: If for some reason you receive a 400 error, it's probably your scopes.
|
19
21
|
|
20
22
|
## Installation
|
21
23
|
|
22
|
-
Add
|
24
|
+
Add OmniAuth and OmniAuth::Etsy to your application's Gemfile:
|
23
25
|
|
24
|
-
gem 'omniauth
|
26
|
+
gem 'omniauth', '~>1.0'
|
27
|
+
gem 'omniauth-etsy', '0.0.2.alpha'
|
25
28
|
|
26
29
|
And then execute:
|
27
30
|
|
@@ -29,6 +32,7 @@ And then execute:
|
|
29
32
|
|
30
33
|
Or install it yourself as:
|
31
34
|
|
35
|
+
$ gem install omniauth
|
32
36
|
$ gem install omniauth-etsy
|
33
37
|
|
34
38
|
## Contributing
|
@@ -22,7 +22,7 @@ module OmniAuth
|
|
22
22
|
|
23
23
|
def request_phase
|
24
24
|
if options.scope
|
25
|
-
options.request_params.merge!(:scope => Rack::Utils.build_query(options.scope))
|
25
|
+
options.request_params.merge!(:scope => Rack::Utils.build_query([options.scope]))
|
26
26
|
end
|
27
27
|
super
|
28
28
|
end
|
@@ -34,7 +34,8 @@ module OmniAuth
|
|
34
34
|
'first_name' => profile['first_name'],
|
35
35
|
'last_name' => profile['last_name'],
|
36
36
|
'image' => profile['image_url_75x75'],
|
37
|
-
'full_name' => "#{profile['first_name']} #{profile['last_name']}"
|
37
|
+
'full_name' => "#{profile['first_name']} #{profile['last_name']}",
|
38
|
+
'name' => "#{profile['first_name']} #{profile['last_name']}"
|
38
39
|
}
|
39
40
|
else
|
40
41
|
{}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-etsy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -850052270
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
9
|
+
- 2
|
10
10
|
- alpha
|
11
|
-
version: 0.0.
|
11
|
+
version: 0.0.2.alpha
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Jeff Mehlhoff
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-05-
|
19
|
+
date: 2012-05-27 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|