Sha256: 6c522f447e1f0918fc10df5a35cde6a9197dd07188dd62827afc2df946949f7a

Contents?: true

Size: 820 Bytes

Versions: 5

Compression:

Stored size: 820 Bytes

Contents

require 'toml'

module LicenseFinder
  class Dep < PackageManager
    def possible_package_paths
      [project_path.join('Gopkg.lock')]
    end

    def current_packages
      toml = TOML.load_file(detected_package_path)
      projects = toml['projects']
      projects.map do |project|
        GoPackage.from_dependency({
                                    'ImportPath' => project['name'],
                                    'InstallPath' => project_path.join('vendor', project['name']),
                                    'Rev' => project['revision']
                                  }, nil, true)
      end
    end

    def self.takes_priority_over
      Go15VendorExperiment
    end

    def self.prepare_command
      'dep ensure'
    end

    def self.package_management_command
      'dep'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
license_finder-5.0.2 lib/license_finder/package_managers/dep.rb
license_finder-5.0.0 lib/license_finder/package_managers/dep.rb
license_finder-4.0.2 lib/license_finder/package_managers/dep.rb
license_finder-4.0.1 lib/license_finder/package_managers/dep.rb
license_finder-3.1.1 lib/license_finder/package_managers/dep.rb