Commit f0bf830f authored by Gabriel Mazetto's avatar Gabriel Mazetto

CodeStyle and small fixes

parent a2c6dacc
......@@ -76,7 +76,7 @@ class GeoNode < ActiveRecord::Base
self.build_geo_node_key if geo_node_key.nil?
end
def geo_node_key_title
self.geo_node_key.title = "Geo node: #{self.url}"
def change_geo_node_key_title
self.geo_node_key.title = "Geo node: #{self.url}" if self.geo_node_key
end
end
......@@ -30,7 +30,7 @@ module Geo
[(response.code >= 200 && response.code < 300), ActionView::Base.full_sanitizer.sanitize(response.to_s)]
rescue HTTParty::Error, Errno::ECONNREFUSED => e
return [false, ActionView::Base.full_sanitizer.sanitize(e.message)]
[false, ActionView::Base.full_sanitizer.sanitize(e.message)]
end
def private_token
......
......@@ -86,7 +86,7 @@
Labels
= nav_link(controller: :geo_nodes) do
= link_to admin_geo_nodes_path, title: 'Gitlab Geo' do
= link_to admin_geo_nodes_path, title: 'Geo Nodes' do
= icon('globe fw')
%span
Geo Nodes
......
......@@ -50,7 +50,7 @@ module Gitlab
# Ex.
# fetch_remote("gitlab/gitlab-ci", "upstream")
#
def fetch_remote(name, remote, forced=false)
def fetch_remote(name, remote, forced: false)
args = [gitlab_shell_projects_path, 'fetch-remote', "#{name}.git", remote, '600']
args << '--force' if forced
output, status = Popen::popen(args)
......
......@@ -37,7 +37,7 @@ module Gitlab
end
def self.bulk_notify_job
Sidekiq::Cron::Job.find 'geo_bulk_notify_worker'
Sidekiq::Cron::Job.find('geo_bulk_notify_worker')
end
end
end
......@@ -337,7 +337,7 @@ module Gitlab
end
if Gitlab::Geo.enabled? && Gitlab::Geo.secondary?
return build_status_object(false, "You can't use git-annex with a secondary Gitlab Geo node.")
return build_status_object(false, "You can't use git-annex with a secondary GitLab Geo node.")
end
if user.can?(:push_code, project)
......
......@@ -2,7 +2,7 @@ module Gitlab
class GitAccessWiki < GitAccess
def change_access_check(change)
if Gitlab::Geo.enabled? && Gitlab::Geo.secondary?
build_status_object(false, "You can't push code to a secondary Gitlab Geo node.")
build_status_object(false, "You can't push code to a secondary GitLab Geo node.")
elsif user.can?(:create_wiki, project)
build_status_object(true)
else
......
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