RolifyCommunity / rolify

Role management library with resource scoping
https://rolifycommunity.github.io/rolify/
MIT License
3.16k stars 404 forks source link

support Rails 5.2 and Ruby 2.4 + 2.5 #490

Closed tierra closed 6 years ago

tierra commented 6 years ago

In the interest of keeping the build matrix sane, this drops support for Ruby 2.0 and 2.1 (both EOL currently) while adding 2.4 and 2.5.

Also bumps a minimum required major version of Bundler and Rake.

tierra commented 6 years ago

I'm not sure how useful/appropriate it is to add 2.4 and 2.5 coverage for ActiveRecord 3.x and Mongoid 3.x, but I guess we'll find out shortly how the Travis builds perform there.

I know Mongoid is out with 7.x now, but I didn't jump into updates there.

tierra commented 6 years ago

Didn't spot this until now, but related: #471

tierra commented 6 years ago

Rails 3.2 with Ruby 2.4+ certainly didn't even come close to working, so I took some cues from changes in #471, and just removed Rails 3.x and Mongoid 3.x support, and also added Mongoid 6.x coverage now (7.x is still needed, but I didn't address that for now).

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.1%) to 92.959% when pulling 491f57dc1b4f6145d9026d299f5d589ca341758e on tierra:master into c05551d8dee3ad85b9c0e450155dbf81887f1a7c on RolifyCommunity:master.

tierra commented 6 years ago

Potentially related open issues: #489, #332 (time to close as unsupported?)

heyfadii commented 6 years ago

Is this going to be merged soon? We're facing issues with roles not being saved after adding them to users. cheers fadi

wldcordeiro commented 6 years ago

This can be merged, we would need to release a major version bump here to indicate the backwards incompatible changes. I'll be merging this and working on that.

wldcordeiro commented 6 years ago

@tierra thank you for the PR by the way, apologies for the delay, I have not been doing much active ruby development and hadn't had as much time for OSS. It's great to see someone help move the library forward.

tierra commented 6 years ago

Thanks @wldcordeiro for pushing this through!

@fabu-gharbieh This change doesn't touch any actual application logic. The gem and specs all passed fine with newer Ruby and Rails. So it sounds like you have an unrelated problem.

heyfadii commented 6 years ago

Thanks a lot @wldcordeiro and @tierra! I am facing the same problem as described here: https://github.com/RolifyCommunity/rolify/issues/489 And there is a reference to this thread. I am using mongoid 7.0.1 though.