summaryrefslogtreecommitdiff
path: root/lib/chef/mixin
Commit message (Collapse)AuthorAgeFilesLines
* fix Style/PreferredHashMethodsLamont Granquist2018-07-023-12/+12
| | | | | | | absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the floor of that gem is bumped up. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/IndentHeredocLamont Granquist2018-07-021-6/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-022-12/+12
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove some ruby 1.8.7-ismslcg/remove-187-ismsLamont Granquist2018-06-251-23/+5
| | | | | | | | | been a long, long time since we've needed to use iconv. this does not address the rest of dubiousness of this mixin, but just cleans out the old codepaths. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix edge condition in old timeout APIslcg/deprecate-shell-out-methodsLamont Granquist2018-06-201-5/+10
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* deprecate old shell_out APIsLamont Granquist2018-06-191-15/+23
| | | | | | | | | note that this restores the behavior of shell_out_with_timeout() which downstream consumers may be using, and correctly treats custom resources and LWRPs the same, along with setting up removing all this backcompat weirdness in Chef-15. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add comment about odd construction herelcg/deprecate-shell-out-compact-timeoutLamont Granquist2018-06-181-0/+3
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix infinite recursion and add more testsLamont Granquist2018-06-181-8/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Unification of shell_out APIsLamont Granquist2018-06-151-83/+118
| | | | | | | converts all usage to just shell_out() from the numerous helper utilities that we've had previously. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add back commentLamont Granquist2018-06-051-0/+2
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* need to inject selfLamont Granquist2018-06-051-5/+6
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* move maybe_add_timeout to module method for privacyLamont Granquist2018-06-041-3/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove uses of shell_out_compact_timeoutLamont Granquist2018-05-311-3/+3
| | | | | | just use shell_out_compact now. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Make shell_out_compact automatically pick up timeoutsLamont Granquist2018-05-311-11/+12
| | | | | | This should apply to core resources, not cookbooks. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* change "internal" to "default_env"Lamont Granquist2018-05-301-5/+5
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add internal flag to shell_out and execute resourceLamont Granquist2018-05-251-14/+16
| | | | | | | | this will wind up replacing shell_out_with_systems_locale. also fixes an issue in the sysctl provider. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #7037 from chef/lcg/nil-sets-defaultThom May2018-03-281-5/+1
|\ | | | | Setting nil to properties with implicit nil sets default value
| * remove errant debugginglcg/nil-sets-defaultLamont Granquist2018-03-221-1/+0
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * Setting nil to properties with implicit nil sets default valueLamont Granquist2018-03-221-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This makes converting core resources to properties safer - This makes it easier to apply wrapping properties to subresources property :foo, String, default: "foo" This is where the change lies, and writing a nil here will now actually write a "foo" to the variable. property :foo, [ String, nil ], default: "foo" This is unchanged. Writing nil writes nil. property :foo, String Technically this is changed, since it writes the default value, but since nil.equal?(nil) in a very deep way no behavior changes. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Merge pull request #7050 from chef/tm/deprecated_propertiesTim Smith2018-03-261-0/+4
|\ \ | | | | | | RFC-102: Deprecation warning in resources
| * | RFC-102: Deprecation warning in resourcestm/deprecated_propertiesThom May2018-03-241-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | * `deprecated_property_alias` allows the resource author to provide transition from old properties to new ones with a deprecation warning. * The `deprecated` option on a property emits a deprecation warning. * The `deprecated` method on a resource takes a message, but does not yet emit a deprecation warning. Signed-off-by: Thom May <thom@chef.io>
* | mechanical conversion of most debug log statements to traceThom May2018-03-262-3/+3
|/ | | | Signed-off-by: Thom May <thom@chef.io>
* Add new find_homebrew_username method in the Homebrew mixinTim Smith2018-03-201-3/+13
| | | | | | We need the username about a billion times in both providers. The current helper grabs the UID. Signed-off-by: Tim Smith <tsmith@chef.io>
* Addressing feedback, adding docs and examplessp/powershell_execStuart Preston2018-03-091-0/+69
| | | | Signed-off-by: Stuart Preston <stuart@chef.io>
* Merge branch 'master' into sp/powershell_execStuart Preston2018-03-071-0/+5
|\ | | | | | | Signed-off-by: <>
| * Added source_file to FromFileZeal Jagannatha2018-03-051-0/+5
| | | | | | | | | | | | This new field tracks the file from which the object was loaded. Signed-off-by: Zeal Jagannatha <zealjagannatha@gmail.com>
* | Addressing initial feedback from reviewStuart Preston2018-03-051-5/+2
| | | | | | | | Signed-off-by: Stuart Preston <stuart@chef.io>
* | Initial commit of new Chef PowerShell supportStuart Preston2018-03-031-0/+39
|/ | | | Signed-off-by: Stuart Preston <stuart@chef.io>
* Implement RFC 101: Custom Validation MessagesThom May2018-02-121-9/+19
| | | | | | Adds validation_message as a property option Signed-off-by: Thom May <thom@chef.io>
* Add `introduced` property fieldThom May2018-02-121-0/+1
| | | | Signed-off-by: Thom May <thom@chef.io>
* properties can have descriptionsThom May2018-02-121-0/+12
| | | | Signed-off-by: Thom May <thom@chef.io>
* Merge pull request #6687 from ↵Bryan McLellan2018-01-251-3/+6
|\ | | | | | | | | MsysTechnologiesllc/nim/logonSession_user_permission [MSYS-724] Chef::Util::Windows::LogonSession should allow having only the prescribed users permissions
| * Fixed/added specs for LogonSession changesnimisha2018-01-241-3/+5
| | | | | | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Brought back Chef::Win32::Security functional test for running as a non ↵nimisha2018-01-241-2/+3
| | | | | | | | | | | | admin user Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
| * Chef::ReservedNames::Win32::Security.has_admin_privileges? prints a debug ↵nimisha2018-01-241-1/+1
| | | | | | | | | | | | message that contains token elevation information Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* | Cleanup a bit of YARD and add a few thingsTim Smith2018-01-229-41/+31
|/ | | | | | Mostly remove some warnings when running yard on the CLI Signed-off-by: Tim Smith <tsmith@chef.io>
* Rename the OpenSSL mixin to avoid name conflictsTim Smith2018-01-221-1/+1
| | | | | | This way people don't have to refactor their code from OpenSSL::Whatever to ::OpenSSL::Whatever Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #6736 from chef/openssl_resourcesTim Smith2018-01-221-0/+118
|\ | | | | Add dhparam, rsa_private_key and rsa_public_key resources
| * Improve readability a tiny bit in the mixinTim Smith2018-01-121-1/+1
| | | | | | | | | | | | Per the review Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add tests for the mixinTim Smith2018-01-051-10/+10
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * Add dhparam, rsa_private_key and rsa_public_key resourcesTim Smith2018-01-051-0/+118
| | | | | | | | | | | | Ported from the openssl cookbook. I've done all the major refactoring there to shake the bugs out. This is just reformatted to use the mixin instead of a cookbook helper and to be library style so it works in core chef. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Remove previously deprecated mixins and Chef::DSL::Recipe::FullDSLchef14_deprecationsTim Smith2018-01-014-148/+0
|/ | | | | | | | | | | | We wired these up previously with deprecations. They've been deprecated for a long time and are pretty rarely used on the Supermarket. Additionally we have Foodcritic rules to detect their usage: FC102: Deprecated Chef::DSL::Recipe::FullDSL class used FC100: Deprecated Chef::Mixin::Language mixin used FC099: Deprecated Chef::Mixin::LanguageIncludeRecipe mixin used FC098: Deprecated Chef::Mixin::RecipeDefinitionDSLCore mixin used FC097: Deprecated Chef::Mixin::LanguageIncludeAttribute mixin used Signed-off-by: Tim Smith <tsmith@chef.io>
* Cleanup some YARD warningsyard2Tim Smith2017-12-131-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix remote_file with UNC paths failingnodes_not_hereTim Smith2017-10-191-1/+1
| | | | | | | | | | Our check here to see if we're on Windows uses node data that's not available in this context. Use the same Chef::Platform.windows? check we use above. Without this you get the following error: [2017-10-02T21:40:42+00:00] DEBUG: Re-raising exception: NameError - remote_file[c:/foo/bar] (foo::default line 14) had an error: NameError: undefined local variable or method `node' for #<Chef::Provider::RemoteFile::NetworkFile:0x00000000064c0148> Signed-off-by: Tim Smith <tsmith@chef.io>
* Fixing specsnimisha2017-09-051-1/+1
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Added define_resource_requirement and some other validationsnimisha2017-09-051-0/+4
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Alternate user local logon authenticationnimisha2017-09-052-96/+1
| | | | Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
* Alternate user remote file code review feedbackadamedx2017-09-051-2/+2
|
* Access remote_file resource source files as alternate user on Windowsadamedx2017-09-052-2/+2
| | | | | Conflicts: spec/support/shared/functional/execute_resource.rb