omniauth-google-oauth2 0.8.2 → 1.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: 4ae37f010a59a4e3aa4d2bbcf10e6830808aa32809d5d7c2e30d3b8405ae1782
4
- data.tar.gz: 9d54467c9b9706bd8c6a83e4dc94be050732ca34258a831dcbb1d45c048911f3
3
+ metadata.gz: 278efb11e955abf864c2d163e1f1631a271ba34660fa166a4f65b56691ccab0d
4
+ data.tar.gz: 574e6d6b5f3dacfa271ba24a8999e104c74db64482860b6ba095938a6dc7c1b0
5
5
  SHA512:
6
- metadata.gz: 0142ef5ce5f44561d8dc7d35609fe6025866b459ed8d6c1611162e134ab85a01c1fa3f4f5d0938917451d705dce855eaed44c42431e697e108f884b344e39c5a
7
- data.tar.gz: bedcbdd0a9ba9c8b8003a0f2af346dcde8cfdaa6d8163475d1ddc8c8dac2f5501a0b17f27118b36c9b889113e4045a3c94276e78d561a1c35e4a20a6aa41fb0d
6
+ metadata.gz: 22006de20bc8355329cdca2c9e41a15959e192dcd4c970d1ca6acc8dd149f0fb1eedc313351cc39072e51ea5b219ebb6968b2e178995397d14f58b5117b18c53
7
+ data.tar.gz: b54fe6ca226e39f05705837eb8a390247df3a4fc615c7aab798009b63fd830ad7c21df7536ffa9fefffc4ff6c3586c6067ba5d15ac4d192b88892b3080c753f6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## 1.0.0 - 2021-03-14
5
+
6
+ ### Added
7
+ - Support for Omniauth 2.x!
8
+
9
+ ### Deprecated
10
+ - Nothing.
11
+
12
+ ### Removed
13
+ - Support for Omniauth 1.x
14
+
15
+ ### Fixed
16
+ - Nothing.
17
+
4
18
  ## 0.8.2 - 2021-03-14
5
19
 
6
20
  ### Added
@@ -10,10 +24,10 @@ All notable changes to this project will be documented in this file.
10
24
  - Nothing.
11
25
 
12
26
  ### Removed
13
- - Nothing
27
+ - Nothing.
14
28
 
15
29
  ### Fixed
16
- - Nothing
30
+ - Nothing.
17
31
 
18
32
  ## 0.8.1 - 2020-12-12
19
33
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module GoogleOauth2
5
- VERSION = '0.8.2'
5
+ VERSION = '1.0.0'
6
6
  end
7
7
  end
@@ -102,7 +102,7 @@ module OmniAuth
102
102
  private
103
103
 
104
104
  def callback_url
105
- options[:redirect_uri] || (full_host + script_name + callback_path)
105
+ options[:redirect_uri] || (full_host + callback_path)
106
106
  end
107
107
 
108
108
  def get_access_token(request)
@@ -22,8 +22,8 @@ Gem::Specification.new do |gem|
22
22
 
23
23
  gem.add_runtime_dependency 'jwt', '>= 2.0'
24
24
  gem.add_runtime_dependency 'oauth2', '~> 1.1'
25
- gem.add_runtime_dependency 'omniauth', '~> 1.1'
26
- gem.add_runtime_dependency 'omniauth-oauth2', '>= 1.6'
25
+ gem.add_runtime_dependency 'omniauth', '~> 2.0'
26
+ gem.add_runtime_dependency 'omniauth-oauth2', '~> 1.7.1'
27
27
 
28
28
  gem.add_development_dependency 'rake', '~> 12.0'
29
29
  gem.add_development_dependency 'rspec', '~> 3.6'
@@ -289,14 +289,26 @@ describe OmniAuth::Strategies::GoogleOauth2 do
289
289
  end
290
290
  end
291
291
 
292
- describe '#callback_path' do
292
+ describe '#callback_url' do
293
+ let(:base_url) { 'https://example.com' }
294
+
293
295
  it 'has the correct default callback path' do
294
- expect(subject.callback_path).to eq('/auth/google_oauth2/callback')
296
+ allow(subject).to receive(:full_host) { base_url }
297
+ allow(subject).to receive(:script_name) { '' }
298
+ expect(subject.send(:callback_url)).to eq(base_url + '/auth/google_oauth2/callback')
299
+ end
300
+
301
+ it 'should set the callback path with script_name if present' do
302
+ allow(subject).to receive(:full_host) { base_url }
303
+ allow(subject).to receive(:script_name) { '/v1' }
304
+ expect(subject.send(:callback_url)).to eq(base_url + '/v1/auth/google_oauth2/callback')
295
305
  end
296
306
 
297
307
  it 'should set the callback_path parameter if present' do
298
308
  @options = { callback_path: '/auth/foo/callback' }
299
- expect(subject.callback_path).to eq('/auth/foo/callback')
309
+ allow(subject).to receive(:full_host) { base_url }
310
+ allow(subject).to receive(:script_name) { '' }
311
+ expect(subject.send(:callback_url)).to eq(base_url + '/auth/foo/callback')
300
312
  end
301
313
  end
302
314
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-google-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Ellithorpe
@@ -45,28 +45,28 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '1.1'
48
+ version: '2.0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '1.1'
55
+ version: '2.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: omniauth-oauth2
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ">="
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '1.6'
62
+ version: 1.7.1
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ">="
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '1.6'
69
+ version: 1.7.1
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rake
72
72
  requirement: !ruby/object:Gem::Requirement