Hi,
I'm trying to get the spec of a gem by name and version. I noticed you
could do this:
spec = Gem::GemPathSearcher.new.find('my_gem')
But GemPathSearcher doesn't appear to allow a version.
I saw this bit in check_command.rb:
dependency = Gem::Dependency.new('my_gem', some_version)
spec = Gem::SourceIndex.from_installed_gems.search(dependency).first
But it felt a bit clunky.
Is there a simpler way?
Regards,
Dan