Sha256: e52b6d8df3c21166a071cd79d3dbdbbe76c235a24d2900c8c484a4a1af67b563

Contents?: true

Size: 533 Bytes

Versions: 8

Compression:

Stored size: 533 Bytes

Contents

module LicenseFinder
  class GoPackage < Package
    def self.from_dependency(hash, prefix, full_version)
      name = hash['ImportPath']
      install_path = hash['InstallPath']
      install_path ||= install_path(prefix.join(name))
      version = full_version ? hash['Rev'] : hash['Rev'][0..6]
      self.new(name, version, {install_path: install_path, package_manager: "Go" })
    end

    def package_manager
      "Go"
    end

    private

    def self.install_path(path)
      Pathname(path).cleanpath.to_s
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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