Method: Inspec::DependencySet.from_lockfile
- Defined in:
- lib/inspec/dependencies/dependency_set.rb
.from_lockfile(lockfile, cwd, cache, backend, opts = {}) ⇒ Object
Return a dependency set given a lockfile.
17 18 19 20 21 22 23 24 |
# File 'lib/inspec/dependencies/dependency_set.rb', line 17 def self.from_lockfile(lockfile, cwd, cache, backend, opts = {}) dep_tree = lockfile.deps.map do |dep| Inspec::Requirement.from_lock_entry(dep, cwd, cache, backend, opts) end dep_list = flatten_dep_tree(dep_tree) new(cwd, cache, dep_list, backend) end |