Sha256: 3bc6dba83198f4fff5e4dd75f7949f8fb4aa93a22248a2bd1b267903fb548928

Contents?: true

Size: 719 Bytes

Versions: 22

Compression:

Stored size: 719 Bytes

Contents

# frozen_string_literal: true

module LicenseFinder
  class BundlerPackage < Package
    def initialize(spec, bundler_def, options = {})
      children = spec.dependencies.map(&:name)
      groups = Array(bundler_def && bundler_def.groups).map(&:to_s)

      super(
        spec.name,
        spec.version.to_s,
        options.merge(
          authors: Array(spec.authors).join(', '),
          summary: spec.summary,
          description: spec.description,
          homepage: spec.homepage,
          children: children,
          groups: groups,
          spec_licenses: spec.licenses,
          install_path: spec.full_gem_path
        )
      )
    end

    def package_manager
      'Bundler'
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
license_finder-5.5.1 lib/license_finder/packages/bundler_package.rb
license_finder-5.5.0 lib/license_finder/packages/bundler_package.rb