Object
# File rbs-2.1.0/lib/rbs/collection/sources/git.rb, line 23 def has?(config_entry) gem_name = config_entry['name'] gem_repo_dir.join(gem_name).directory? end
# File rbs-2.1.0/lib/rbs/collection/sources/git.rb, line 33 def install(dest,, config_entry,, stdout)) gem_name = config_entry['name'] version = config_entry['version'] or raise gem_dir = dest.join(gem_name, version) if gem_dir.directory? if (prev = YAML.load_file(gem_dir.join(METADATA_FILENAME))) == config_entry stdout.puts "Using #{format_config_entry(config_entry)}" else # @type var prev: RBS::Collection::Config::gem_entry stdout.puts "Updating to #{format_config_entry(config_entry)} from #{format_config_entry(prev)}" FileUtils.remove_entry_secure(gem_dir.to_s) _install(dest: dest, config_entry: config_entry) end else stdout.puts "Installing #{format_config_entry(config_entry)}" _install(dest: dest, config_entry: config_entry) end end
# File rbs-2.1.0/lib/rbs/collection/sources/git.rb, line 53 def manifest_of(config_entry) gem_name = config_entry['name'] version = config_entry['version'] or raise gem_dir = gem_repo_dir.join(gem_name, version) manifest_path = gem_dir.join('manifest.yaml') YAML.safe_load(manifest_path.read) if manifest_path.exist? end