ice_cube: Schedule String incorrect under Ruby 3.0
Consider the following schedule:
first_trigger_at = Time.now.utc
schedule = IceCube::Schedule.new(first_trigger_at) do |schedule|
schedule.add_recurrence_rule(
IceCube::Rule.weekly.day(
:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday
)
)
end
Under Ruby 2.7, this correctly describes itself:
schedule.to_s
=> "Weekly on Sundays, Mondays, Tuesdays, Wednesdays, Thursdays, Fridays, and Saturdays"
Under Ruby 3.0, to_s
behaves incorrectly
schedule.to_s
=> "%{rest} %{current}"
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 17 (3 by maintainers)
@seejohnrun - Another request for an updated release please! We just upgraded to Ruby 3, and now have to load this gem from the master branch. 🙏🏻
@seejohnrun any chance you might be able to cut a release that includes 66f1d79 so we can have Ruby 3 support please?
I’d be interested in seeing 66f1d79 in a new release too if you get a chance. I’ll use the gem via Git for now.
Cheers folks!
Alright … the fork is dead and I’m now a co-maintainer on this repo helping @seejohnrun keep this thing alive and kicking 😃
John has already pushed out a new build (version 0.16.4) which includes everything already in
master
. Consequently this issue is resolved on the current release of the gem.Ruby 3 will cause the argument error. As a temp workaround, I added an initializer with this:
Naturally this loses i18n, but in my case it’s not a big deal.
~OK - I got fed up and just did it.~
~If you’d like any PRs/issues etc addressed on the new gem, please create them against the new repo. If you’re interested in also becoming a maintainer please get in touch. It would be really nice to avoid this getting blocked again in the way it has done here.~
~This initial release includes everything currently in the
seejohnrun/ice_cube
master branch. Aside from renaming your usage fromIceCube::
toIceCubed::
everything else should just work.~Hmm, but the last comments there are from about a year ago now. I very much appreciate the work seejohnrun has been doing, but I think it’s a bit of a shame if people are willing to take up maintainership, but aren’t able to do so.