diff --git a/lib/refrepo/gen/oar-properties.rb b/lib/refrepo/gen/oar-properties.rb index a791df03c71c7dc81b24a40e0fd3c087d6ac599e..54570bcf1cdf703a8939045461841074c616943f 100644 --- a/lib/refrepo/gen/oar-properties.rb +++ b/lib/refrepo/gen/oar-properties.rb @@ -89,7 +89,7 @@ def generate_create_oar_property_cmd(properties_keys) if oar_system_keys.include?(key) next end - if key_type == Fixnum # rubocop:disable Lint/UnifiedInteger + if key_type == Integer command += "property_exist '#{key}' || oarproperty -a #{key}\n" elsif key_type == String command += "property_exist '#{key}' || oarproperty -a #{key} --varchar\n" @@ -513,8 +513,8 @@ def get_maintenance_property(node) return maintenance end -# Return a list of properties as a hash: { property1 => String, property2 => Fixnum, ... } -# We detect the type of the property (Fixnum/String) by looking at the existing values +# Return a list of properties as a hash: { property1 => String, property2 => Integer, ... } +# We detect the type of the property (Integer/String) by looking at the existing values def get_property_keys(properties) properties_keys = {} properties.each do |type, type_properties| @@ -978,7 +978,7 @@ def do_diff(options, generated_hierarchy, refrepo_properties) v_oar = properties_keys['oar'][site_uid][k] properties_keys['diff'][site_uid][k] = v_ref unless v_oar if v_oar && v_oar != v_ref && v_ref != NilClass && v_oar != NilClass - # Detect inconsistency between the type (String/Fixnum) of properties generated by this script and the existing values on the server. + # Detect inconsistency between the type (String/Integer) of properties generated by this script and the existing values on the server. diagnostic_msgs.push( "Error: the OAR property '#{k}' is a '#{v_oar}' on the #{site_uid} server and this script uses '#{v_ref}' for this property.") ret = false unless options[:update] || options[:print] end diff --git a/spec/oar_properties_spec.rb b/spec/oar_properties_spec.rb index 9eb0c9785479e43eae0137a01bb323ea146cbe59..721863bcf48831af3c7eab2d83f4058a6621f7c7 100644 --- a/spec/oar_properties_spec.rb +++ b/spec/oar_properties_spec.rb @@ -1947,7 +1947,7 @@ Output format: [ '-', 'key', 'value'] for missing, [ '+', 'key', 'value'] for ad TXT expected_output2 = <<-TXT -Error: the OAR property 'eth_rate' is a 'String' on the fakesite server and this script uses 'Fixnum' for this property. +Error: the OAR property 'eth_rate' is a 'String' on the fakesite server and this script uses 'Integer' for this property. TXT generator_output = capture do