omniauth-google-oauth2 0.8.1 → 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: fcec58e2424446306a5ff766699234f2d6c171da2b709112769b99e72a203eaf
4
- data.tar.gz: fcf68a4790a7309cd50d7c0b0e13bb53f0229fcc051fad60166d8d14b927d9f6
3
+ metadata.gz: 278efb11e955abf864c2d163e1f1631a271ba34660fa166a4f65b56691ccab0d
4
+ data.tar.gz: 574e6d6b5f3dacfa271ba24a8999e104c74db64482860b6ba095938a6dc7c1b0
5
5
  SHA512:
6
- metadata.gz: 99cd674b184a20ee2ff2c5da1a98e4a692aad4c0e739882da60338c9519d72828d440c0a375fd6c248651b7dd365f35800dabe3be28282e8e11ea425274dc0d1
7
- data.tar.gz: d06b35c2f70c7680a9963edff13cc9e3e417ffca216dc7b46d6074ff01ec4207f41ae59b9251e5f91213ad39c0065b1f049450688b8cabdbc709acabc405090c
6
+ metadata.gz: 22006de20bc8355329cdca2c9e41a15959e192dcd4c970d1ca6acc8dd149f0fb1eedc313351cc39072e51ea5b219ebb6968b2e178995397d14f58b5117b18c53
7
+ data.tar.gz: b54fe6ca226e39f05705837eb8a390247df3a4fc615c7aab798009b63fd830ad7c21df7536ffa9fefffc4ff6c3586c6067ba5d15ac4d192b88892b3080c753f6
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  language: ruby
2
+ cache: bundler
2
3
  rvm:
3
4
  - '2.3.4'
4
5
  - '2.4.1'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,34 @@
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
+
18
+ ## 0.8.2 - 2021-03-14
19
+
20
+ ### Added
21
+ - Constrains the version to Omniauth 1.x.
22
+
23
+ ### Deprecated
24
+ - Nothing.
25
+
26
+ ### Removed
27
+ - Nothing.
28
+
29
+ ### Fixed
30
+ - Nothing.
31
+
4
32
  ## 0.8.1 - 2020-12-12
5
33
 
6
34
  ### Added
@@ -14,6 +42,7 @@ All notable changes to this project will be documented in this file.
14
42
 
15
43
  ### Fixed
16
44
  - A few minor issues with .rubocop.yml.
45
+ - Issues with image resizing code when the image came with size information from Google.
17
46
 
18
47
  ## 0.8.0 - 2019-08-21
19
48
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module GoogleOauth2
5
- VERSION = '0.8.1'
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.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.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Ellithorpe
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-13 00:00:00.000000000 Z
12
+ date: 2021-03-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jwt
@@ -43,30 +43,30 @@ dependencies:
43
43
  name: omniauth
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ">="
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 1.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.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