omniauth-zaif 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd1642221a14a8a5b3e08a451f9db55f10dfba1a
4
- data.tar.gz: 2d133d3f13819fef15d7a91f4119b7ecdf4a297a
3
+ metadata.gz: 2d978ea69e657ff0408bb87aa5069bafb1eb369d
4
+ data.tar.gz: c2a7aec5b4876622256e536e39c8d8831c5233ab
5
5
  SHA512:
6
- metadata.gz: 4387ea73ca63f63527c6d6972ff5b65daa938de7a8222127193a4d5b237218324e468bae930e1eeef4ec5ce80e4100cf3a79b3568d2c1025fc894c78af983a22
7
- data.tar.gz: 95f8404c38c7480e0d2347e6544374df5bb7e753c534465689731c60df7223e8ffaeeeedd8f90eaed1b7006465948babb5ce90e8538beef84af71a643485a0fa
6
+ metadata.gz: fee0a9c123d026cd4990cbd264349a2dce1c451ca292a85b663af16b3f986ce43d4db8e95198ece496e14ec1a709c73d76d977716cacf5ec62ca7970044fde69
7
+ data.tar.gz: 7bf848e7374c595c24e2f97761ad15476449559b282cec4e1af568c5329993ec6889f325452c8cc0edc2d02ce88204f7287baf52e42dac319da9ce80396759bc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-zaif (0.0.1)
4
+ omniauth-zaif (0.0.2)
5
5
  json (~> 1.3)
6
6
  omniauth-oauth2 (~> 1.3.1)
7
7
 
@@ -46,7 +46,10 @@ module OmniAuth
46
46
 
47
47
  raise "failed to execute get_id_info. http status code: #{res.code}" unless res.code.to_i == 200
48
48
 
49
- @raw_info = JSON.load(res.body)['return']['user']
49
+ res = JSON.load(res.body)
50
+ raise "failed to execute get_id_info. error: #{res['error']}" unless res['success'] == 1
51
+
52
+ @raw_info = res['return']['user']
50
53
  end
51
54
  end
52
55
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Zaif
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -22,11 +22,11 @@ describe OmniAuth::Strategies::Zaif do
22
22
  end
23
23
 
24
24
  it 'should have correct authorize url' do
25
- expect(subject.options.client_options.authorize_url).to eq('/oauth')
25
+ expect(subject.options.client_options.authorize_url).to eq('https://zaif.jp/oauth')
26
26
  end
27
27
 
28
28
  it 'should have correct token url' do
29
- expect(subject.options.client_options.token_url).to eq('/v1/token')
29
+ expect(subject.options.client_options.token_url).to eq('https://oauth.zaif.jp/v1/token')
30
30
  end
31
31
  end
32
32
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-zaif
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - nori3tsu