Conversation
|
@rubyredrick I had to make some adjustments to allow this to run with a current ruby setup. |
| @@ -0,0 +1,47 @@ | |||
| PATH | |||
There was a problem hiding this comment.
I'd suggest to add the Gemfile.lock to the .gitignore file.
|
|
||
| def period_local_end(period) | ||
| (period.local_end || DateTime.parse("99990101T000000")).strftime("%Y%m%dT%H%M%S") | ||
| (period.local_ends_at&.to_datetime || DateTime.parse("99990101T000000")).strftime("%Y%m%dT%H%M%S") |
There was a problem hiding this comment.
| (period.local_ends_at&.to_datetime || DateTime.parse("99990101T000000")).strftime("%Y%m%dT%H%M%S") | |
| (period.local_ends_at && period.local_ends_at.to_datetime || DateTime.parse("99990101T000000")).strftime("%Y%m%dT%H%M%S") |
As &. is a Ruby 2.6 feature and this gem is really old and most likely used in old services.
If you insist on using it, you should add spec.required_ruby_version = ">= 2.6.0" to the .gemspec and the version should be raised at least by a minor level.
| def period_local_start(period) | ||
| shift = daylight? ? Rational(-1, 24) : Rational(1, 24) | ||
| ((period.local_start || DateTime.parse("16010101T000000")) + shift).strftime("%Y%m%dT%H%M%S") | ||
| ((period.local_starts_at&.to_datetime || DateTime.parse("16010101T000000")) + shift).strftime("%Y%m%dT%H%M%S") |
|
I'm having the same problem. It would be ideal if we could release a new gem (ri_cal_new?). I'd be willing to help. @phoet could you give me access to your fork so I can fix the issues brought up by @mediafinger? |
|
then again, there is https://github.com/icalendar/icalendar, which seems to be maintained. |
|
@langalex did you switch to icalendar? i don't recall why i used ri_cal in the first place... |
|
@phoet i did. works like a charm. |
|
👍 will do the same |
|
merry christmas everyone 🎄 |
based upon rubyredrick/ri_cal#22 (comment) i assume phoet intended to replace the quite outdated ri_cal with icalendar a while ago. so doing it now :)
based upon rubyredrick/ri_cal#22 (comment) i assume phoet intended to replace the quite outdated ri_cal with icalendar a while ago. so doing it now :)
While upgrading to to Rails 6.1 my tests using ri-cal failed. Turns out the upgrade to tz-info 2.0.4 removes / renames a couple of methods.
Does not look like this is still actively maintained, but it might be helpful to others.