-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
323: upgrade to rails 5.1 #324
Merged
Merged
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4fc3050
323: Use explicit params in controller specs
mikevallano afd88e4
323: Don't call open directly, but with URI.open instead
mikevallano 543704c
323: Specify error to be raised
mikevallano dc54b71
323: Uniq is deprecated. Use distinct instead
mikevallano a93bb15
323: Upgrade rails to 5.1
mikevallano 37c13b5
323: Go through app:update, make changes and tweak specs
mikevallano 6702ef8
323: Specify rails version in migrations
mikevallano d27af42
323: Load dependencies in production
mikevallano 4a525a2
323: Add back mailer config
mikevallano 6c2d9ae
323: Fix devise depreciation warnings
mikevallano b99ebe4
323: Fix ruby keyword arg deprecation warnings
mikevallano 278f943
323: Remove unneded new_framework_defaults_5_1.rb
mikevallano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
!/log/.keep | ||
/tmp | ||
|
||
.DS_Store | ||
rubberduck.txt | ||
tester.rb | ||
tester2.rb | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//= link_tree ../images | ||
//= link_directory ../javascripts .js | ||
//= link_directory ../stylesheets .css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class RegistrationsController < Devise::RegistrationsController | ||
prepend_before_filter :require_no_authentication, only: [:new, :create, :cancel] | ||
prepend_before_filter :authenticate_scope!, only: [:edit, :update, :destroy] | ||
prepend_before_action :require_no_authentication, only: [:new, :create, :cancel] | ||
prepend_before_action :authenticate_scope!, only: [:edit, :update, :destroy] | ||
after_action :add_queue | ||
|
||
# GET /resource/sign_up | ||
|
@@ -71,7 +71,7 @@ def update | |
:update_needs_confirmation : :updated | ||
set_flash_message :notice, flash_key | ||
end | ||
sign_in resource_name, resource, bypass: true | ||
bypass_sign_in(resource) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was because of devise deprecation warning |
||
respond_with resource, location: after_update_path_for(resource) | ||
else | ||
clean_up_passwords resource | ||
|
@@ -169,4 +169,4 @@ def add_queue | |
resource.lists.create(name: "my queue", is_main: true, description: "My first list.") | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<h2>Resend confirmation instructions</h2> | ||
|
||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %> | ||
<%= devise_error_messages! %> | ||
<%= render "devise/shared/error_messages", resource: resource %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolve devise deprecation warning |
||
|
||
<div class="field"> | ||
<%= f.label :email %><br /> | ||
<%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> | ||
<%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %> | ||
</div> | ||
|
||
<div class="actions"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
begin | ||
load File.expand_path('../spring', __FILE__) | ||
rescue LoadError => e | ||
raise unless e.message.include?('spring') | ||
end | ||
APP_PATH = File.expand_path('../../config/application', __FILE__) | ||
APP_PATH = File.expand_path('../config/application', __dir__) | ||
require_relative '../config/boot' | ||
require 'rails/commands' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
#!/usr/bin/env ruby | ||
begin | ||
load File.expand_path('../spring', __FILE__) | ||
rescue LoadError => e | ||
raise unless e.message.include?('spring') | ||
end | ||
require_relative '../config/boot' | ||
require 'rake' | ||
Rake.application.run |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know what the difference between a
before_action
and aprepend_before_action
was, so I looked it up.A
prepend_before_action
runs before abefore_action
. There are nobefore_action
s in this controller, so it seems like these prepends could just be regularbefore_action
s. 🤔Since we're dealing with Devise stuff, and I am not sure of the order of loading or any including that may be happening between controllers, I feel hesitant to make that change. Of course, if the Devise docs say this is the way, then this is the way. I'll do a deeper dive on that in a bit. I've got 80 more files to investigate...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I looked and that's the default Devise code: https://github.com/heartcombo/devise/blob/main/app/controllers/devise/registrations_controller.rb