Commit f0bf830f authored by Gabriel Mazetto's avatar Gabriel Mazetto

CodeStyle and small fixes

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