Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --cache option to inspec exec #1113

Merged
merged 1 commit into from
Sep 21, 2016
Merged

Add --cache option to inspec exec #1113

merged 1 commit into from
Sep 21, 2016

Conversation

stevendanna
Copy link
Contributor

This allows users to run:

inspec exec ./ --cache PATH

which will use PATH as the dir to retrieve and store remote
dependencies. The hope is that this can eventually be used with
inspec vendor PATH to package up a profile for offline use.

Signed-off-by: Steven Danna steve@chef.io

@stevendanna
Copy link
Contributor Author

We still have a lot of inconsistency around whether we want to call it the vendor_index or the cache. I'm leaning towards cache in all my edits since I think that more accurately conveys what it actually does.

@chris-rock
Copy link
Contributor

@stevendanna I like the wording cache

@@ -1,5 +1,4 @@
# encoding: utf-8
require 'inspec/dependencies/vendor_index'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we rename vendor_index to cache then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I think I've completed the rename in my latest commit.

@@ -58,6 +58,8 @@ def self.exec_options
desc: 'Use colors in output.'
option :attrs, type: :array,
desc: 'Load attributes file (experimental)'
option :cache, type: :string, default: File.expand_path('~/.inspec/cache'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per discussion, let's nuke this default, the Cache class already has one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

This allows users to run:

  inspec exec ./ --cache PATH

which will use `PATH` as the dir to retrieve and store remote
dependencies.  The hope is that this can eventually be used with
`inspec vendor PATH` to package up a profile for offline use.

Signed-off-by: Steven Danna <steve@chef.io>
@chris-rock chris-rock merged commit 70fa1dd into master Sep 21, 2016
@chris-rock chris-rock deleted the ssd/customcache branch September 21, 2016 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants