diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:11:54 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-02 15:11:54 -0700 |
commit | e71560df5cebbfb209089c6255e37e65f0e34d95 (patch) | |
tree | 5cd0a1d01eb9609d7f5681b2e04faa902de67e84 /lib/chef/resource/windows_uac.rb | |
parent | 7a1a6c8ef26c787e4b6dd1602f3d158b37e81720 (diff) | |
download | chef-e71560df5cebbfb209089c6255e37e65f0e34d95.tar.gz |
Style/SymbolArray
start enforcing using %i{} instead of arrays of symbols
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource/windows_uac.rb')
-rw-r--r-- | lib/chef/resource/windows_uac.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/resource/windows_uac.rb b/lib/chef/resource/windows_uac.rb index f53767f4b8..c4d5b53c14 100644 --- a/lib/chef/resource/windows_uac.rb +++ b/lib/chef/resource/windows_uac.rb @@ -44,12 +44,12 @@ class Chef property :consent_behavior_admins, Symbol, description: 'Behavior of the elevation prompt for administrators in Admin Approval Mode. Sets HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA\ConsentPromptBehaviorAdmin.', - equal_to: [:no_prompt, :secure_prompt_for_creds, :secure_prompt_for_consent, :prompt_for_creds, :prompt_for_consent, :prompt_for_consent_non_windows_binaries], + equal_to: %i{no_prompt secure_prompt_for_creds secure_prompt_for_consent prompt_for_creds prompt_for_consent prompt_for_consent_non_windows_binaries}, default: :prompt_for_consent_non_windows_binaries property :consent_behavior_users, Symbol, description: 'Behavior of the elevation prompt for standard users. Sets HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA\ConsentPromptBehaviorUser.', - equal_to: [:auto_deny, :secure_prompt_for_creds, :prompt_for_creds], + equal_to: %i{auto_deny secure_prompt_for_creds prompt_for_creds}, default: :prompt_for_creds action :configure do @@ -79,14 +79,14 @@ class Chef # # @return [Integer] def consent_behavior_admins_symbol_to_reg(sym) - [:no_prompt, :secure_prompt_for_creds, :secure_prompt_for_consent, :prompt_for_creds, :prompt_for_consent, :prompt_for_consent_non_windows_binaries].index(sym) + %i{no_prompt secure_prompt_for_creds secure_prompt_for_consent prompt_for_creds prompt_for_consent prompt_for_consent_non_windows_binaries}.index(sym) end # converts the symbols we use in the consent_behavior_users property into numbers 0-2 based on their array index # # @return [Integer] def consent_behavior_users_symbol_to_reg(sym) - [:auto_deny, :secure_prompt_for_creds, :prompt_for_creds].index(sym) + %i{auto_deny secure_prompt_for_creds prompt_for_creds}.index(sym) end end end |