-
Notifications
You must be signed in to change notification settings - Fork 688
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
Added Rails 5.0 support #252
Conversation
3dedf54
to
2c2a57e
Compare
@danielmorrison Please note that, according it its A question that the owners of this gem should answer, however, is whether |
88112de
to
5944758
Compare
All tests are now passing and this is ready to merge. |
4b9ac80
to
9e3df9f
Compare
@danielmorrison Could you also clarify the current support status for Rails 4.0 and 4.1? The
But is silent on 4.0 and 4.1, which are still tested by Travis CI in the master branch. I took care to make sure the tests for 4.0 and 4.1 continue to pass when making my edits, but I'm not sure if you plan on abandoning support for these versions when 5.0 is released, have already done so, or only quasi-support them. In any case I think it's probably advisable to state the current policy in If For now I changed the |
9e3df9f
to
c5d8a02
Compare
d44c726
to
305c2d6
Compare
Update: I'm marking this PR as ready to merge since there are no known regressions and Until a new release of
|
efeb441
to
1221f0a
Compare
- Modified gemspec version requirements - Added appraisal for Rails 5.0 - Modified Rspec tests to pass under Rails 5.0 - Made minor modifications to library to support Rails 5.0 - Including adding support for ActionController::API - Resolved deprecation warnings - Reconfigured Travis CI config - Added Rails 5.0 Gemfile - Added Ruby 2.2.2, 2.3.0, ruby-head - Moved DB creation to spec/support/active_record/schema.rb - Updated README.md to reflect new version support
1221f0a
to
4d4799c
Compare
@danielmorrison FYI, going through the changelogs, I just came across definitive proof here that Also, @danielmorrison, do you happen to have any ETA on reviewing of this PR? I only ask because you expressed willingness to personally write this entire thing yourself nearly two weeks ago, so I was hoping you had time.. Please let me know what, if any, changes/clarifications you'd like made or any questions I can answer. |
@danielmorrison PS: I know I had been editing it endlessly, so apologies if you were waiting on me to stop, but I swear I'm done now (barring new, as-of-yet undiscovered issues with the PR). :-p |
@danielmorrison would it be possible to get this PR reviewed? I understand if you may be hesitant to merge it just quite yet because it has to point to the master branch of rails-observers (pending the next release of that gem, which I am following up on as it was promised almost a month ago). That said, considering the tentative dates for the RC(s) and subsequent initial release for Rails 5 are rapidly approaching (both scheduled for later in February), it would be ideal to get a jump start on any changes/revisions you might want made to this PR before you consider it worthy to be merged. Ideally, it is obviously preferable to allow as much time as possible between the introduction of Rails 5 compatibility in |
@@ -217,7 +217,8 @@ def write_audit(attrs) | |||
def require_comment | |||
if auditing_enabled && audit_comment.blank? | |||
errors.add(:audit_comment, "Comment required before destruction") | |||
return false | |||
return false if Rails.version.start_with?('4.') | |||
throw :abort |
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.
why the throw :abort
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.
See this comment to the PR.
@mvastola great work. Sorry for the delay, my free time has been limited lately. I had one question, otherwise this looks good to me! |
From activerecord/CHANGELOG.md for Rails 5:
|
Cool. I learned something new! |
Thanks for reviewing. I actually hadn't meant for you to merge just yet since I'm running into hurdles getting a version of |
PS: I understand your time is super limited, but if you have any insight such that you could lend at rails/rails-observers#41 it would be greatly appreciated. Barring that, a comment from you on the PR as the owner of this gem might facilitate my receiving some assistance from the maintainers (whose most recent response time is 29 days and counting). Thanks! |
Ha, well master can be wonky for a few days. I'll take a peek later today. |
Thanks. The only "wonkiness" is rependencies won't resolve correctly if someone is pulling Which is to say, their app would have to inherently be rather "wonky" before we got involved in order for this edge-case to apply and cause this issue. |
Now that Rails 5 is out, will a new release be cut? Or are we waiting on rails-observers? |
👍 |
I plan to look into it this afternoon and see what (if anything) is still missing. |
I cut a new PR #276 for a release, but If you want to try with Rails 5 today, use:
and let me know on the PR if you have any problems! |
Great @danielmorrison! @rafaelfranca is planning to release a new version of rails-observers in "the next days". rails/rails-observers@876c522 |
👍 |
When this got bumped last night, I tried to fix the merge conflicts, but doing so in the most straightforward manner seems to have unfixed this bug. I'm working on updating the PR and then it should be good on my end for @rafaelfranca to push. |
Resolves #249.
Note: As
rails-observers
has not yet released a version with Rails 5.0 compatibility (theappraisals
Gemfile
in this PR points to a commit inrails-observers
Github), but can still be merged without issue. To be used with Rails 5.0, any application containing a version ofaudited
in itsGemfile
with this PR merged will also need the following entry:This
rails50
appraisal in this repository should be updated to point torails-observers
on RubyGems once a version is released that is compatible with Rails 5.0.