omniauth-gitlab 1.0.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c597b6b76d64221a58a0a3667d0db7d3f4cda1e
4
- data.tar.gz: 50572bf66940d26d090044206c53c3386bc550fc
3
+ metadata.gz: dde62b5d8d0b62f40619ade7d5a970f00f386c43
4
+ data.tar.gz: abd7240506cd709572a516349b5e9f415c659450
5
5
  SHA512:
6
- metadata.gz: 93f9e5652960989210433e6b59837106ca1d853ea6559acede43d72ce99061dec9ffbae13897c9b3abea26ba82d7bd28a18f281232c7d7d2da292f57af651ad6
7
- data.tar.gz: 889483d8c773d67728714831abaa13d0228feafd88bbcdc2155de0cd643f54ea7e415ef7e6e21f4d9adeeb8b6ad21d0c73dbf3dbab84e382a6320a0032484eda
6
+ metadata.gz: e676d1f63ebefd66f99250304ebee6881378c1300aa6e9bd022101bf80585c1f797c2109a09d2e1538f5eb3ebf68c4e3bb2ac4a8848f0d63198c580fc3745d0c
7
+ data.tar.gz: cefc322b57b91b07618c1265d356868298a3fe11c11480b131c5b55479aaacf3c706460965852fa0325bd046de1ecf5191171daec67747d6e731aba9c17cce4d
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Gitlab
3
- VERSION = '1.0.4'
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
@@ -24,15 +24,11 @@ module OmniAuth
24
24
  end
25
25
 
26
26
  def raw_info
27
- @raw_info ||= access_token.get(user_endpoint_url).parsed
27
+ @raw_info ||= access_token.get('user').parsed
28
28
  end
29
29
 
30
30
  private
31
31
 
32
- def user_endpoint_url
33
- options.client_options.site.match(%r{v(\d+)/?$}) ? 'user' : '/api/v3/user'
34
- end
35
-
36
32
  def callback_url
37
33
  options.redirect_url || (full_host + script_name + callback_path)
38
34
  end
@@ -50,20 +50,9 @@ describe OmniAuth::Strategies::GitLab do
50
50
  end
51
51
 
52
52
  describe '#raw_info' do
53
- context 'with new configuration' do
54
- it 'sent request to current user endpoint' do
55
- expect(access_token).to receive(:get).with('user').and_return(response)
56
- expect(subject.raw_info).to eq(parsed_response)
57
- end
58
- end
59
-
60
- context 'with old style configuration' do
61
- let(:enterprise_site) { 'https://some.other.site.com/' }
62
- subject { enterprise }
63
- it 'sent request to current user endpoint' do
64
- expect(access_token).to receive(:get).with('/api/v3/user').and_return(response)
65
- expect(subject.raw_info).to eq(parsed_response)
66
- end
53
+ it 'sent request to current user endpoint' do
54
+ expect(access_token).to receive(:get).with('user').and_return(response)
55
+ expect(subject.raw_info).to eq(parsed_response)
67
56
  end
68
57
  end
69
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Sein