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

Improve inspec shell by having it evaluate describe/control blocks. #909

Merged
merged 1 commit into from
Aug 19, 2016

Conversation

ksubrama
Copy link

@arlimus @chris-rock @jbussdieker @alexpop

This definitely has bugs in it but the is the general strategy I came up with last night after diving head-first into inspec and pry.

@ksubrama
Copy link
Author

Note - the "-c" arm of the shell already works (I have tested it locally). I'm trying to figure out how to make the shell work.

@@ -13,11 +13,11 @@ class Fetcher < Fetchers::Url
priority 500

def self.resolve(target, opts = {})
return nil unless URI(target).scheme == 'supermarket'
return nil unless target.is_a?(String)
Copy link
Contributor

Choose a reason for hiding this comment

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

we still need to ensure that the scheme is supermarket

@ksubrama
Copy link
Author

Fix #240

@ksubrama ksubrama changed the title WIP: Fix inspec shlle by having it evaluate describe/control blocks. Fix inspec shlle by having it evaluate describe/control blocks. Aug 15, 2016
@chris-rock chris-rock changed the title Fix inspec shlle by having it evaluate describe/control blocks. Fix inspec shell by having it evaluate describe/control blocks. Aug 15, 2016
@chris-rock chris-rock changed the title Fix inspec shell by having it evaluate describe/control blocks. Improve inspec shell by having it evaluate describe/control blocks. Aug 15, 2016
@ksubrama ksubrama added this to the 0.31.0 milestone Aug 16, 2016
@ksubrama ksubrama added the Type: Enhancement Improves an existing feature label Aug 16, 2016
else
res = run_command(o)
Copy link
Contributor

Choose a reason for hiding this comment

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

we should reflect the --format option here and do the json dump if activated

Copy link
Author

@ksubrama ksubrama Aug 18, 2016

Choose a reason for hiding this comment

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

run_command should already print the json output. It's no longer using a mock runner - it's doing the real rspec thing which handles --format on its own.

@chris-rock
Copy link
Contributor

This fixes #240

@chris-rock chris-rock merged commit 55193fc into master Aug 19, 2016
@chris-rock chris-rock deleted the ksubrama/shell branch August 19, 2016 17:28
@chris-rock chris-rock restored the ksubrama/shell branch August 19, 2016 17:29
@chris-rock chris-rock deleted the ksubrama/shell branch August 10, 2017 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improves an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants