Skip to content

Commit

Permalink
Merge pull request #2068 from geeksforsocialchange/ik-1985-support-ge…
Browse files Browse the repository at this point in the history
…neric-ical-feeds

Supporting generic iCal feeds
  • Loading branch information
ivan-kocienski-gfsc authored Sep 21, 2023
2 parents f6e9b0f + 6fd3a6f commit 3f0b24a
Show file tree
Hide file tree
Showing 4 changed files with 369 additions and 7 deletions.
15 changes: 8 additions & 7 deletions app/jobs/calendar_importer/parsers/ics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ class Ics < Base

def self.allowlist_pattern
allowlists = {
gcal: %r{http(s)?://calendar.google.com\.*},
outlook: %r{http(s)?://outlook.(office365|live).com/owa/calendar/.*},
webcal: %r{webcal://},
mossley: %r{http(s)?://mossleycommunitycentre.org.uk},
theproudtrust: %r{http(s)?://www.theproudtrust.org},
teamup: %r{http(s)?://ics.teamup.com/feed/.*},
consortium: %r{https://www.consortium.lgbt/events/.*}
gcal: %r{^https?://calendar\.google\.com.*},
outlook: %r{^https?://outlook\.(office365|live)\.com/owa/calendar/.*},
webcal: %r{^webcal://},
mossley: %r{^https?://mossleycommunitycentre\.org\.uk},
theproudtrust: %r{^https?://www\.theproudtrust\.org},
teamup: %r{^https?://ics\.teamup\.com/feed/.*},
consortium: %r{^https://www\.consortium\.lgbt/events/.*},
generic: %r{^https?://.*\.ics$}
}
Regexp.union(allowlists.values)
end
Expand Down
93 changes: 93 additions & 0 deletions test/fixtures/vcr_cassettes/generic_ical_feed.yml

Large diffs are not rendered by default.

Loading

0 comments on commit 3f0b24a

Please sign in to comment.