Files
news.gitea.happylizard.me/bin/gems/facets-3.1.0/lib/standard/facets/gem/search.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

19 lines
429 B
Ruby

require 'facets/gem/specification/current_specs'
module Gem
# Search RubyGems for matching paths in current gem versions.
def self.search(match, options={})
matches = []
Gem::Specification.current_specs.each do |spec|
glob = File.join(spec.lib_dirs_glob, match)
list = Dir[glob] #.map{ |f| f.untaint }
list = list.map{ |d| d.chomp('/') }
matches.concat(list)
end
matches
end
end