devise_g5_authenticatable 1.0.2.rc.1 → 1.0.2.rc.2

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: ad0eee25a4da3d85235fb21e4e0faae07e09debedf49e94fb7a02935936842c8
4
- data.tar.gz: 98401d80d28e50845b8617362ee778ba0d62fb1c6f2b11840470d3ed808b7f5c
3
+ metadata.gz: c067c7d918fd55154bae4b5e4e806d7b1f5d0b2c04b577874af118493c110814
4
+ data.tar.gz: 0d8c7dc8a43e3a89df88f62fd431d575ba4797ad9cbc9dcda30598f870724bd7
5
5
  SHA512:
6
- metadata.gz: 2482e59fdd4ea7835a75f6c096d85d6fd51b4b207b7cb1cb856944da96ee687f7e49ace5b5d02c0beecb956c560e0ad2083768c3362ca57eb0aa0bbbc83db116
7
- data.tar.gz: 3c7c5cea38df574c91065854aa7774c39d75cf581c3ab1635737e890a12095b90af08b371bba352f2c5ada5b71257ca0787409d1ca7580e62e50cd61b7de91a7
6
+ metadata.gz: 1ff77d6f4d550e2d6ffe66f5d2d3a5931b3ecd94bd4118bb58c14073291641998ad72a7475c34ea2bb62145e08ad9449b1d7fb6827e3081a43f3e93b45158cbd
7
+ data.tar.gz: e3b67044ef47951292f8158f38ecfd31587164ab0c8e13cc2e6dba42ced0e1205b2cb5d0af549532bfcc3e7c2474c7097003c45fd8c9169eecccd69109a51306
data/Gemfile CHANGED
@@ -16,7 +16,6 @@ group :test, :development do
16
16
  gem 'appraisal'
17
17
  gem 'pry-byebug'
18
18
  gem 'rspec-rails', '~> 3.6'
19
- gem 'rb-readline'
20
19
  end
21
20
 
22
21
  group :test do
@@ -17,7 +17,8 @@ module DeviseG5Authenticatable
17
17
  if authorized?
18
18
  sign_in_or_register
19
19
  else
20
- redirect_to(restricted_application_redirect_url)
20
+ params = { restricted: base_url }
21
+ redirect_to(restricted_application_redirect_url + params.to_query)
21
22
  end
22
23
  end
23
24
 
@@ -30,7 +31,11 @@ module DeviseG5Authenticatable
30
31
  protected
31
32
 
32
33
  def authorized?
33
- accessible_applications.map(&:url).include?(request.base_url) || accessible_applications.map(&:url).include?('global')
34
+ accessible_applications.map(&:url).include?(base_url) || accessible_applications.map(&:url).include?('global')
35
+ end
36
+
37
+ def base_url
38
+ request.base_url
34
39
  end
35
40
 
36
41
  def accessible_applications
@@ -66,7 +71,7 @@ module DeviseG5Authenticatable
66
71
  end
67
72
 
68
73
  def remote_sign_out
69
- redirect_url = URI.join(request.base_url,
74
+ redirect_url = URI.join(base_url,
70
75
  after_sign_out_path_for(resource_name))
71
76
  redirect_to auth_client.sign_out_url(redirect_url.to_s)
72
77
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeviseG5Authenticatable
4
- VERSION = '1.0.2.rc.1'
4
+ VERSION = '1.0.2.rc.2'
5
5
  end
@@ -193,7 +193,8 @@ RSpec.describe DeviseG5Authenticatable::SessionsController do
193
193
 
194
194
  it 'should redirect the user to the restricted_application_redirect_url' do
195
195
  create_session
196
- expect(subject).to redirect_to(auth_hash.extra.raw_info.restricted_application_redirect_url)
196
+ params = { restricted: subject.request.base_url }
197
+ expect(subject).to redirect_to(auth_hash.extra.raw_info.restricted_application_redirect_url + params.to_query)
197
198
  end
198
199
 
199
200
  it 'should not sign in a user' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_g5_authenticatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2.rc.1
4
+ version: 1.0.2.rc.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maeve Revels
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-29 00:00:00.000000000 Z
11
+ date: 2019-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise