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

Feature/fix ability to pass in supermarket url #1595

Merged

Conversation

rylarson
Copy link
Contributor

Enable customization of supermarket_url

It looks like this was originally supposed to work, but at some point
the default value was put in the method body rather than in the method
parameters.

This change allows you to configure the supermarket_url in test kitchen
like so:

verifier:
  inspec_tests:
  - name: linux-hardening
    supermarket: som3guy/apache-disa-stig
    supermarket_url: https://my.supermarket.com

I added tests for all of the methods on Supermarket::API to make sure we don't have any regressions going forward.

It looks like this was originally supposed to work, but at some point
the default value was put in the method body rather than in the method
parameters.

This change allows you to configure the supermarket_url in test kitchen
like so:

```
verifier:
  inspec_tests:
  - name: linux-hardening
    supermarket: som3guy/apache-disa-stig
    supermarket_url: https://my.supermarket.com
```

Signed-off-by: Ryan Larson <ryan.mango.larson@gmail.com>
Signed-off-by: Ryan Larson <ryan.mango.larson@gmail.com>
Signed-off-by: Ryan Larson <ryan.mango.larson@gmail.com>
Copy link
Contributor

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @rylarson for finding and fixing that annoying bug

Copy link
Contributor

@adamleff adamleff left a comment

Choose a reason for hiding this comment

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

@rylarson thanks for the fix! Can you please add addressable to the gemspec for this change? Right now, we're bringing in addressable via other dependencies. Since we're now depending on it directly, we should declare that for future-proofing purposes.

Signed-off-by: Ryan Larson <ryan.mango.larson@gmail.com>
@rylarson rylarson force-pushed the feature/fixAbilityToPassInSupermarketUrl branch from 18cd76e to 170808b Compare March 28, 2017 18:30
@rylarson
Copy link
Contributor Author

@adamleff The gemspec has been updated with addressable. Sorry for missing that.

@adamleff
Copy link
Contributor

No apologies necessary, @rylarson! I'll review this shortly.

@adamleff
Copy link
Contributor

@rylarson this looks fantastic, and major props for adding tests for the Supermarket::API class, that's awesome.

We greatly appreciate your contribution!

@adamleff adamleff merged commit 0e187f6 into inspec:master Mar 29, 2017
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