Skip to content

Guard against empty rules set#22

Merged
darkphnx merged 2 commits into
masterfrom
16-undefined-method-in-ical_filter_proxyrb
Dec 20, 2022
Merged

Guard against empty rules set#22
darkphnx merged 2 commits into
masterfrom
16-undefined-method-in-ical_filter_proxyrb

Conversation

@darkphnx

Copy link
Copy Markdown
Owner

This PR guards against an empty rules set as seen in #16.

To prevent things getting a bit hairy in the IcalFitlerProxy#calendars method, I've split that out into it's own builder class. This should also make it easier to add additional pieces of configuration such as required in #18.

Once refactored, it was simply a case of adding a guard clause to IcalFilterProxy::CalendarBuilder#add_rules to prevent treating a nil as an array.

@darkphnx darkphnx linked an issue Dec 20, 2022 that may be closed by this pull request
@darkphnx darkphnx merged commit c45529d into master Dec 20, 2022
@darkphnx darkphnx deleted the 16-undefined-method-in-ical_filter_proxyrb branch December 20, 2022 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Undefined method in ical_filter_proxy.rb

1 participant