Sha256: 874310743da5dc1e49205892dc0540eec84fd989c92f160b954c731bf06c2177

Contents?: true

Size: 456 Bytes

Versions: 24

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module LicenseFinder
  class CocoaPodsPackage < Package
    def initialize(name, version, license_text, options = {})
      super(name, version, options)
      @license = License.find_by_text(license_text.to_s)
    end

    def licenses_from_spec
      [@license].compact
    end

    def package_manager
      'CocoaPods'
    end

    def package_url
      "https://cocoapods.org/pods/#{CGI.escape(name)}"
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

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