Skip to content
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

Rails 5 Support, Require ruby 2.0 #303

Merged
merged 12 commits into from
Feb 3, 2016
Merged

Conversation

jhawthorn
Copy link
Collaborator

Alternative to #284 #290 #302. Thanks to @pigeonworks @halostatue and @gagalago whose work this is based on. I tried to credit as best as possible using cherry-picks and the changelog.

This code will form the basis of paranoia 2.2.0. This explicitly requires ruby >= 2.0, which we stopped testing against in 2.1.2, but probably still worked. Because of the ruby 2.0 requirement we are now testing against jruby 9.0.5.0, which required a change because of inconsistent behaviour of alias vs alias_method. Currently jruby doesn't seem to work with rails 5.0.0.beta1.1, so that combination is an allowed failure on travis.

I am merging this into the rails4 branch, which I am going to maintain as a branch compatible with both rails 4 and rails 5. I might rename the branch master to avoid confusion (and because I don't want to work on the rails3 branch other than bug fixes).

jhawthorn and others added 12 commits February 1, 2016 19:54
alias defines these on ActiveRecord::Base itself, which is not what was
intended. This behaviour previous differed between MRI and jruby.
We are switching to support of ruby 2.0 and greater. We will only
support jruby OVER 9000 for feature parity.
It is unnecessary to test the AR internals here. Testing the
where_values_hash should be sufficient.
In rails 4.x this passed around a set of arel conditions, in rails 5 it
passes around an AR::Relation and uses where().

See rails/rails@5f521cb
Also updates ruby versions
Just for consitency. alias_method is easier to reason about than
only_deleted.
jhawthorn added a commit that referenced this pull request Feb 3, 2016
Rails 5 Support, Require ruby 2.0
@jhawthorn jhawthorn merged commit 8f6a10e into rubysherpas:rails4 Feb 3, 2016
@halostatue
Copy link
Contributor

Thanks, @jhawthorn. This is excellent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants