Using dependabot's file_fetchers
offline
The context for this example is wanting to parse an already existing local clone of a repository, without additional network traffic and without providing configuration to access a potentially private repository, if we already have a clone of it and want to use the functionality that dependabot provides of parsing for the files its ecosystems expect.
This provides an example of how to monkey patch the gem [email protected] to enable the result of the below example that wraps fetcher.files.map(&:name)
, provided in the file_fetchers
README;
puts "Fetched #{fetcher.files.map(&:name)}, at commit SHA-1 '#{fetcher.commit}'"
A quick bundle install
should set you up