summaryrefslogtreecommitdiff
path: root/chef-utils/spec
Commit message (Collapse)AuthorAgeFilesLines
* Freeze strings in chef-utilsTim Smith2020-11-0214-0/+14
| | | | | | This saves us memory and gets us ready for a world where this becomes the default. Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge repetitive conditionalsTim Smith2020-10-271-1/+1
| | | | | | So much easier to read and probably faster this way too. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add unit and integration testing back to omnibus testersLamont Granquist2020-08-171-0/+2
| | | | | | It is slow but it does catch real bugs Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Convert to default_paths APIlcg/default-pathsLamont Granquist2020-07-222-15/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add spaces after attrsTim Smith2020-07-072-0/+4
| | | | | | This makes it easier to read the classes. Signed-off-by: Tim Smith <tsmith@chef.io>
* Use .match? not =~ when match values aren't necessaryTim Smith2020-06-111-1/+1
| | | | | | Autocorrected from RuboCop Performance which is now smart enough to detect when you use the match and when you don't. Using match? does not create any objects so it's slightly faster and uses less memory. Signed-off-by: Tim Smith <tsmith@chef.io>
* Fixed armv6l and armv7l tests.Matt Ray2020-05-211-2/+2
| | | | Signed-off-by: Matt Ray <github@mattray.dev>
* Added armv6l and armv7l to arm? and armhf? helpersMatt Ray2020-05-201-0/+11
| | | | | | | | armv6l is Raspberry Pi 1/Zero armv7l is Raspberry Pi 2,3,4 Tested with Raspbian 10, Debian 10, Centos 7 Signed-off-by: Matt Ray <github@mattray.dev>
* More files free of spelling violations.Pete Higgins2020-05-182-2/+2
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Resolve deprecations in chef-utils specsTim Smith2020-04-251-1/+1
| | | | | | Use the latest fauxhai data to avoid a giant pile of spec warnings Signed-off-by: Tim Smith <tsmith@chef.io>
* Bump CentOS version from 6.9 to 6.10Dan Webb2020-04-181-1/+1
| | | | Signed-off-by: Daniel Webb <dan.webb@damacus.io>
* Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-1313-13/+13
| | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add arm? helper to chef-utilsTim Smith2020-04-071-4/+4
| | | | | | It's tagged as first shipping in chef 15.10 since I plan to backport this and that'll make sense in the docs. Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix cloud? helper to only report true on cloud instancesTim Smith2020-03-311-0/+6
| | | | | | Ohai always returns the cloud key so checking for the key isn't valid for cloud. We need to make sure it's not nil instead. Signed-off-by: Tim Smith <tsmith@chef.io>
* rename virtual_host to hypervisorLamont Granquist2020-02-031-6/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add _host versionsLamont Granquist2020-02-031-6/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fixing APIsLamont Granquist2020-01-311-7/+13
| | | | | | these were broken in chef-sugar Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add chef-sugar virtualization helpersLamont Granquist2020-01-312-3/+73
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add chef-sugar include_recipe? helperLamont Granquist2020-01-301-1/+20
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add cloud helpers from chef-sugarLamont Granquist2020-01-302-0/+84
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add windows_nt_version and powershell_version helpers to chef-utilsmore_windows_helpersTim Smith2020-01-291-11/+31
| | | | | | These both return version objects which means they can be compared without creating version objects first or .to_i / .to_f messes. Much simpler for users. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add specs for the windows helperswindows_utilsTim Smith2020-01-212-0/+65
| | | | | | A copy and tweak of the architecture specs Signed-off-by: Tim Smith <tsmith@chef.io>
* additional chef-utils helpers for rhel6/7/8Lamont Granquist2019-11-141-12/+42
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* rename windows_ruby_platform? to windows_ruby?Lamont Granquist2019-11-121-6/+6
| | | | | | | | | while it checks against the RUBY_PLATFORM to see if it is windows, and so therefore the old name sort of makes sense, it does not make sense in the context of all the rest of the chef platform helpers that have the `_platform?` suffix. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Add chef-utils gem with various recipe DSL helpersLamont Granquist2019-11-0811-0/+1452
This is the implementation of [RFC-087](https://github.com/chef-boneyard/chef-rfc/blob/master/rfc087-distro-sugar-helpers.md) although some of the specifics have been iterated on and changed. The documentation will be in the [README.md](https://github.com/chef/chef/tree/master/chef-utils/README.md) once this is merged. While this PR mostly moves chef-sugar utilities into core-chef via this chef-utils gem, the scope of the chef-utils gem should be considered larger than just that. As an example this PR moves the Mash class into this gem for reuse in ohai as well. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>