sources: factor out Source::URL::Foundation.

Add support for a couple more URL types:

* https://foundation.app/@asuka111art/dinner-with-cats-82426
* https://f8n-production-collection-assets.imgix.net/0x3B3ee1931Dc30C1957379FAc9aba94D1C48a5405/128711/QmcBfbeCMSxqYB3L1owPAxFencFx3jLzCPFx6xUBxgSCkH/nft.png

Also include these URLs in the list of profile URLs:

* https://foundation.app/0x7E2ef75C0C09b2fc6BCd1C68B6D409720CcD58d2 (for https://foundation.app/@mochiiimo)

These URLs should be stable even if the user changes their name.
This commit is contained in:
evazion
2022-02-23 23:16:11 -06:00
parent 043c08eb05
commit ffe52f5ead
4 changed files with 203 additions and 44 deletions

View File

@@ -20,6 +20,7 @@ module Source
SUBCLASSES = [
Source::URL::Twitter,
Source::URL::TwitPic,
Source::URL::Foundation,
]
# Parse a URL into a subclass of Source::URL, or raise an exception if the URL is not a valid HTTP or HTTPS URL.