Project

General

Profile

« Previous | Next » 

Revision 9d43fc71

Added by Michael Moll almost 6 years ago

Fixes #19789 - fix Layout/SpaceAroundOperators cop

View differences:

app/models/compute_resources/foreman/model/ovirt.rb
rating = 0.0
if os[:name].include?(os_name)
rating += 100
rating += (1.0/os[:name].length) # prefer the shorter names a bit in case we have not found more important some specifics
rating += (1.0 / os[:name].length) # prefer the shorter names a bit in case we have not found more important some specifics
rating += 10 if os[:name].include?("#{os_name}_#{host.operatingsystem.major}")
rating += 10 if arch_name && os[:name].include?(arch_name)
end
......
{
:search => params['search']['value'] || '',
:max => max,
:page => (params['start'].to_i / max)+1,
:page => (params['start'].to_i / max) + 1,
:without_details => true
}
end
......
end
def os_name_mapping(host)
(host.operatingsystem.name =~ /redhat|centos/i) ? 'rhel': host.operatingsystem.name.downcase
(host.operatingsystem.name =~ /redhat|centos/i) ? 'rhel' : host.operatingsystem.name.downcase
end
def arch_name_mapping(host)

Also available in: Unified diff