Commit df707134 authored by Gabriel Mazetto's avatar Gabriel Mazetto

fixed rubocop offenses

parent 673c1456
...@@ -16,7 +16,7 @@ class HostValidator < ActiveModel::EachValidator ...@@ -16,7 +16,7 @@ class HostValidator < ActiveModel::EachValidator
def valid_host?(value) def valid_host?(value)
URI.parse("http://#{value}").host == value URI.parse("http://#{value}").host == value
rescue URI::InvalidURIError => e rescue URI::InvalidURIError
false false
end end
end end
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
self.enabled? && !self.current_node.primary? self.enabled? && !self.current_node.primary?
end end
def self.geo_node?(host: host, port: port) def self.geo_node?(host:, port:)
GeoNode.where(host: host, port: port).exists? GeoNode.where(host: host, port: port).exists?
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment