omniauth-wepay 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .DS_Store
@@ -12,7 +12,8 @@ module OmniAuth
12
12
  option :client_options, {
13
13
  :authorize_url => "https://stage.wepay.com/v2/oauth2/authorize",
14
14
  :token_url => "https://stage.wepayapi.com/v2/oauth2/token",
15
- :site => "https://stage.wepayapi.com/v2"
15
+ :site => "https://stage.wepayapi.com/v2",
16
+ :user_path => "/user"
16
17
  }
17
18
 
18
19
  uid do
@@ -24,12 +25,21 @@ module OmniAuth
24
25
  end
25
26
 
26
27
  def raw_info
27
- params = {code: request.params['code'], client_id:options.client_id, redirect_uri: callback_url, client_secret: options.client_secret}.to_param
28
- url = options.client_options.token_url + "?" + params
28
+ c_options = options.client_options
29
+
30
+ params = {
31
+ code: request.params['code'],
32
+ client_id:options.client_id,
33
+ redirect_uri: callback_url,
34
+ client_secret: options.client_secret
35
+ }.to_param
36
+
37
+ url = c_options[:token_url] + "?" + params
29
38
 
30
39
  info = access_token.post(url).parsed
40
+
41
+ user_url = c_options[:site] + c_options[:user_path]
31
42
 
32
- user_url = "https://stage.wepayapi.com/v2/user"
33
43
  info2 = client.request(:post, user_url) do |req|
34
44
  req.headers["Authorization"] = "Bearer #{info["access_token"]}"
35
45
  end.parsed
@@ -1,6 +1,6 @@
1
1
  module OmniAuth
2
2
  module Wepay
3
- VERSION = [0, 0, 4]
3
+ VERSION = [0, 0, 5]
4
4
 
5
5
  class << VERSION
6
6
  include Comparable
@@ -17,5 +17,9 @@ Gem::Specification.new do |gem|
17
17
  gem.files = `git ls-files`.split("\n")
18
18
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
19
 
20
+
21
+ gem.add_dependency 'omniauth', '~> 1.0'
22
+ gem.add_dependency 'omniauth-oauth2', '~> 1.1'
23
+
20
24
  gem.add_development_dependency 'ritual', '~> 0.4.1'
21
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-wepay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,40 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-12 00:00:00.000000000 Z
12
+ date: 2012-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: omniauth
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '1.0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ 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'
14
46
  - !ruby/object:Gem::Dependency
15
47
  name: ritual
16
48
  requirement: !ruby/object:Gem::Requirement
@@ -34,12 +66,15 @@ executables: []
34
66
  extensions: []
35
67
  extra_rdoc_files: []
36
68
  files:
69
+ - .DS_Store
37
70
  - .gitignore
38
71
  - CHANGELOG
39
72
  - Gemfile
40
73
  - LICENSE
41
74
  - README.markdown
42
75
  - Rakefile
76
+ - lib/.DS_Store
77
+ - lib/omniauth/.DS_Store
43
78
  - lib/omniauth/strategies/wepay.rb
44
79
  - lib/omniauth/version.rb
45
80
  - lib/wepay.rb