Sha256: 54bf116bcea6f3e40670cacfe5e47606924bbf92edad05c6b1c18ef688857445

Contents?: true

Size: 520 Bytes

Versions: 9

Compression:

Stored size: 520 Bytes

Contents

module LicenseFinder
  class NpmPackage < Package
    def initialize(spec, options={})
      super(
        spec["name"],
        spec["version"],
        options.merge(
          description: spec["description"],
          homepage: spec["homepage"],
          spec_licenses: Package.license_names_from_standard_spec(spec),
          install_path: spec["path"],
          children: spec.fetch("dependencies", {}).map { |_, d| d["name"] }
        )
      )
    end

    def package_manager
      'Npm'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
license_finder-3.0.0 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.2 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.1 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.0 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.0.rc9 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.0.rc8 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.0.rc7 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.0.rc6 lib/license_finder/package_managers/npm_package.rb
license_finder-2.1.0.rc5 lib/license_finder/package_managers/npm_package.rb