omniauth-gitlab 1.0.4 → 2.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 +4 -4
- data/lib/omniauth-gitlab/version.rb +1 -1
- data/lib/omniauth/strategies/gitlab.rb +1 -5
- data/spec/omniauth/strategies/gitlab_spec.rb +3 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dde62b5d8d0b62f40619ade7d5a970f00f386c43
|
4
|
+
data.tar.gz: abd7240506cd709572a516349b5e9f415c659450
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e676d1f63ebefd66f99250304ebee6881378c1300aa6e9bd022101bf80585c1f797c2109a09d2e1538f5eb3ebf68c4e3bb2ac4a8848f0d63198c580fc3745d0c
|
7
|
+
data.tar.gz: cefc322b57b91b07618c1265d356868298a3fe11c11480b131c5b55479aaacf3c706460965852fa0325bd046de1ecf5191171daec67747d6e731aba9c17cce4d
|
@@ -24,15 +24,11 @@ module OmniAuth
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def raw_info
|
27
|
-
@raw_info ||= access_token.get(
|
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
|
-
|
54
|
-
|
55
|
-
|
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
|