any_login icon indicating copy to clipboard operation
any_login copied to clipboard

Test with Ruby 2.7 and 3.0

Open aried3r opened this issue 4 years ago • 9 comments

This should also test the latest patch versions of Ruby available on Travis CI.

Btw, since this gem supports Ruby 1.9.3 and above, should we try to test older versions as well?

aried3r avatar Jan 11 '21 18:01 aried3r

Ruby 2.7 and 3.0 fail because they want to use Bundler 2.x and not 1.7. However because the Gemfile.lock requires Rails 4, it's locked to < 2.

Should we try to use appraisal to test all versions of Rails or would you be open to dropping EOL Rails and Ruby versions going forward? Existing versions of the gem would keep working of course.

aried3r avatar Jan 11 '21 19:01 aried3r

@aried3r I think we can drop the support of older versions of ruby/rails. You can change PR and I'll merge it.

thank you for your contribution.

igorkasyanchuk avatar Jan 11 '21 20:01 igorkasyanchuk

With Rails 6.1 and Ruby 3.0 released, which should be the oldest version to be supported?

Rails 5.2 and Ruby 2.5?

aried3r avatar Jan 11 '21 20:01 aried3r

yes, it should be fine

but please put a note about an older version of rails/ruby and a version of this gem that works with it.

igorkasyanchuk avatar Jan 11 '21 21:01 igorkasyanchuk

It's not as easy as I hoped. The dependencies are often one or more major versions behind, the dummy Rails apps don't work anymore once you update Rails because of deprecated configs etc. It's quite a bit more involved. I wonder what the best way to proceed would be, any ideas?

aried3r avatar Jan 13 '21 12:01 aried3r

https://github.com/igorkasyanchuk/active_storage_validations/pull/102/files

maybe you can try to use this approach, with combustion gem.

You can see that @StefSchenkelaars did an interesting job and migrated dummy app

igorkasyanchuk avatar Jan 13 '21 13:01 igorkasyanchuk

And migrated to github actions

igorkasyanchuk avatar Jan 13 '21 13:01 igorkasyanchuk

Hey! I think I got in a little over my head when I wanted to add testing with Ruby 2.7 and 3.0. At the moment I don't have time to look into this more closely and rewrite the tests in such a fashion. I can't promise if and when I'll have time to look into this more closely, sorry :\

Meanwhile, paper_trail also has an interesting approach, not using the combustion gem, but loading the proper defaults in tests. https://github.com/paper-trail-gem/paper_trail/pull/1274/files#diff-62f2f3ca9910ae96167479b8902e8a31042bc91c013066f4b4d72d555ea501d5R14

aried3r avatar Feb 01 '21 12:02 aried3r

Hi @aried3r, I'm ok with any approach. If you can make it works (dummy app and tests) is OK for me.

igorkasyanchuk avatar Feb 01 '21 18:02 igorkasyanchuk

@igorkasyanchuk I went ahead and gave this a go in #46, that one should close this one if my changes are acceptable.

rbclark avatar Aug 25 '22 15:08 rbclark

@rbclark please resolve the conflict and I'll merge.

Thanks for creating a PR

igorkasyanchuk avatar Aug 25 '22 18:08 igorkasyanchuk

@igorkasyanchuk With my other PR merged this should be safe to close since it adds 2.7, 3.0, and 3.1.

rbclark avatar Aug 25 '22 19:08 rbclark

Closed, thanks

igorkasyanchuk avatar Aug 26 '22 18:08 igorkasyanchuk