diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-02-25 15:16:32 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-03-16 12:45:09 -0700 |
commit | 72668ebfe92e7f6d36630861759812aba92b9513 (patch) | |
tree | 4e39dec59336d2329a4e0e46c6ac99a1fb900473 /lib/chef/resource | |
parent | 53047ee56541844fe8236fc6378563dc74e5866b (diff) | |
download | chef-72668ebfe92e7f6d36630861759812aba92b9513.tar.gz |
Cookstyle fixes for our resources
I ran cookstyle against the resources and fixes a few minor issues:
- Remove the now default guard interpreter from a powershell_script
- Use our rdoc like header format everywhere
- Remove some duplicate copyrights
- Simplify a few platform case statements
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource')
-rw-r--r-- | lib/chef/resource/homebrew_package.rb | 3 | ||||
-rw-r--r-- | lib/chef/resource/kernel_module.rb | 5 | ||||
-rw-r--r-- | lib/chef/resource/swap_file.rb | 4 | ||||
-rw-r--r-- | lib/chef/resource/timezone.rb | 4 | ||||
-rw-r--r-- | lib/chef/resource/windows_certificate.rb | 1 |
5 files changed, 8 insertions, 9 deletions
diff --git a/lib/chef/resource/homebrew_package.rb b/lib/chef/resource/homebrew_package.rb index 55c61478ec..3649bd0214 100644 --- a/lib/chef/resource/homebrew_package.rb +++ b/lib/chef/resource/homebrew_package.rb @@ -2,8 +2,7 @@ # Author:: Joshua Timberman (<joshua@chef.io>) # Author:: Graeme Mathieson (<mathie@woss.name>) # -# Copyright 2011-2016, Chef Software Inc. -# Copyright 2014-2016, Chef Software, Inc <legal@chef.io> +# Copyright:: 2011-2020, Chef Software Inc.<legal@chef.io> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/chef/resource/kernel_module.rb b/lib/chef/resource/kernel_module.rb index 2f9b7748f6..6f6c0ff776 100644 --- a/lib/chef/resource/kernel_module.rb +++ b/lib/chef/resource/kernel_module.rb @@ -3,8 +3,9 @@ # # The MIT License (MIT) # -# Copyright 2016-2018, Shopify Inc. -# Copyright 2018, Chef Software, Inc. +# Copyright:: 2016-2018, Shopify Inc. +# Copyright:: 2018-2020, Chef Software Inc. +# require_relative "../resource" diff --git a/lib/chef/resource/swap_file.rb b/lib/chef/resource/swap_file.rb index 2efe040c47..942424ab6f 100644 --- a/lib/chef/resource/swap_file.rb +++ b/lib/chef/resource/swap_file.rb @@ -1,6 +1,6 @@ # -# Copyright 2012-2018, Seth Vargo -# Copyright 2017-2018, Chef Software, Inc. +# Copyright:: 2012-2018, Seth Vargo +# Copyright:: 2017-2020, Chef Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/chef/resource/timezone.rb b/lib/chef/resource/timezone.rb index 16a7f1031e..d2b85e43b0 100644 --- a/lib/chef/resource/timezone.rb +++ b/lib/chef/resource/timezone.rb @@ -1,8 +1,8 @@ # # Author:: Kirill Kouznetsov <agon.smith@gmail.com> # -# Copyright 2018, Kirill Kouznetsov. -# Copyright 2018, Chef Software, Inc. +# Copyright:: 2018, Kirill Kouznetsov. +# Copyright:: 2018-2020, Chef Software Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb index cdd7ed1ef1..474f9ad69c 100644 --- a/lib/chef/resource/windows_certificate.rb +++ b/lib/chef/resource/windows_certificate.rb @@ -85,7 +85,6 @@ class Chef guard_script << cert_exists_script(hash) powershell_script "setting the acls on #{new_resource.source} in #{cert_location}\\#{new_resource.store_name}" do - guard_interpreter :powershell_script convert_boolean_return true code code_script only_if guard_script |