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 CHANGED
@@ -1,27 +1,30 @@
1
- # Omniauth::Etsy
1
+ # OmniAuth Etsy
2
2
 
3
- A (very alpha) unofficial OmniAuth strategy for Etsy. You'll need to register an application on Etsy (https://www.etsy.com/developers/register) to get a token and secret.
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
- Rails.application.config.middleware.use OmniAuth::Builder do
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
- Optionally, you may pass in comma separated "Permission Scopes" (http://www.etsy.com/developers/documentation/getting_started/oauth#section_permission_scopes)
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 this line to your application's Gemfile:
24
+ Add OmniAuth and OmniAuth::Etsy to your application's Gemfile:
23
25
 
24
- gem 'omniauth-etsy', '0.0.1-alpha'
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
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Etsy
3
- VERSION = "0.0.1.alpha"
3
+ VERSION = "0.0.2.alpha"
4
4
  end
5
5
  end
@@ -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: -829619701
4
+ hash: -850052270
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
9
+ - 2
10
10
  - alpha
11
- version: 0.0.1.alpha
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-18 00:00:00 -07:00
19
+ date: 2012-05-27 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency