summaryrefslogtreecommitdiff
path: root/lib/chef/resource/windows_feature_powershell.rb
Commit message (Collapse)AuthorAgeFilesLines
* Style/StringLiteralsInInterpolationLamont Granquist2019-07-051-12/+12
| | | | | | since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/EmptyLineAfterGuardClauseLamont Granquist2019-07-021-0/+2
| | | | | | | i like this one, gives visual priority to returns or raises that are buried in the middle of things. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-021-10/+10
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #8492 from ↵Tim Smith2019-05-081-1/+1
|\ | | | | | | | | MsysTechnologiesllc/Kapil/MSYS-1006_chef_14_windows_feature_fails_on_windows_2008r2 windows_feature: Fix failures on windows 2008r2
| * Fix for chef 14 windows_feature fails on windows 2008r2Kapil Chouhan2019-05-081-1/+1
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | fix a bunch of weirdly mangled require linesLamont Granquist2019-05-081-1/+1
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Convert require to require_relativeLamont Granquist2019-05-081-4/+4
|/ | | | | | | This gives a speed boost since rubygems does not have to scan through every gem in the gemset in order to find the file. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* More consist descriptions for resource name propertiesTim Smith2019-02-061-1/+1
| | | | | | This better describes how a name property works. Signed-off-by: Tim Smith <tsmith@chef.io>
* Updates from the review of #7929Tim Smith2018-11-151-1/+1
| | | | | | Thanks @tyler-ball Signed-off-by: Tim Smith <tsmith@chef.io>
* More resource description updatesTim Smith2018-11-071-1/+1
| | | | | | Better descriptions for many name properties and copy edits from the docs site. Signed-off-by: Tim Smith <tsmith@chef.io>
* Add additional descriptions to resource and update otherswordingTim Smith2018-11-061-8/+4
| | | | | | | Update descriptions to match the edits that were done to the docs site. Also fix windows_share to lazily eval the arrays, which is a bugfix + a docs fix the way we generate docs right now. Signed-off-by: Tim Smith <tsmith@chef.io>gi Signed-off-by: Tim Smith <tsmith@chef.io>
* Removing incorrect grammar, now that the exception message is aware of ↵Daniel Greeninger2018-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | package quantity. Signed-off-by: Daniel Greeninger <dgreeninger@onica.com> Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
* Add missing description to windows_feature_powershellempty_descriptionsTim Smith2018-08-241-3/+2
| | | | | | This was left empty by mistake. Signed-off-by: Tim Smith <tsmith@chef.io>
* Move the older_than_win_2012_or_8? to platform_introspectionTim Smith2018-07-061-7/+7
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* windows_feature_powershell: Don't error on PowerShell 3.0Tim Smith2018-07-051-1/+1
| | | | | | It should fail on less than 3.0, but not 3.0 Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix error messages and helper usageTim Smith2018-06-101-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Move the windows helper to query_helpersTim Smith2018-06-091-15/+10
| | | | | | Fix my typo too Signed-off-by: Tim Smith <tsmith@chef.io>
* Support windows_feature_powershell on Windows 2008 R2Tim Smith2018-06-071-12/+28
| | | | | | | | | | So this one was a few layers deep: 1) We didn't actually need to import the ServerManager module. This was a powershell 2.0 thing, but since we use ConvertTo-Json we require Powershell 3.0 where this module is autoloaded. 2) Features are only case insensitive on Windows 8 / 2012+. That means we can't lowercase the features on these platforms. We still want to lowercase the features everywhere else because case shouldn't matter and that would be a breaking change. 3) Windows 2008 R2 doesn't have a concept of a removed feature (where the source is gone) so they don't return data the same way when you request features. They just return: Installed: true/false. This means we need to coerce the returned data from 2008 R2 to look like a later Windows release. Signed-off-by: Tim Smith <tsmith@chef.io>
* Modify the provides for all resources from cookbooks so chef winsprovidesTim Smith2018-04-061-1/+1
| | | | | | Due to changes in chef-client 14 old cookbooks started winning and this causes lots of problems, especially for old incompatible resources. Chef client should always win here. Signed-off-by: Tim Smith <tsmith@chef.io>
* Copy over the caching logic from the windows cookbookwindows_feature++Tim Smith2018-03-291-46/+167
| | | | | | This gives us a 3.5x speedup. Yes we need to do this better, but it's no worse than DISM which we already landed in chef and does the exact same thing Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix array parsing in windows_feature_dism / windows_feature_powershellfix_dismTim Smith2018-03-271-1/+1
| | | | | | | | | | This fixes how we parse out the arrays and adds testing to make sure it's doing what we want. Plus it properly continues on when the user has removed all local feature but specified an external source of those via the registry. That was a reported issue that came in on the cookbook after the rewrite. Lastly this also fixes a bad method call to the dism method that came over when diffing from the cookbook. Signed-off-by: Tim Smith <tsmith@chef.io>
* Updates from the reviewmisc_resourceTim Smith2018-03-041-2/+2
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add more description fields, style fixes, add missing requiresTim Smith2018-03-041-0/+2
| | | | | | | | | | | | Make sure to require chef/resource everywhere. It would work without it but only because some other resource had already required it. Put the type on the same line as the property, which we discussed in slack Put introduced after description which makes differing simpler Convert some yard into description fields Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix description spacingTim Smith2018-03-021-5/+5
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add description and introduced fieldsTim Smith2018-03-021-5/+33
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add windows_feature, windows_feature_powershell, andTim Smith2018-03-021-0/+105
windows_feature_dism resources Ported from the windows cookbook 4.0 Signed-off-by: Tim Smith <tsmith@chef.io>