Skip to content

Commit 1669b04

Browse files
authored
Merge pull request #540 from DefactoSoftware/dependabot/bundler/devise-4.7.1
Bump devise from 3.5.10 to 4.7.1
2 parents 86c6b89 + 88b7d1d commit 1669b04

File tree

6 files changed

+27
-22
lines changed

6 files changed

+27
-22
lines changed

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ gem "simple_form"
2121
gem "title"
2222
gem "uglifier"
2323
gem "unicorn"
24-
gem "devise", "~> 3.5.2"
25-
gem "devise_invitable", "~> 1.5.5"
24+
gem "devise", "~> 4.7.1"
25+
gem "devise_invitable"
2626
gem "apartment", "~> 0.26.0"
2727
gem "pikaday-gem", "~> 1.2.0.0"
2828
gem "momentjs-rails"

Gemfile.lock

+12-13
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ GEM
589589
aws-sigv4 (~> 1.0)
590590
aws-sigv2 (1.0.1)
591591
aws-sigv4 (1.0.2)
592-
bcrypt (3.1.11)
592+
bcrypt (3.1.13)
593593
better_errors (2.5.1)
594594
coderay (>= 1.0.0)
595595
erubi (>= 1.0.0)
@@ -645,16 +645,15 @@ GEM
645645
delayed_job_active_record (4.0.3)
646646
activerecord (>= 3.0, < 5.0)
647647
delayed_job (>= 3.0, < 4.1)
648-
devise (3.5.10)
648+
devise (4.7.1)
649649
bcrypt (~> 3.0)
650650
orm_adapter (~> 0.1)
651-
railties (>= 3.2.6, < 5)
651+
railties (>= 4.1.0)
652652
responders
653-
thread_safe (~> 0.1)
654653
warden (~> 1.2.3)
655-
devise_invitable (1.5.5)
656-
actionmailer (>= 3.2.6, < 5)
657-
devise (>= 3.2.0)
654+
devise_invitable (1.7.5)
655+
actionmailer (>= 4.1.0)
656+
devise (>= 4.0.0)
658657
diff-lcs (1.3)
659658
docile (1.1.5)
660659
dotenv (0.11.1)
@@ -795,15 +794,15 @@ GEM
795794
rake (>= 0.8.7)
796795
thor (>= 0.18.1, < 2.0)
797796
raindrops (0.19.0)
798-
rake (12.3.2)
797+
rake (13.0.1)
799798
rbtree3 (0.5.0)
800799
recipient_interceptor (0.1.2)
801800
mail
802801
redcarpet (3.4.0)
803802
regexp_parser (1.6.0)
804-
responders (2.4.0)
805-
actionpack (>= 4.2.0, < 5.3)
806-
railties (>= 4.2.0, < 5.3)
803+
responders (2.4.1)
804+
actionpack (>= 4.2.0, < 6.0)
805+
railties (>= 4.2.0, < 6.0)
807806
rspec-core (3.8.0)
808807
rspec-support (~> 3.8.0)
809808
rspec-expectations (3.8.2)
@@ -912,8 +911,8 @@ DEPENDENCIES
912911
dalli
913912
database_cleaner
914913
delayed_job_active_record (= 4.0.3)
915-
devise (~> 3.5.2)
916-
devise_invitable (~> 1.5.5)
914+
devise (~> 4.7.1)
915+
devise_invitable
917916
dotenv-rails
918917
email_spec
919918
email_validator

app/controllers/application_controller.rb

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
class ApplicationController < ActionController::Base
24
# Prevent CSRF attacks by raising an exception.
35
# For APIs, you may want to use :null_session instead.
@@ -10,8 +12,8 @@ class ApplicationController < ActionController::Base
1012
protected
1113

1214
def configure_permitted_parameters
13-
devise_parameter_sanitizer.for(:accept_invitation).
14-
concat([:first_name, :last_name])
15+
devise_parameter_sanitizer.permit(:accept_invitation,
16+
keys: %i[first_name last_name])
1517
end
1618

1719
def authenticate_inviter!
@@ -27,8 +29,10 @@ def after_invite_path_for(*)
2729
helper_method :current_subdomain, :current_user_owner?
2830

2931
def current_subdomain
30-
@current_subdomain ||=
31-
current_account.subdomain unless Hours.single_tenant_mode?
32+
unless Hours.single_tenant_mode?
33+
@current_subdomain ||=
34+
current_account.subdomain
35+
end
3236
end
3337

3438
def current_user_owner?
@@ -40,7 +44,7 @@ def current_account
4044
end
4145

4246
def load_schema
43-
Apartment::Tenant.switch("public")
47+
Apartment::Tenant.switch('public')
4448
return unless request.subdomain.present?
4549

4650
if current_account

app/controllers/users_controller.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
include TimeSeriesInitializer
24

35
class UsersController < ApplicationController

app/views/application/_navbar.html.haml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
%input#modal-1.modal-state{:type => "checkbox"}/
3535
= render 'modal'
3636
%li.devider
37-
%li= link_to t("sign_out"), destroy_user_session_path
37+
%li= link_to t("sign_out"), destroy_user_session_path, method: :delete

config/initializers/devise.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
# config.navigational_formats = ["*/*", :html]
270270

271271
# The default HTTP method used to sign out a resource. Default is :delete.
272-
# config.sign_out_via = :get
272+
config.sign_out_via = :delete
273273

274274
# ==> OmniAuth
275275
# Add a new OmniAuth provider. Check the wiki for more information on setting

0 commit comments

Comments
 (0)