Closed justenwalker closed 11 years ago
This is really cool.
However, each adapter should be able to have its own versioning system. For example, semver is not going to work for the Chef adapter, just like rubygems versioning system won't work for the Puppet adapter.
What I would like to do is first abstract Librarian::Manifest::Version
and Librarian::Dependency::Requirement
to use a strategy pattern, where the chosen strategy is selected by the environment object. Then I would be happy to merge in a semver strategy alongside the rubygems strategy into Librarian. Adapters can then opt in to any strategy that ships with Librarian, or ship with their own strategy instead.
@yfeldblum Good point. I've tried to do the visioning part of this in PR #152. We can take the discussion there.
Problem Summary
Semver 2.0.0 prerelease section cannot be parsed by Gem::Version and causes an exception at run-time when parsing the manifest of modules that include it.
This is causing issues in a downstream project rodjek/librarian-puppet. I've attempted to apply a patch there, but it is really related this gem. I figured it would be best to add this feature to upstream as well. I spent some extra time re-factoring it to be more readable.
Changes