libyear-bundler
libyear-bundler copied to clipboard
When missing exact public version, search for closest published version
I'm curious if you would support a feature/change: when an exact-match version cannot be found, to try to find the closest published version.
For example, we will sometimes vendor/cache
gems with a custom version like 3.0.1.pre
or 3.0.1.GITSHA
that are never published, though 3.0.1
has been published.
It would be nice if libyear-bundler
could instead calculate based off of 3.0.1
which has been published, instead of just outputting a 0.0
value.
Hi Ben, I'd be happy to review a PR adding this feature as a CLI option. May I suggest --closest-published
as the option name?
If you tackle this, you might consider a design pattern where there is an array of "matcher strategies". The first strategy would always be "exact match". The --closest-published
option would add another strategy class to said array.
This issue has been automatically marked as stale due to inactivity. The resources of our volunteers are limited. Bug reports must provide a script that reproduces the bug, using our template. Feature suggestions must include a promise to build the feature yourself. Thank you for all your contributions.