mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
Normalize cataloger configuration patterns (#2365)
* normalize cataloger patterns Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove central reference for maven configurable Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
@@ -4,23 +4,24 @@ Package ruby provides a concrete Cataloger implementation relating to packages w
|
||||
package ruby
|
||||
|
||||
import (
|
||||
"github.com/anchore/syft/syft/pkg"
|
||||
"github.com/anchore/syft/syft/pkg/cataloger/generic"
|
||||
)
|
||||
|
||||
// NewGemFileLockCataloger returns a new Bundler cataloger object tailored for parsing index-oriented files (e.g. Gemfile.lock).
|
||||
func NewGemFileLockCataloger() *generic.Cataloger {
|
||||
func NewGemFileLockCataloger() pkg.Cataloger {
|
||||
return generic.NewCataloger("ruby-gemfile-cataloger").
|
||||
WithParserByGlobs(parseGemFileLockEntries, "**/Gemfile.lock")
|
||||
}
|
||||
|
||||
// NewInstalledGemSpecCataloger returns a new Bundler cataloger object tailored for detecting installations of gems (e.g. Gemspec).
|
||||
func NewInstalledGemSpecCataloger() *generic.Cataloger {
|
||||
func NewInstalledGemSpecCataloger() pkg.Cataloger {
|
||||
return generic.NewCataloger("ruby-installed-gemspec-cataloger").
|
||||
WithParserByGlobs(parseGemSpecEntries, "**/specifications/**/*.gemspec")
|
||||
}
|
||||
|
||||
// NewGemSpecCataloger looks for gems without the additional requirement of the gem being installed.
|
||||
func NewGemSpecCataloger() *generic.Cataloger {
|
||||
func NewGemSpecCataloger() pkg.Cataloger {
|
||||
return generic.NewCataloger("ruby-gemspec-cataloger").
|
||||
WithParserByGlobs(parseGemSpecEntries, "**/*.gemspec")
|
||||
}
|
||||
Reference in New Issue
Block a user