pub struct RubyCrawler;Expand description
Ruby/RubyGems ecosystem crawler for discovering gems in Bundler vendor directories or global gem installation paths.
Implementations§
Source§impl RubyCrawler
impl RubyCrawler
Sourcepub async fn get_gem_paths(
&self,
options: &CrawlerOptions,
) -> Result<Vec<PathBuf>, Error>
pub async fn get_gem_paths( &self, options: &CrawlerOptions, ) -> Result<Vec<PathBuf>, Error>
Get gem installation paths based on options.
In local mode, checks vendor/bundle/ruby/*/gems/ first (Bundler
deployment layout), but only if Gemfile or Gemfile.lock exists
in the cwd. Falls back to querying gem env gemdir.
In global mode, queries gem env gemdir and gem env gempath, plus
well-known fallback paths for rbenv, rvm, Homebrew, and system Ruby.
Sourcepub async fn crawl_all(&self, options: &CrawlerOptions) -> Vec<CrawledPackage>
pub async fn crawl_all(&self, options: &CrawlerOptions) -> Vec<CrawledPackage>
Crawl all discovered gem paths and return every package found.
Sourcepub async fn find_by_purls(
&self,
gem_path: &Path,
purls: &[String],
) -> Result<HashMap<String, CrawledPackage>, Error>
pub async fn find_by_purls( &self, gem_path: &Path, purls: &[String], ) -> Result<HashMap<String, CrawledPackage>, Error>
Find specific packages by PURL inside a single gem directory.
Gem directories follow the <name>-<version> pattern.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RubyCrawler
impl RefUnwindSafe for RubyCrawler
impl Send for RubyCrawler
impl Sync for RubyCrawler
impl Unpin for RubyCrawler
impl UnsafeUnpin for RubyCrawler
impl UnwindSafe for RubyCrawler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more