Sha256: 1a3b0af538c162ad472d9aafba5634a656307ca28d50760dd647ac6b4bb0a3e2

Contents?: true

Size: 923 Bytes

Versions: 23

Compression:

Stored size: 923 Bytes

Contents

# frozen_string_literal: true

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

    def current_packages
      detected_path = detected_package_path

      YAML.load_file(detected_path).fetch('imports').map do |package_hash|
        import_path = package_hash.fetch('name')
        license_path = project_path.join('vendor', import_path)

        GoPackage.from_dependency({
                                    'ImportPath' => import_path,
                                    'InstallPath' => license_path,
                                    'Rev' => package_hash.fetch('version')
                                  }, nil, true)
      end
    end

    def self.takes_priority_over
      Go15VendorExperiment
    end

    def package_management_command
      'glide'
    end

    def prepare_command
      'glide install'
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
license_finder-6.15.0 lib/license_finder/package_managers/glide.rb
gitlab-license_finder-6.14.2.1 lib/license_finder/package_managers/glide.rb
license_finder-6.14.2 lib/license_finder/package_managers/glide.rb
license_finder-6.14.1 lib/license_finder/package_managers/glide.rb
license_finder-6.13.0 lib/license_finder/package_managers/glide.rb
license_finder-6.12.2 lib/license_finder/package_managers/glide.rb
license_finder-6.12.1 lib/license_finder/package_managers/glide.rb
license_finder-6.12.0 lib/license_finder/package_managers/glide.rb
license_finder-6.11.0 lib/license_finder/package_managers/glide.rb
license_finder-6.10.1 lib/license_finder/package_managers/glide.rb
license_finder-6.10.0 lib/license_finder/package_managers/glide.rb
license_finder-6.9.0 lib/license_finder/package_managers/glide.rb
license_finder-6.8.2 lib/license_finder/package_managers/glide.rb
license_finder-6.8.1 lib/license_finder/package_managers/glide.rb
license_finder-6.8.0 lib/license_finder/package_managers/glide.rb
license_finder-6.7.0 lib/license_finder/package_managers/glide.rb
license_finder-6.6.2 lib/license_finder/package_managers/glide.rb
license_finder-6.6.1 lib/license_finder/package_managers/glide.rb
license_finder-6.6.0 lib/license_finder/package_managers/glide.rb
license_finder-6.5.0 lib/license_finder/package_managers/glide.rb