Closed rudle closed 7 years ago
👍
Idea to simplify: get rid of the regex code. Gem::Dependency
already handles this:
Gem::Dependency.new('', '>= 2.1').match?('', '2.2a')
#=> true
So the implementation could just be
def version_match?(requirement, version)
Gem::Dependency.new('', requirement).match?('', version)
end
PRs welcome
We only care about the major version, so we filter out extraneous information.
Fixes #230
I'm not super happy with the ruby regexp API. Any tips to clean up this code would be welcomed.
@ggilder