Closed simonszu closed 6 years ago
The error seems to originate in some code which you wrote and I can't see, so I can't help you. If you need help understanding what's going on in the code, probably most convenient is to open a PR and mark it with "[WIP]" (work in progress, not intended to be merged yet) in the title.
The error seems to originate in some code which you wrote and I can't see
No, it doesn't. I have double checked if this issue appears in master as well. This is the line where it occurs. https://github.com/igneus/calendarium-romanum/blob/master/lib/calendarium-romanum/cli.rb#L37
Ouch, you are right and I see what's the problem: some ranks (the most prominent ones) don't have #short_desc
defined. The line should be changed to
rank_length = day.celebrations.collect {|c| c.rank.short_desc.size || '' }.max
don't have #short_desc defined.
It's actually not true. In such cases #short_desc
is, of course, defined (all ranks are instances of the same class Rank
), but it returns nil
.
OK, great. I am rewriting the query method anyways, so i think i can implement this as well in a single PR. But not before monday... ;)
On Fri, Oct 6, 2017, 16:42 Jakub Pavlík notifications@github.com wrote:
Ouch, you are right and I see what's the problem: some ranks (the most prominent ones) don't have #short_desc defined. The line should be changed to
rank_length = day.celebrations.collect {|c| c.rank.short_desc.size || '' }.max
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/igneus/calendarium-romanum/issues/10#issuecomment-334775170, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqxI0w7dGYOOMhycsx9ReQ3w5bEG3B-ks5spjxvgaJpZM4Pwf0X .
-- Before printing this email, think if it is really needed.
I have begun with implementing range querying for the CLI command. During testing i have noticed that some dates throw an exception when querying.
Some examples:
The same thing happens for example on 2016-12-04, 2015-12-06, etc, this is the first (second?) advent in each year. I am not familiar with the data format of the underlying sanctorale file, so i cannot fix it myself but open this issue for now.