Skip to content
This repository has been archived by the owner on Mar 21, 2020. It is now read-only.

Commit

Permalink
Bump clearance from 1.16.1 to 1.16.2 (#265)
Browse files Browse the repository at this point in the history
* Bump clearance from 1.16.1 to 1.16.2

Bumps [clearance](https://github.com/thoughtbot/clearance) from 1.16.1 to 1.16.2.
- [Release notes](https://github.com/thoughtbot/clearance/releases)
- [Changelog](https://github.com/thoughtbot/clearance/blob/master/NEWS.md)
- [Commits](thoughtbot/clearance@v1.16.1...v1.16.2)

Signed-off-by: dependabot[bot] <[email protected]>

* Add clearance routes directly and stop setting domain myself so it works in local dev too
  • Loading branch information
dependabot[bot] authored and coreyja committed Mar 16, 2019
1 parent 1bf83e9 commit 0a10f88
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
7 changes: 5 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ GEM
selenium-webdriver
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
clearance (1.16.1)
clearance (1.16.2)
actionmailer (>= 3.1)
activemodel (>= 3.1)
activerecord (>= 3.1)
bcrypt
email_validator (~> 1.4)
rails (>= 3.1)
railties (>= 3.1)
clockwork (2.0.3)
tzinfo
coderay (1.1.2)
Expand Down
4 changes: 0 additions & 4 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,4 @@ def authentication
def user
authentication.user
end

def params
request.parameters
end
end
2 changes: 1 addition & 1 deletion config/initializers/clearance.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

Clearance.configure do |config|
config.cookie_domain = '.tracker.coreyja.com'
config.routes = false
config.mailer_sender = '[email protected]'

config.rotate_csrf_on_sign_in = true
Expand Down
13 changes: 13 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# frozen_string_literal: true

Rails.application.routes.draw do
resources :passwords, controller: "clearance/passwords", only: [:create, :new]
resource :session, controller: "sessions", only: [:create]

resources :users, controller: "clearance/users", only: [:create] do
resource :password,
controller: "clearance/passwords",
only: [:create, :edit, :update]
end

get "/sign_in" => "sessions#new", as: "sign_in"
delete "/sign_out" => "sessions#destroy", as: "sign_out"
get "/sign_up" => "clearance/users#new", as: "sign_up"

root 'static#index'

get '/auth/:provider/callback' => 'sessions#create_from_omniauth'
Expand Down
3 changes: 1 addition & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
add_foreign_key "push_notification_registrations", "users"
add_foreign_key "tracking_updates", "packages"

create_view "newest_tracking_updates", sql_definition: <<-SQL
create_view "newest_tracking_updates", sql_definition: <<-SQL
SELECT DISTINCT ON (tracking_updates.package_id) tracking_updates.id,
tracking_updates.package_id,
tracking_updates.message,
Expand All @@ -128,5 +128,4 @@
FROM tracking_updates
ORDER BY tracking_updates.package_id, tracking_updates.tracking_updated_at DESC;
SQL

end

0 comments on commit 0a10f88

Please sign in to comment.