adzap / validates_timeliness

Date and time validation plugin for ActiveModel and Rails. Supports multiple ORMs and allows custom date/time formats.
MIT License
1.59k stars 227 forks source link

[6.x] Add Ruby 3.0 and Rails 6.1 compatibility #194

Closed tagliala closed 3 years ago

tagliala commented 3 years ago

Includes changes in #191

Rails 6.1 needs the following changes:

Ruby 3 needs the following changes:

Ref:

Fix: #193

tagliala commented 3 years ago

Everything is green, there are interesting failures with ruby-edge

https://travis-ci.org/github/adzap/validates_timeliness/jobs/750986791

Failure/Error:
       def initialize(year:, month:, day: nil, hour: nil, min: nil, sec: nil)
         @year, @month, @day, @hour, @min, @sec = year, month, day, hour, min, sec
       end

     ArgumentError:
       wrong number of arguments (given 1, expected 0; required keywords: year, month)

I cannot reproduce them with Ruby 3.0.0 on my dev machine

Also, Travis does not have Ruby 3.0.0-rc1

tagliala commented 3 years ago

Working also on Ruby 3.0 compatibility

tagliala commented 3 years ago

FWIW, this gem is still compatible with Ruby 2.4

tagliala commented 3 years ago

Not yet, since the Readme needs to be updated, I'm going to integrate #185

tagliala commented 3 years ago

Preview of the new readme: https://github.com/tagliala/validates_timeliness/tree/rails-61#validatestimeliness-

tomasztrzos commented 3 years ago

When are you planning to merge this pull request?

slomagnieszka commented 3 years ago

Do you have a plan to merge it?

itay-grudev commented 3 years ago

@adzap This MR seems to cover all the checks to get merged.

tagliala commented 3 years ago

~Not yet at the moment, it needs some updates~ Updated to fix tests against Rails edge

pedrofurtado commented 3 years ago

@adzap Any news about this issue? Happy to see this merged and released asap 🎉 🍻

StoneGod commented 3 years ago

Hi, what about released?

adzap commented 3 years ago

@tagliala thanks for getting this together. But I will need a few changes. Please remove the Rdoc conversion, which we can look at that later.

Also, this will be for v6 of the gem which will be for Rails v6.x only, so the v5 appraisals and travis config should be removed.

adzap commented 3 years ago

@tagliala excellent work! so many little tweaks and fixes in the README I'd missed because of the markdown conversion.

pedrofurtado commented 3 years ago

@adzap Happy to see this released in official version for us 🍻 🎉

adzap commented 3 years ago

Looking for feedback from those using the alpha release. A number of you were quite eager for it, so in order to get a final release I would like some confirmation of successful usage.

itay-grudev commented 3 years ago

Can we add automatic testing to the repository in addition to the automatic builds? Also I will add a ticket on our project to upgrade it on production.

adzap commented 3 years ago

We already do via Travis.

itay-grudev commented 3 years ago

It's just called build and I thought it's for gem build and publish instead of testing.

adzap commented 3 years ago

What's it called in other repos? Can you give me an example of some others that are perhaps more up to date?