php-mf2 tests are comprehensive https://github.com/indieweb/php-mf2/blob/master/tests/Mf2/URLTest.php
Activity
veganstraightedge commentedon May 5, 2017
I think this should be created at a standalone gem that this gem then depends on.
veganstraightedge commentedon May 11, 2017
@aaronpk said he'd take this on and would build it as a stand alone gem.
This gem would then need to depend upon and use it.
aaronpk commentedon May 11, 2017
Hmm this gem might already do it: https://github.com/sporkmonger/addressable Take a look at the "join" method.
veganstraightedge commentedon May 11, 2017
For reference, @aaronpk is talking about this method.
https://github.com/sporkmonger/addressable/blob/8f4fee07243af0b788c625e59a9ca529489336d6/lib/addressable/uri.rb#L306
veganstraightedge commentedon May 11, 2017
At quick glance, seems good.
I'll leave it up to implementors to decide whether to use that or create a new gem (if addressable) ends up to be insufficient.
jgarber623 commentedon Jul 5, 2018
I've just recently abstracted some similarly duplicative code from my own projects into the Absolutely gem which relies on Addressable under-the-hood.
I'll add some more test cases from @aaronpk's aforelinked php-mf2 test suite for completeness.
jgarber623 commentedon Jul 5, 2018
…and done! Absolutely v1.1.0 adds tests from the php-mf2 URL test suite.
veganstraightedge commentedon Jul 5, 2018
@jgarber623 You have the Absolutely repo tagged
absolute-ur. Maybe you meantabsolute-ur?https://github.com/topics/absolute-ur
vs
https://github.com/topics/absolute-url
jgarber623 commentedon Jul 6, 2018
@veganstraightedge Good catch. Thanks!