Skip to content

Commit

Permalink
fix elm spec issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kbukum1 committed Dec 26, 2024
1 parent c6c4cf1 commit e011e28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions elm/lib/dependabot/elm/package_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ class PackageManager < Dependabot::Ecosystem::VersionManager

sig do
params(
raw_version: String,
raw_version: T.nilable(String),
requirement: T.nilable(Requirement)
).void
end
def initialize(raw_version, requirement = nil)
super(
PACKAGE_MANAGER,
nil,
Version.new(raw_version),
raw_version ? Version.new(raw_version) : nil,
DEPRECATED_ELM_VERSIONS,
SUPPORTED_ELM_VERSIONS,
requirement,
Expand Down
7 changes: 5 additions & 2 deletions updater/lib/dependabot/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,13 @@ def record_ecosystem_meta(ecosystem)
def version_manager_json(version_manager)
return nil unless version_manager

raw_version = version_manager.version&.to_semver.to_s
version = version_manager.version&.to_semver.to_s

{
name: version_manager.name,
raw_version: version_manager.version&.to_semver.to_s,
version: version_manager.version&.to_s,
raw_version: raw_version.empty? ? "N/A" : raw_version,
version: version.empty? ? "N/A" : version,
requirement: version_manager_requirement_json(version_manager)
}
end
Expand Down

0 comments on commit e011e28

Please sign in to comment.