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-6.3.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.2.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.1.2 lib/license_finder/packages/bundler_package.rb
license_finder-6.1.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.0.0 lib/license_finder/packages/bundler_package.rb
license_finder-5.11.1 lib/license_finder/packages/bundler_package.rb
license_finder-5.11.0 lib/license_finder/packages/bundler_package.rb
license_finder-5.10.2 lib/license_finder/packages/bundler_package.rb
license_finder-5.10.1 lib/license_finder/packages/bundler_package.rb
license_finder-5.10.0 lib/license_finder/packages/bundler_package.rb
license_finder-5.9.2 lib/license_finder/packages/bundler_package.rb
license_finder-5.9.1 lib/license_finder/packages/bundler_package.rb
license_finder-5.9.0 lib/license_finder/packages/bundler_package.rb
license_finder-5.8.0 lib/license_finder/packages/bundler_package.rb
license_finder-5.7.1 lib/license_finder/packages/bundler_package.rb
license_finder-5.7.0 lib/license_finder/packages/bundler_package.rb
license_finder-5.6.2 lib/license_finder/packages/bundler_package.rb
license_finder-5.6.1 lib/license_finder/packages/bundler_package.rb
license_finder-5.6.0 lib/license_finder/packages/bundler_package.rb
license_finder-5.5.2 lib/license_finder/packages/bundler_package.rb