omniauth-gitee 0.0.3 → 1.0.0

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
  SHA256:
3
- metadata.gz: 11d0c1bd76ececfdce69e574db1e4060d19a02dfedd5e8b3d1a73e07043e464f
4
- data.tar.gz: af751b8d17862d015714342efcad7bfb87332462f2f86b9c8ed93e81d5b65286
3
+ metadata.gz: d56bad689067c680232ae928a05e410ce57bb01f1eada5bfe720eed8262a1eeb
4
+ data.tar.gz: 21d8acbf9567dd8bc84c18f3d014f722ef5533e87fcb2d5de6f8e1cc26bb6328
5
5
  SHA512:
6
- metadata.gz: d9018e2644149eae711e4d79ee260beb7cef44fae3ed88df89e1663d230b8f72200022570854926cdee7341fd5683cf773329d40614dc9343cd239f117f123d3
7
- data.tar.gz: 1705b6d75b00ffda81d8c5f3e59f163fabad516480e73be55d74a305da1db1e98b8f1194d5cef9e1fd8d1014459fc81260cccea2998e4f63448370f6383ac237
6
+ metadata.gz: ba34fe3b4933fc9ac51c4a0c2b016d55640ad778a79e55864ac2055a39ed5497bc0d95f060758b53ec9274c8958f16c35520844265df20cf2de1c4ef80bbaf60
7
+ data.tar.gz: 372d421c7e636382f68d81a1e08698e778c054fc0bbf77525100a80e309afe6471142e15205ca61beca0e8ed85b4eb2d4ac8b4fc2e2474deb9e30bf00b6d4099
@@ -57,7 +57,7 @@ module OmniAuth
57
57
  end
58
58
 
59
59
  def primary_email
60
- primary = emails.find{ |i| i['scope'].include? 'primary' && i['state'] == 'confirmed' }
60
+ primary = emails.find{ |i| (i['scope'].include? 'primary') && i['state'] == 'confirmed' }
61
61
  primary && primary['email'] || nil
62
62
  end
63
63
 
@@ -71,7 +71,7 @@ module OmniAuth
71
71
  def email_access_allowed?
72
72
  return false unless options['scope']
73
73
  email_scopes = %w[user_info emails]
74
- scopes = options['scope'].split(',')
74
+ scopes = options['scope'].split(' ')
75
75
  (scopes & email_scopes).any?
76
76
  end
77
77
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Gitee
3
- VERSION = "0.0.3"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -39,7 +39,7 @@ describe OmniAuth::Strategies::Gitee do
39
39
  end
40
40
 
41
41
  it 'should allow email if scope is a bunch of stuff including user_info' do
42
- subject.options['scope'] = 'public_repo,user_info,repo,delete_repo,gist'
42
+ subject.options['scope'] = 'public_repo user_info repo delete_repo gist'
43
43
  expect(subject).to be_email_access_allowed
44
44
  end
45
45
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-gitee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mashiro