omniauth-goto 1.0.0 → 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
  SHA256:
3
- metadata.gz: beb46e6950bfc736270558d1bc862c2b0493d7b56b79c8034225fe846c220740
4
- data.tar.gz: 2c9fe4122a1eccfcd9e211790505546ae089509b6c5877d5698879678b174943
3
+ metadata.gz: 7b9a82265a7a9a5d993866dc38140130f28d8d551b754f54a532e2368890f345
4
+ data.tar.gz: 8f920fe2a3b092e3b7036c99e8129a33990a980adb875410fa06082a98272790
5
5
  SHA512:
6
- metadata.gz: f0580bf0b7f5676cf58328ad8c53d805ab0fb97d2dbc12d23d95293d42112ec2f7d19062d20a4897f963cc02298a29b73111a3c42a14f8c6bec633d1b9310a0b
7
- data.tar.gz: 9615925e4a4f949d9197e959bf8983b8f2d001a7af7a3fa872f04a92bff0c05afb3978ac3899c0a12045a7ed90df0a4e02fbf2a478f4292d7e584a9d5d854f3f
6
+ metadata.gz: d390e0cf496f0c4daae47ee265e2d7bd21d78d4bcb89dad345e2a9589e3d62254a7b4e0ca22d0dfdadd7c60cc181e06d9c295af4bffc9b1b52a470650f2d7705
7
+ data.tar.gz: 1a87acba8048c1a28ff88bd4d0f75ec2996af93d7f5664b717e073d2b34f8cfc000755c926ee861cc65ca49d6e184c99064de4b5c7f5bb54cbc1dafead23f15b
@@ -7,10 +7,10 @@ jobs:
7
7
  runs-on: ubuntu-latest
8
8
  strategy:
9
9
  matrix:
10
- ruby-version: ["2.4", "2.5", "2.6", "2.7"]
10
+ ruby-version: ["3.0", "3.1", "3.2", "3.3"]
11
11
 
12
12
  steps:
13
- - uses: actions/checkout@v2
13
+ - uses: actions/checkout@v3
14
14
  - name: Set up Ruby ${{ matrix.ruby-version }}
15
15
  uses: ruby/setup-ruby@v1
16
16
  with:
data/.gitignore CHANGED
@@ -15,3 +15,5 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ .ruby-version
19
+ .DS_Store
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.1.2
1
+ ruby-3.3.0
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  This is the official OmniAuth strategy for authenticating to GoTo. To
6
6
  use it, you'll need to sign up for an OAuth2 Client ID and Secret
7
- on the [GoTo Developer Page](https://community.servicenow.com/community?id=community_blog&sys_id=56086e4fdb9014146064eeb5ca961957).
7
+ on the [GoTo Developer Page](https://developer.logmeininc.com/clients).
8
8
 
9
9
  ## Installation
10
10
 
@@ -74,7 +74,7 @@ module OmniAuth
74
74
  end
75
75
 
76
76
  def callback_url
77
- full_host + script_name + callback_path
77
+ options.redirect_url || (full_host + callback_path)
78
78
  end
79
79
 
80
80
  def basic_auth_header(client_id, client_secret)
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module GoTo
3
- VERSION = "1.0.0"
3
+ VERSION = "2.0.0"
4
4
  end
5
5
  end
@@ -16,8 +16,11 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
  gem.version = OmniAuth::GoTo::VERSION
18
18
 
19
- gem.add_dependency 'omniauth', '~> 1.5'
19
+ gem.required_ruby_version = ">= 3"
20
+
21
+ gem.add_dependency 'omniauth', '~> 2.0.0'
20
22
  gem.add_dependency 'omniauth-oauth2', '>= 1.4.0', '< 2.0'
23
+
21
24
  gem.add_development_dependency 'rspec', '~> 3.5'
22
25
  gem.add_development_dependency 'rack-test'
23
26
  gem.add_development_dependency 'simplecov'
@@ -51,4 +51,26 @@ describe OmniAuth::Strategies::GoTo do
51
51
  end
52
52
  end
53
53
  end
54
+
55
+ describe '#callback_url' do
56
+ let(:base_url) { 'https://example.com' }
57
+
58
+ context 'no script name present' do
59
+ it 'has the correct default callback path' do
60
+ allow(subject).to receive(:full_host) { base_url }
61
+ allow(subject).to receive(:script_name) { '' }
62
+ allow(subject).to receive(:query_string) { '' }
63
+ expect(subject.callback_url).to eq(base_url + '/auth/goto/callback')
64
+ end
65
+ end
66
+
67
+ context 'script name' do
68
+ it 'should set the callback path with script_name' do
69
+ allow(subject).to receive(:full_host) { base_url }
70
+ allow(subject).to receive(:script_name) { '/v1' }
71
+ allow(subject).to receive(:query_string) { '' }
72
+ expect(subject.callback_url).to eq(base_url + '/v1/auth/goto/callback')
73
+ end
74
+ end
75
+ end
54
76
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-goto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quentin Rousseau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-02 00:00:00.000000000 Z
11
+ date: 2024-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.5'
19
+ version: 2.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.5'
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +134,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: '0'
137
+ version: '3'
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - ">="
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.3.7
144
+ rubygems_version: 3.5.3
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Official OmniAuth strategy for GoTo.