Skip to content

Commit ee6164d

Browse files
cgreenoclaude
andcommitted
feat(ruby): emit dependency relationships from Gemfile.lock
Parse each gem's dependency list from Gemfile.lock into a new RubyGemfileLockEntry metadata type and use the shared dependency.Processor to resolve dependency-of relationships between locked gems, matching the pattern used by the other lockfile catalogers (elixir, python, rust, ...). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Chris Greeno <cgreeno@gmail.com>
1 parent 656a4d4 commit ee6164d

13 files changed

Lines changed: 4840 additions & 20 deletions

File tree

internal/constants.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package internal
33
const (
44
// JSONSchemaVersion is the current schema version output by the JSON encoder
55
// This is roughly following the "SchemaVer" guidelines for versioning the JSON schema. Please see schema/json/README.md for details on how to increment.
6-
JSONSchemaVersion = "16.1.8"
6+
JSONSchemaVersion = "16.1.9"
77

88
// Changelog
99
// 16.1.0 - reformulated the python pdm fields (added "URL" and removed the unused "path" field).
@@ -15,4 +15,5 @@ const (
1515
// 16.1.6 - add Dependencies to ElixirMixLockEntry metadata
1616
// 16.1.7 - add AppleAppBundleEntry metadata type for the apple app bundle cataloger
1717
// 16.1.8 - add VcpkgManifest metadata type for vcpkg manifest support
18+
// 16.1.9 - add RubyGemfileLockEntry metadata type for Gemfile.lock dependency relationships
1819
)

internal/packagemetadata/generated.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ func AllTypes() []any {
6565
pkg.RDescription{},
6666
pkg.RpmArchive{},
6767
pkg.RpmDBEntry{},
68+
pkg.RubyGemfileLockEntry{},
6869
pkg.RubyGemspec{},
6970
pkg.RustBinaryAuditEntry{},
7071
pkg.RustCargoLockEntry{},

internal/packagemetadata/names.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ var jsonTypes = makeJSONTypes(
8080
jsonNames(pkg.DpkgArchiveEntry{}, "dpkg-archive-entry"),
8181
jsonNames(pkg.DpkgDBEntry{}, "dpkg-db-entry", "DpkgMetadata"),
8282
jsonNames(pkg.ELFBinaryPackageNoteJSONPayload{}, "elf-binary-package-note-json-payload"),
83+
jsonNames(pkg.RubyGemfileLockEntry{}, "ruby-gemfile-lock-entry"),
8384
jsonNames(pkg.RubyGemspec{}, "ruby-gemspec", "GemMetadata"),
8485
jsonNames(pkg.GitHubActionsUseStatement{}, "github-actions-use-statement"),
8586
jsonNames(pkg.GolangBinaryBuildinfoEntry{}, "go-module-buildinfo-entry", "GolangBinMetadata", "GolangMetadata"),

0 commit comments

Comments
 (0)