omniauth-gitlab 4.1.0 → 4.2.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
- metadata +9 -23
- data/.github/workflows/ruby.yml +0 -21
- data/.gitignore +0 -18
- data/.project +0 -18
- data/.rspec +0 -1
- data/Gemfile +0 -4
- data/Rakefile +0 -7
- data/omniauth-gitlab.gemspec +0 -26
- data/spec/omniauth/strategies/gitlab_spec.rb +0 -80
- data/spec/spec_helper.rb +0 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01ebd1454e5bfc39b0a2d4e548975c6dbafaea3b1cc9351db91cf6892336a4b8
|
|
4
|
+
data.tar.gz: 1ad111ecfe653dd48a9f93a2c1e3d18c36de96ae74168974fc106608e469d3a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd9ccc2b5e246752bb7d33cb2491dba0c79f3b309810cd86bd32a8cfb8b8160acc69866a3c7e4d92780e56ee158ea9b36ddbea4c82fe5d71bbdd43126f365cba
|
|
7
|
+
data.tar.gz: e5991e6718f3308f8b1a0d36c1f4300c17b4f9a05f29336ec79458eb00829c16a8f0483add67783e6d389f0890cc0657b1dc24bd6e03e7479c4d833d15e14ead
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-gitlab
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergey Sein
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: omniauth
|
|
@@ -30,28 +29,28 @@ dependencies:
|
|
|
30
29
|
requirements:
|
|
31
30
|
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 1.
|
|
32
|
+
version: '1.9'
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.
|
|
39
|
+
version: '1.9'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: rspec
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
44
|
- - "~>"
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '3.
|
|
46
|
+
version: '3.13'
|
|
48
47
|
type: :development
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
51
|
- - "~>"
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '3.
|
|
53
|
+
version: '3.13'
|
|
55
54
|
- !ruby/object:Gem::Dependency
|
|
56
55
|
name: rspec-its
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -101,24 +100,14 @@ executables: []
|
|
|
101
100
|
extensions: []
|
|
102
101
|
extra_rdoc_files: []
|
|
103
102
|
files:
|
|
104
|
-
- ".github/workflows/ruby.yml"
|
|
105
|
-
- ".gitignore"
|
|
106
|
-
- ".project"
|
|
107
|
-
- ".rspec"
|
|
108
|
-
- Gemfile
|
|
109
103
|
- LICENSE.txt
|
|
110
104
|
- README.md
|
|
111
|
-
- Rakefile
|
|
112
105
|
- lib/omniauth-gitlab.rb
|
|
113
106
|
- lib/omniauth-gitlab/version.rb
|
|
114
107
|
- lib/omniauth/strategies/gitlab.rb
|
|
115
|
-
- omniauth-gitlab.gemspec
|
|
116
|
-
- spec/omniauth/strategies/gitlab_spec.rb
|
|
117
|
-
- spec/spec_helper.rb
|
|
118
108
|
homepage: https://github.com/linchus/omniauth-gitlab
|
|
119
109
|
licenses: []
|
|
120
110
|
metadata: {}
|
|
121
|
-
post_install_message:
|
|
122
111
|
rdoc_options: []
|
|
123
112
|
require_paths:
|
|
124
113
|
- lib
|
|
@@ -126,17 +115,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
126
115
|
requirements:
|
|
127
116
|
- - ">="
|
|
128
117
|
- !ruby/object:Gem::Version
|
|
129
|
-
version: '
|
|
118
|
+
version: '2.5'
|
|
130
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
120
|
requirements:
|
|
132
121
|
- - ">="
|
|
133
122
|
- !ruby/object:Gem::Version
|
|
134
123
|
version: '0'
|
|
135
124
|
requirements: []
|
|
136
|
-
rubygems_version: 3.
|
|
137
|
-
signing_key:
|
|
125
|
+
rubygems_version: 3.6.7
|
|
138
126
|
specification_version: 4
|
|
139
127
|
summary: This is the strategy for authenticating to your GitLab service
|
|
140
|
-
test_files:
|
|
141
|
-
- spec/omniauth/strategies/gitlab_spec.rb
|
|
142
|
-
- spec/spec_helper.rb
|
|
128
|
+
test_files: []
|
data/.github/workflows/ruby.yml
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
strategy:
|
|
9
|
-
matrix:
|
|
10
|
-
ruby-version: ['2.6', '2.7', '3.0', '3.1']
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v2
|
|
14
|
-
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
15
|
-
uses: ruby/setup-ruby@v1
|
|
16
|
-
with:
|
|
17
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
18
|
-
bundler-cache: true # 'bundle install' and cache
|
|
19
|
-
- name: Run specs
|
|
20
|
-
run: |
|
|
21
|
-
bundle exec rspec
|
data/.gitignore
DELETED
data/.project
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<projectDescription>
|
|
3
|
-
<name>omniauth-gitlab</name>
|
|
4
|
-
<comment></comment>
|
|
5
|
-
<projects>
|
|
6
|
-
</projects>
|
|
7
|
-
<buildSpec>
|
|
8
|
-
<buildCommand>
|
|
9
|
-
<name>com.aptana.ide.core.unifiedBuilder</name>
|
|
10
|
-
<arguments>
|
|
11
|
-
</arguments>
|
|
12
|
-
</buildCommand>
|
|
13
|
-
</buildSpec>
|
|
14
|
-
<natures>
|
|
15
|
-
<nature>com.aptana.ruby.core.rubynature</nature>
|
|
16
|
-
<nature>com.aptana.projects.webnature</nature>
|
|
17
|
-
</natures>
|
|
18
|
-
</projectDescription>
|
data/.rspec
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
--colour
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/omniauth-gitlab.gemspec
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
-
require 'omniauth-gitlab/version'
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |gem|
|
|
7
|
-
gem.name = 'omniauth-gitlab'
|
|
8
|
-
gem.version = Omniauth::Gitlab::VERSION
|
|
9
|
-
gem.authors = ['Sergey Sein']
|
|
10
|
-
gem.email = ['linchus@gmail.com']
|
|
11
|
-
gem.description = 'This is the strategy for authenticating to your GitLab service'
|
|
12
|
-
gem.summary = 'This is the strategy for authenticating to your GitLab service'
|
|
13
|
-
gem.homepage = 'https://github.com/linchus/omniauth-gitlab'
|
|
14
|
-
|
|
15
|
-
gem.files = `git ls-files`.split($/)
|
|
16
|
-
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
|
17
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
18
|
-
gem.require_paths = ['lib']
|
|
19
|
-
|
|
20
|
-
gem.add_dependency 'omniauth', '~> 2.0'
|
|
21
|
-
gem.add_dependency 'omniauth-oauth2', '~> 1.8.0'
|
|
22
|
-
gem.add_development_dependency 'rspec', '~> 3.1'
|
|
23
|
-
gem.add_development_dependency 'rspec-its', '~> 1.0'
|
|
24
|
-
gem.add_development_dependency 'simplecov'
|
|
25
|
-
gem.add_development_dependency 'rake', '>= 12.0'
|
|
26
|
-
end
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
describe OmniAuth::Strategies::GitLab do
|
|
4
|
-
let(:access_token) { double('AccessToken') }
|
|
5
|
-
let(:parsed_response) { double('ParsedResponse') }
|
|
6
|
-
let(:response) { double('Response', parsed: parsed_response) }
|
|
7
|
-
|
|
8
|
-
let(:enterprise_site) { 'https://some.other.site.com' }
|
|
9
|
-
|
|
10
|
-
let(:gitlab_service) { OmniAuth::Strategies::GitLab.new({}) }
|
|
11
|
-
let(:enterprise) do
|
|
12
|
-
OmniAuth::Strategies::GitLab.new(
|
|
13
|
-
'GITLAB_KEY',
|
|
14
|
-
'GITLAB_SECRET',
|
|
15
|
-
client_options: { site: enterprise_site },
|
|
16
|
-
redirect_url: 'http://localhost:9292/callback_url'
|
|
17
|
-
)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
subject { gitlab_service }
|
|
21
|
-
|
|
22
|
-
before(:each) do
|
|
23
|
-
allow(subject).to receive(:access_token).and_return(access_token)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
describe 'client options' do
|
|
27
|
-
context 'with defaults' do
|
|
28
|
-
subject { gitlab_service.options.client_options }
|
|
29
|
-
|
|
30
|
-
its(:site) { is_expected.to eq 'https://gitlab.com' }
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
context 'with override' do
|
|
34
|
-
subject { enterprise.options.client_options }
|
|
35
|
-
|
|
36
|
-
its(:site) { is_expected.to eq enterprise_site }
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
describe 'redirect_url' do
|
|
41
|
-
context 'with defaults' do
|
|
42
|
-
subject { gitlab_service.options }
|
|
43
|
-
its(:redirect_url) { is_expected.to be_nil }
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
context 'with customs' do
|
|
47
|
-
subject { enterprise.options }
|
|
48
|
-
its(:redirect_url) { is_expected.to eq 'http://localhost:9292/callback_url' }
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
describe '#raw_info' do
|
|
53
|
-
it 'sent request to current user endpoint' do
|
|
54
|
-
expect(access_token).to receive(:get).with('api/v4/user').and_return(response)
|
|
55
|
-
expect(subject.raw_info).to eq(parsed_response)
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
describe '#callback_url' do
|
|
60
|
-
let(:base_url) { 'https://example.com' }
|
|
61
|
-
|
|
62
|
-
context 'no script name present' do
|
|
63
|
-
it 'has the correct default callback path' do
|
|
64
|
-
allow(subject).to receive(:full_host) { base_url }
|
|
65
|
-
allow(subject).to receive(:script_name) { '' }
|
|
66
|
-
allow(subject).to receive(:query_string) { '' }
|
|
67
|
-
expect(subject.callback_url).to eq(base_url + '/auth/gitlab/callback')
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
context 'script name' do
|
|
72
|
-
it 'should set the callback path with script_name' do
|
|
73
|
-
allow(subject).to receive(:full_host) { base_url }
|
|
74
|
-
allow(subject).to receive(:script_name) { '/v1' }
|
|
75
|
-
allow(subject).to receive(:query_string) { '' }
|
|
76
|
-
expect(subject.callback_url).to eq(base_url + '/v1/auth/gitlab/callback')
|
|
77
|
-
end
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|
data/spec/spec_helper.rb
DELETED