Refactor semver support to match up-stream patch to libraian gem