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

Remove deprecated examples using Array of Hashes #358

Closed
wants to merge 1 commit into from

Conversation

jerryaldrichiii
Copy link
Contributor

Due to #328 we must update the README.md to remove references to the Array of Hashes syntax.

default['audit']['profiles'] = []
default['audit']['profiles'].push(
  name: 'example',
  compliance: 'admin/example'
)

becomes

default['audit']['profiles'] = {}
default['audit']['profiles']['example'] = {
  compliance: 'admin/example'
}

Due to #328 we must update
the README.md to remove references to the Array of Hashes syntax.

```ruby
default['audit']['profiles'] = []
default['audit']['profiles'].push(
  name: 'example',
  compliance: 'admin/example'
)
```

becomes

```ruby
default['audit']['profiles'] = {}
default['audit']['profiles']['example'] = {
  compliance: 'admin/example'
}
```

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
@@ -85,6 +85,8 @@

# Chef Inspec Compliance profiles to be used for scan of node
# See README.md for details
# TODO: Make this `{}` in next major version
# See: https://github.com/chef-cookbooks/audit/pull/328
default['audit']['profiles'] = []

Choose a reason for hiding this comment

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

I am not sure but removing examples will not resolve the main issue of hash of hashes #328 as we still having default as array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, I was not aware Hash of Hashes was broken. We are going to leave the current docs for now, then when we get Hash of Hashes working we will make sure we include setting the parent to {} in all examples.

Copy link
Contributor

Choose a reason for hiding this comment

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

we'll also need to update the Automate 2 examples for when this is released as they use the .push method as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@teknofire can you add any links to #359

Want to make sure we track them in all the places.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@alexpop
Copy link
Contributor

alexpop commented Sep 18, 2019

Merged as part of #386

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants