Class: LicenseScout::DependencyManager::Godep

Inherits:
Base
  • Object
show all
Defined in:
lib/license_scout/dependency_manager/godep.rb

Instance Attribute Summary

Attributes inherited from Base

#directory

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from LicenseScout::DependencyManager::Base

Instance Method Details

#dependenciesObject


44
45
46
47
48
49
50
51
52
# File 'lib/license_scout/dependency_manager/godep.rb', line 44

def dependencies
  godeps["Deps"].map do |pkg_info|
    dep_name = pkg_info["ImportPath"]
    dep_version = pkg_info["Comment"] || pkg_info["Rev"]
    dep_path = gopath(dep_name)

    new_dependency(dep_name, dep_version, dep_path)
  end.compact
end

#detected?Boolean

Returns:

  • (Boolean)

40
41
42
# File 'lib/license_scout/dependency_manager/godep.rb', line 40

def detected?
  File.exist?(root_godeps_file)
end

#install_commandObject


36
37
38
# File 'lib/license_scout/dependency_manager/godep.rb', line 36

def install_command
  "godep restore"
end

#nameObject


24
25
26
# File 'lib/license_scout/dependency_manager/godep.rb', line 24

def name
  "golang_godep"
end

#signatureObject


32
33
34
# File 'lib/license_scout/dependency_manager/godep.rb', line 32

def signature
  "Godeps/Godeps.json file"
end

#typeObject


28
29
30
# File 'lib/license_scout/dependency_manager/godep.rb', line 28

def type
  "golang"
end