module YAVDB::SourceTypes::GitRepo
Public Class Methods
search(file_pattern, repo_url, repo_branch = 'master', with_cache = true)
click to toggle source
# File lib/yavdb/source_types/git_repo.rb, line 23 def self.search(file_pattern, repo_url, repo_branch = 'master', with_cache = true) repo_path = YAVDB::Utils::Git.get_contents(repo_url, repo_branch, with_cache) file_paths = Dir.chdir(repo_path) do Dir.glob(file_pattern).select { |f| File.file?(f) } end Hash[repo_path => file_paths] end