Method: Inspec::Profile#generate_lockfile

Defined in:
lib/inspec/profile.rb

#generate_lockfile(vendor_path = nil) ⇒ Inspec::Lockfile

Generate an in-memory lockfile. This won’t render the lock file to disk, it must be explicitly written to disk by the caller.

Parameters:

  • vendor_path (String) (defaults to: nil)

    Path to the on-disk vendor dir

Returns:



311
312
313
314
315
# File 'lib/inspec/profile.rb', line 311

def generate_lockfile(vendor_path = nil)
  res = Inspec::DependencySet.new(cwd, vendor_path, nil, @backend)
  res.vendor(.dependencies)
  Inspec::Lockfile.from_dependency_set(res)
end