* Only suggest the Danbooru tag with the same name if there is no
matching wiki other name. Example: if we have the Pixiv tag `Fate` and
the Danbooru tag `fate_(series)` with other name `fate`, suggest that,
not the Danbooru tag `fate`.
* Don't suggest tags that are empty or whose wiki is deleted.
* Only split tags on "/" if there are no other matches, and only for Pixiv.
* For Pixiv, only include traditional media tags in tag list, not digital media (Photoshop, SAI).
* Add some tests.
Fix random VCR failures in Pixiv tests.
Sometimes tests randomly fail because the PHPSESSID they use in their
HTTP requests to Pixiv is different than the one that was originally
recorded by VCR. This causes VCR to complain that the requests don't
match.
This is caused by the PHPSESSID being globally cached in Memcache.
Depending on the order the tests run in (which is random), one set of
tests can use a PHPSESSID that was recorded for a /different/ set of
tests.
Improve Pixiv URL matching.
* Allow URLs that are missing the http:// part. These are sometimes seen
in artist entries.
* Ignore URLs from random Pixiv domains such as dic.pixiv.net,
blog.pixiv.net, etc. These are also sometimes in artist entries.
Improve normalize_for_artist_finder! URL matching.
* Normalize www.pixiv.net/stacc/username URLs.
* Correctly normalize URLs that are missing the illust ID part on the end
(i.e. http://i2.pixiv.net/img04/img/syounen_no_uta/). These are common
in artist entries.
Match URLs strictly when normalizing for artist entries.
Only normalize Pixiv URLs that strictly match a known format. Pass any
unrecognized URLs through without attempting to normalize them, just to
be safe.
Normalize URLs when saving artist entries.
Refactors things such that Sources::Site has a normalize_for_artist_finder!
method that delegates to the strategy for the appropriate site. This way
any site that needs to normalize URLs for the artist finder can do so.
Currently this is done twice: once when the page first loads (although
this one isn't used) and then a second time asynchronously with
javascript (which is used). This commit removes the first one, improving
upload page load time.