mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 07:26:34 +01:00
fix: update ruby classifier for -rc, -dev, etc. versions (#3285)
Signed-off-by: witchcraze <witchcraze@gmail.com>
This commit is contained in:
@@ -850,6 +850,60 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// note: dynamic (non-snippet) test case
|
||||
name: "positive-ruby-3.4.0-dev",
|
||||
logicalFixture: "ruby-shared-libs/3.4.0-dev/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "ruby",
|
||||
Version: "3.4.0dev",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/ruby@3.4.0dev",
|
||||
Locations: locations("ruby", "libruby.so.3.4.0"),
|
||||
Metadata: pkg.BinarySignature{
|
||||
Matches: []pkg.ClassifierMatch{
|
||||
match("ruby-binary", "ruby"),
|
||||
match("ruby-binary", "libruby.so.3.4.0"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// note: dynamic (non-snippet) test case
|
||||
name: "positive-ruby-3.4.0-preview1",
|
||||
logicalFixture: "ruby-shared-libs/3.4.0-preview1/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "ruby",
|
||||
Version: "3.4.0preview1",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/ruby@3.4.0preview1",
|
||||
Locations: locations("ruby", "libruby.so.3.4.0"),
|
||||
Metadata: pkg.BinarySignature{
|
||||
Matches: []pkg.ClassifierMatch{
|
||||
match("ruby-binary", "ruby"),
|
||||
match("ruby-binary", "libruby.so.3.4.0"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// note: dynamic (non-snippet) test case
|
||||
name: "positive-ruby-3.3.0-rc1",
|
||||
logicalFixture: "ruby-shared-libs/3.3.0-rc1/linux-amd64",
|
||||
expected: pkg.Package{
|
||||
Name: "ruby",
|
||||
Version: "3.3.0rc1",
|
||||
Type: "binary",
|
||||
PURL: "pkg:generic/ruby@3.3.0rc1",
|
||||
Locations: locations("ruby", "libruby.so.3.3.0"),
|
||||
Metadata: pkg.BinarySignature{
|
||||
Matches: []pkg.ClassifierMatch{
|
||||
match("ruby-binary", "ruby"),
|
||||
match("ruby-binary", "libruby.so.3.3.0"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
// note: dynamic (non-snippet) test case
|
||||
logicalFixture: "ruby-bullseye-shared-libs/2.7.7/linux-amd64",
|
||||
|
||||
Reference in New Issue
Block a user