@@ -368,7 +368,7 @@ def insync?(context, name, _property_name, _is_hash, should_hash)
368368 # @param context [Object] the Puppet runtime context to operate in and send feedback to
369369 # @param name_hash [Hash] the hash of namevars to be passed as properties to `Invoke-DscResource`
370370 # @return [Hash] returns a hash representing the DSC resource munged to the representation the Puppet Type expects
371- def invoke_get_method ( context , name_hash ) # rubocop:disable Metrics/AbcSize
371+ def invoke_get_method ( context , name_hash )
372372 context . debug ( "retrieving #{ name_hash . inspect } " )
373373
374374 query_props = name_hash . select { |k , v | mandatory_get_attributes ( context ) . include? ( k ) || ( k == :dsc_psdscrunascredential && !v . nil? ) }
@@ -384,8 +384,8 @@ def invoke_get_method(context, name_hash) # rubocop:disable Metrics/AbcSize
384384 # Canonicalize the results to match the type definition representation;
385385 # failure to do so will prevent the resource_api from comparing the result
386386 # to the should hash retrieved from the resource definition in the manifest.
387- data . keys . each do |key | # rubocop:disable Style/HashEachMethods
388- type_key = "dsc_#{ key . downcase } " . to_sym
387+ data . keys . each do |key |
388+ type_key = : "dsc_#{ key . downcase } "
389389 data [ type_key ] = data . delete ( key )
390390
391391 # Special handling for CIM Instances
@@ -557,7 +557,7 @@ def puppetize_name(name)
557557 # Puppet module names must only include lowercase letters, digits and underscores
558558 name = name . gsub ( /[^a-z0-9_]/ , '_' )
559559 # Puppet module names must not start with a number so if it does, append the letter 'a' to the name. Eg: '7zip' becomes 'a7zip'
560- name = name . match? ( /^\d / ) ? "a #{ name } " : name # rubocop:disable Lint/UselessAssignment
560+ name = "a #{ name } " if name . match? ( /^\d / ) # rubocop:disable Lint/UselessAssignment
561561 end
562562
563563 # Return a UUID with the dashes turned into underscores to enable the specifying of guaranteed-unique
@@ -598,7 +598,7 @@ def logon_failed_already?(credential_hash)
598598 # @param enumerable [Enumerable] a string, array, hash, or other object to attempt to recursively downcase
599599 def downcase_hash_keys! ( enumerable )
600600 if enumerable . is_a? ( Hash )
601- enumerable . keys . each do |key | # rubocop:disable Style/HashEachMethods
601+ enumerable . keys . each do |key |
602602 name = key . dup . downcase
603603 enumerable [ name ] = enumerable . delete ( key )
604604 downcase_hash_keys! ( enumerable [ name ] ) if enumerable [ name ] . is_a? ( Enumerable )
@@ -1063,7 +1063,7 @@ def escape_quotes(text)
10631063 # With multiple methods which need to discover secrets it is necessary to keep a single regex
10641064 # which can discover them. This will lazily match everything in a single-quoted string which
10651065 # ends with the secret postfix id and mark the actual contents of the string as the secret.
1066- SECRET_DATA_REGEX = /'(?<secret>[^']+)+?#{ Regexp . quote ( SECRET_POSTFIX ) } '/ . freeze
1066+ SECRET_DATA_REGEX = /'(?<secret>[^']+)+?#{ Regexp . quote ( SECRET_POSTFIX ) } '/
10671067
10681068 # Strings containing sensitive data have a secrets postfix. These strings cannot be passed
10691069 # directly either to debug streams or to PowerShell and must be handled; this method contains
0 commit comments