Class: LicenseFinder::GoDep

Inherits:
PackageManager show all
Defined in:
lib/license_finder/package_managers/go_dep.rb

Constant Summary collapse

OLD_GODEP_VENDOR_PATH =
'Godeps/_workspace/src'
GODEP_VENDOR_PATH =
'vendor'

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PackageManager

#active?, #command_exists?, #current_packages_with_relations, #detected_package_path, id, #installed?, #prepare, #prepare_command, #project_root?

Constructor Details

#initialize(options = {}) ⇒ GoDep

Returns a new instance of GoDep.



10
11
12
13
# File 'lib/license_finder/package_managers/go_dep.rb', line 10

def initialize(options = {})
  super
  @full_version = options[:go_full_version]
end

Class Method Details

.takes_priority_overObject



20
21
22
# File 'lib/license_finder/package_managers/go_dep.rb', line 20

def self.takes_priority_over
  Go15VendorExperiment
end

Instance Method Details

#current_packagesObject



15
16
17
18
# File 'lib/license_finder/package_managers/go_dep.rb', line 15

def current_packages
  packages_from_json(detected_package_path.read)
  # godep includes subpackages as a seperate dependency, we can de-dup that
end

#package_management_commandObject



28
29
30
# File 'lib/license_finder/package_managers/go_dep.rb', line 28

def package_management_command
  'godep'
end

#possible_package_pathsObject



24
25
26
# File 'lib/license_finder/package_managers/go_dep.rb', line 24

def possible_package_paths
  [project_path.join('Godeps/Godeps.json')]
end