opscode/ohai — pull request #350 by mcquin (2014-07-01 01:09:38+00:00)
Title: Save IAM security credentials only if hint is present

Solution for https://github.com/opscode/chef/issues/1558.

@sersut @danielsdeleo

Discussion points:
- Naming help would be nice/it's probably needed.
- Not sure on the best way to communicate between metadata mixin and ec2 plugin. Could have a separate mixin just for security credentials, but wanted to try the less-new-code-route... Eh.
- Things that I don't understand are happening in the spec. If I change ec2_spec.rb:253 from `should_receive` to `:stub`, everything fails. Some `puts`ing reveals `File.exist?(filename)` in hints.rb returns `false` for ec2.json, even though that filename and the stubbed filename are the same.