Skip to content

Commit

Permalink
Merge pull request #540 from DefactoSoftware/dependabot/bundler/devis…
Browse files Browse the repository at this point in the history
…e-4.7.1

Bump devise from 3.5.10 to 4.7.1
  • Loading branch information
jurre authored Jan 22, 2020
2 parents 86c6b89 + 88b7d1d commit 1669b04
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ gem "simple_form"
gem "title"
gem "uglifier"
gem "unicorn"
gem "devise", "~> 3.5.2"
gem "devise_invitable", "~> 1.5.5"
gem "devise", "~> 4.7.1"
gem "devise_invitable"
gem "apartment", "~> 0.26.0"
gem "pikaday-gem", "~> 1.2.0.0"
gem "momentjs-rails"
Expand Down
25 changes: 12 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ GEM
aws-sigv4 (~> 1.0)
aws-sigv2 (1.0.1)
aws-sigv4 (1.0.2)
bcrypt (3.1.11)
bcrypt (3.1.13)
better_errors (2.5.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
Expand Down Expand Up @@ -645,16 +645,15 @@ GEM
delayed_job_active_record (4.0.3)
activerecord (>= 3.0, < 5.0)
delayed_job (>= 3.0, < 4.1)
devise (3.5.10)
devise (4.7.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
railties (>= 4.1.0)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise_invitable (1.5.5)
actionmailer (>= 3.2.6, < 5)
devise (>= 3.2.0)
devise_invitable (1.7.5)
actionmailer (>= 4.1.0)
devise (>= 4.0.0)
diff-lcs (1.3)
docile (1.1.5)
dotenv (0.11.1)
Expand Down Expand Up @@ -795,15 +794,15 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.19.0)
rake (12.3.2)
rake (13.0.1)
rbtree3 (0.5.0)
recipient_interceptor (0.1.2)
mail
redcarpet (3.4.0)
regexp_parser (1.6.0)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
Expand Down Expand Up @@ -912,8 +911,8 @@ DEPENDENCIES
dalli
database_cleaner
delayed_job_active_record (= 4.0.3)
devise (~> 3.5.2)
devise_invitable (~> 1.5.5)
devise (~> 4.7.1)
devise_invitable
dotenv-rails
email_spec
email_validator
Expand Down
14 changes: 9 additions & 5 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Expand All @@ -10,8 +12,8 @@ class ApplicationController < ActionController::Base
protected

def configure_permitted_parameters
devise_parameter_sanitizer.for(:accept_invitation).
concat([:first_name, :last_name])
devise_parameter_sanitizer.permit(:accept_invitation,
keys: %i[first_name last_name])
end

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

def current_subdomain
@current_subdomain ||=
current_account.subdomain unless Hours.single_tenant_mode?
unless Hours.single_tenant_mode?
@current_subdomain ||=
current_account.subdomain
end
end

def current_user_owner?
Expand All @@ -40,7 +44,7 @@ def current_account
end

def load_schema
Apartment::Tenant.switch("public")
Apartment::Tenant.switch('public')
return unless request.subdomain.present?

if current_account
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

include TimeSeriesInitializer

class UsersController < ApplicationController
Expand Down
2 changes: 1 addition & 1 deletion app/views/application/_navbar.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
%input#modal-1.modal-state{:type => "checkbox"}/
= render 'modal'
%li.devider
%li= link_to t("sign_out"), destroy_user_session_path
%li= link_to t("sign_out"), destroy_user_session_path, method: :delete
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
# config.navigational_formats = ["*/*", :html]

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

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

0 comments on commit 1669b04

Please sign in to comment.