Closed espen closed 4 years ago
It would be possible only when parent gem, because this gem is coupled to it, not depend on rails itself:
https://github.com/adzap/validates_timeliness/blob/master/Gemfile#L5
That is because the gem was designed to be purposely coupled to Rails. The translation follows and is restricted (at least for a while) to be compatible with Rails itself.
But PR's are always welcome, in order to make it compatible with Rails, but less coupled 🎉 here and in validates_timeliness gem 🤝
I will be happy to review some PR about it 😄 Is there some reason to be less coupled to Rails, considering that the unique use for this gem is together with Rails + timeliness ?
Gemfile is for development/test gems. If you require validates_timeliness with Bundler in a project you see that validates_timeliness is not dependent on rails at all (it is just dependent on timeliness).
I understand that it is used for Rails but the entire Rails suite is not needed. If you see my PR it will run tests and can be used with a simpler requirement for rails gems. I'm using my fork now but would be great if this was merged if there are no issues by changing it :)
I'm trying to get rid of activemailbox and actioncable in my project so I don't want to require the entire Rails gem suite. (In general I want to avoid unused gems but now I'm facing memory leaks after upgrading to Rails 6 so trying to figure out where the problem is)
I'm trying to minimise my rails gem usage but unable to specify exact rails gems due to timeliness-i18n depending on
rails
. Looking quickly at this it seems that a Rails engine is usingrailties
. Would changingrails
dependency torailties
solve this?