lib/spandx/dotnet/parsers/csproj.rb in spandx-0.11.0 vs lib/spandx/dotnet/parsers/csproj.rb in spandx-0.12.0

- old
+ new

@@ -2,11 +2,11 @@ module Spandx module Dotnet module Parsers class Csproj < ::Spandx::Core::Parser - def self.matches?(filename) + def matches?(filename) ['.csproj', '.props'].include?(File.extname(filename)) end def parse(lockfile) ProjectFile @@ -17,23 +17,14 @@ private def map_from(package_reference) ::Spandx::Core::Dependency.new( + package_manager: :nuget, name: package_reference.name, version: package_reference.version, - licenses: licenses_for(package_reference) + meta: package_reference ) - end - - def licenses_for(package_reference) - nuget - .licenses_for(package_reference.name, package_reference.version) - .map { |x| catalogue[x] } - end - - def nuget - @nuget ||= NugetGateway.new(catalogue: catalogue) end end end end end