lib/license_scout/collector.rb in license_scout-0.1.2 vs lib/license_scout/collector.rb in license_scout-0.1.3

- old
+ new

@@ -76,13 +76,13 @@ def license_manifest_path File.join(output_dir, "#{project_name}-dependency-licenses.json") end def collect_licenses_from(dependency_manager) - license_manifest_data[:dependency_managers][dependency_manager.name] = [] - dependency_manager.dependencies.each do |dep| + license_manifest_data[:dependency_managers][dep.dep_mgr_name] ||= [] + license_data = { name: dep.name, version: dep.version, license: dep.license, license_files: [], @@ -99,10 +99,10 @@ FileUtils.cp(license_file, output_license_path) license_data[:license_files] << output_license_filename end - license_manifest_data[:dependency_managers][dependency_manager.name] << license_data + license_manifest_data[:dependency_managers][dep.dep_mgr_name] << license_data end end def all_dependency_managers