inspec/lib/fetchers
Adam Leff 8269d0da9e Support vendored profiles in Habitat-packaged profiles
This change adds support in Habitat-packaged profiles for
profiles that depend on other profiles. When `inspec habitat
profile create` or `inspec habitat profile upload` is run,
it will see if the profile's dependencies have been vendored
yet, and if not, it will vendor them before creating the
habitat artifact.

For the git and URL fetchers, more explicit creation of the
target directories for the vendored profiles is done. This
is implicitly done via normal CLI interactions a user may
go through, but in our case, we want to ensure those directories
are there before the fetchers try to write out content.

By adding this support, we also fix a bug experienced in Habitat
where a profile that was packaged before an `inspec exec` was run
for the profile would cause a failure in Habitat. This is caused
by `inspec exec` doing a vendor of the dependencies if necessary
and generating the inspec.lock file. In Habitat, the package dir
is not writable by the hab user and InSpec would fail to run due
to an inability to write out an inspec.lock.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-29 10:22:20 +02:00
..
git.rb Support vendored profiles in Habitat-packaged profiles 2017-03-29 10:22:20 +02:00
local.rb Always write lockfiles for local top-level profiles 2016-09-22 10:08:32 +02:00
mock.rb Fail if a remote source content doesn't match lockfile 2016-09-21 10:15:52 +01:00
url.rb Support vendored profiles in Habitat-packaged profiles 2017-03-29 10:22:20 +02:00