-
Notifications
You must be signed in to change notification settings - Fork 153
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
Fix deprecation warnings #26
Conversation
…some cases). It's optional and only used by us for testing, so it doesn't show up in the gemspec
…heck for interactions with them.
…to make sure the created fixtures are valid with all the rules enforced
…nd a bug in newer versions
… simplify the code
…ere indirectly saving a user (by saving a dependent object) would trigger an activesupport deprecation warning.
…lly simplify the logic. Also adds a compatibility module to deal with API changes in the rails dirty attribute handling
… API for testing changed between 4.2 and 5.0
Pull Request Test Coverage Report for Build 63
💛 - Coveralls |
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.
This is a great pull request. Thank you for your work. Because there are so many changes I'd like to have @oniofchaos look at it as well before merging.
@@ -24,4 +24,10 @@ | |||
I18n.enforce_available_locales = false | |||
|
|||
config.active_support.test_order = :sorted | |||
config.log_level = :debug | |||
if Rails.version < '5' | |||
# TODO: this needs to be addressed |
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.
What needs to be addressed here?
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.
If I don't set this config in rails 4.2, it will raise a deprecation warning. I'm not entirely sure there is more to do here or if that warning is just intended to warn people about about a change in behavior.
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 don't think a TODO here is appropriate, as there's nothing to fix. Instead, a comment explaining why this is needed for older Rails would be good.
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.
It was more of a reminder to myself that I forgot to remove.
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.
Looks like the test suite is bombing out?
@@ -37,3 +37,4 @@ log | |||
test/tmp/* | |||
*.gem | |||
Gemfile.lock | |||
*.lock |
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.
What's this for?
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.
Appraisal generates Gemfiles in the /gemfiles directory. We don't want to check in their lock files. The same way you don't check in Gemfile.lock files
@@ -0,0 +1,22 @@ | |||
module Devise | |||
module Models | |||
module Compatibility |
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.
Nice!
module PasswordArchivable | ||
extend ActiveSupport::Concern | ||
include Devise::Models::DatabaseAuthenticatable |
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.
Can you alphabetize these?
@@ -24,4 +24,10 @@ | |||
I18n.enforce_available_locales = false | |||
|
|||
config.active_support.test_order = :sorted | |||
config.log_level = :debug | |||
if Rails.version < '5' | |||
# TODO: this needs to be addressed |
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 don't think a TODO here is appropriate, as there's nothing to fix. Instead, a comment explaining why this is needed for older Rails would be good.
@olbrich Looks good. Thank you! I'll just note here that the test coverage only decreased because of the refactoring of the migration code. We should probably exclude some of those files in the future. |
This branch does the following:
fixes #22