tmlee / time_difference

The missing Ruby method to print out time difference (duration) in year, month, week, day, hour, minute, and second.
https://rubygems.org/gems/time_difference
MIT License
305 stars 92 forks source link

ActiveSupport >=5.1 Support #48

Open jmortlock opened 4 years ago

jmortlock commented 4 years ago

Adds support for active support 6, whilst maintaining compatibility with active support 5 and older ruby versions.

AlexWayfer commented 4 years ago

Did you see the #45?

jmortlock commented 4 years ago

Did you see the #45?

Yes I did, the end result of this PR is the same (allow this Gem to be used in Rails 6 projects) however it maintains support with older rails / rubies which seem to be the main objections to merging the referenced PR

jmortlock commented 4 years ago

@tmlee This project still maintained?

AlexWayfer commented 4 years ago

@tmlee This project still maintained?

You can switch to the replace_activesupport_with_tardis_and_dry branch of my fork, if you wish.

tmlee commented 4 years ago

@tmlee This project still maintained?

Yes i will update this gem soon to support newer version of Rails

c2ofh commented 4 years ago

@tmlee Please, that would be great!

kalashnikovisme commented 3 years ago

I've chosen this version of code to be used.

AlexWayfer commented 3 years ago

I've chosen this version of code to be used.

Thank you for let us knowing!

joshuapinter commented 2 years ago

To make it easier for those wishing to use @jmortlock's fork that adds Rails 6 support, you can use this in your Gemfile:

gem "time_difference",                          # Simple TimeDifference operations. NOTE: We use this fork to support Rails 6: https://github.com/tmlee/time_difference/pull/48
    github: "jmortlock/time_difference",
    ref:    "74cfe3fdbf2a50dd80d7c0fdf457bf2b9384edd6"

This locks it to that specific git commit as well to avoid any surprises with bundle update, should the master branch see any further commits.