class Sorbet::Private::FindGemRBIs
def self.main
def self.main FileUtils.mkdir_p(RBI_CACHE_DIR) unless Dir.exist?(RBI_CACHE_DIR) output_file = File.exist?('Gemfile.lock') ? RBI_CACHE_DIR + Digest::MD5.hexdigest(File.read('Gemfile.lock')) : nil return unless output_file gemspecs = Bundler.load.specs.sort_by(&:name) gem_source_paths = T.let([], T::Array[String]) gemspecs.each do |gemspec| gem_source_paths << paths_within_gem_sources(gemspec) end File.write(output_file, gem_source_paths.compact.join("\n")) end
def self.output_file
def self.output_file nil end
def self.paths_within_gem_sources(gemspec)
def self.paths_within_gem_sources(gemspec) gem_rbi = "#{gemspec.full_gem_path}/#{GEM_DIR}" gem_rbi if Dir.exist?(gem_rbi) end