Skip to content

Commit

Permalink
Merge pull request #171 from luismoriguerra/feat/download-url
Browse files Browse the repository at this point in the history
feat(composer): update download url for Cargo and Composer modules
  • Loading branch information
niravpatel27 authored Jun 25, 2021
2 parents 0e3b862 + 6346380 commit 82f2c50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions internal/modules/cargo/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ func convertCargoPackageToModule(dep CargoPackage) models.Module {
localPath := convertToLocalPath(dep.ManifestPath)

module := models.Module{
Version: dep.Version,
Name: dep.Name,
Root: false,
PackageURL: formatPackageURL(dep),
Version: dep.Version,
Name: dep.Name,
Root: false,
PackageURL: formatPackageURL(dep),
PackageDownloadLocation: dep.Repository,
CheckSum: &models.CheckSum{
Algorithm: models.HashAlgoSHA1,
Value: readCheckSum(dep.ID),
Expand Down
9 changes: 5 additions & 4 deletions internal/modules/composer/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ func (m *composer) getModulesFromComposerLockFile(path string) ([]models.Module,
func convertLockPackageToModule(dep ComposerLockPackage) models.Module {

module := models.Module{
Version: normalizePackageVersion(dep.Version),
Name: getName(dep.Name),
Root: false,
PackageURL: genUrlFromComposerPackage(dep),
Version: normalizePackageVersion(dep.Version),
Name: getName(dep.Name),
Root: false,
PackageURL: genUrlFromComposerPackage(dep),
PackageDownloadLocation: dep.Source.URL,
CheckSum: &models.CheckSum{
Algorithm: models.HashAlgoSHA1,
Value: getCheckSumValue(dep),
Expand Down

0 comments on commit 82f2c50

Please sign in to comment.