omniauth-goto 1.0.0 → 2.0.1

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: b1adb55c1665816dfb6d871ee9476733bfc33088ae94f11f18198d84e53254a3
4
+ data.tar.gz: a86e8940050a313266562076c348e218d909e9bf4013d5dc95f11ea7e9263b49
5
5
  SHA512:
6
- metadata.gz: f0580bf0b7f5676cf58328ad8c53d805ab0fb97d2dbc12d23d95293d42112ec2f7d19062d20a4897f963cc02298a29b73111a3c42a14f8c6bec633d1b9310a0b
7
- data.tar.gz: 9615925e4a4f949d9197e959bf8983b8f2d001a7af7a3fa872f04a92bff0c05afb3978ac3899c0a12045a7ed90df0a4e02fbf2a478f4292d7e584a9d5d854f3f
6
+ metadata.gz: aa1980644e13d96afe0dd5d0540e37f875849d6e7c5e93a658189f4dfebec3b0fbbb9a35efaf26fa930c6efd57185654943d34dce8f5ed580f0c8914171fe62d
7
+ data.tar.gz: 97e10e8043a04b96724d39458791ee06547897b6ee5df5a5ab893ff8dda08c754e72eb41f014ed7db9588a5f14bcbc2f657a0cca15999e034e0bd22db46c8f0c
@@ -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.1"
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'
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.1
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-03-29 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'
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'
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.