Sha256: e1d5c4a8acb79537643d0f01d3a9564a93c4d535a5a73f6b991faa0c28cddeae

Contents?: true

Size: 834 Bytes

Versions: 24

Compression:

Stored size: 834 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

    def package_url
      "https://rubygems.org/gems/#{CGI.escape(name)}/versions/#{CGI.escape(version)}"
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
license_finder-7.1.0 lib/license_finder/packages/bundler_package.rb
license_finder-7.0.1 lib/license_finder/packages/bundler_package.rb
license_finder-7.0.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.15.0 lib/license_finder/packages/bundler_package.rb
gitlab-license_finder-6.14.2.1 lib/license_finder/packages/bundler_package.rb
license_finder-6.14.2 lib/license_finder/packages/bundler_package.rb
license_finder-6.14.1 lib/license_finder/packages/bundler_package.rb
license_finder-6.13.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.12.2 lib/license_finder/packages/bundler_package.rb
license_finder-6.12.1 lib/license_finder/packages/bundler_package.rb
license_finder-6.12.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.11.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.10.1 lib/license_finder/packages/bundler_package.rb
license_finder-6.10.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.9.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.8.2 lib/license_finder/packages/bundler_package.rb
license_finder-6.8.1 lib/license_finder/packages/bundler_package.rb
license_finder-6.8.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.7.0 lib/license_finder/packages/bundler_package.rb
license_finder-6.6.2 lib/license_finder/packages/bundler_package.rb