From 4f8af50b619dd87c16035f56dce5cbde3531aef1 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 20 Jun 2017 17:31:49 +0200 Subject: [PATCH] Rubocop and comment fixes --- config/gitlab.yml.example | 6 ++++-- lib/gitlab/gitaly_client.rb | 4 ++-- lib/gitlab/workhorse.rb | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 7c7e444af3a..82dd53013f9 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -454,8 +454,10 @@ production: &base # introduced in 9.0). Eventually Gitaly use will become mandatory and # this option will disappear. enabled: true - # Default Gitaly authentication token. Can be overriden per storage. - token: "" + # Default Gitaly authentication token. Can be overriden per storage. Can + # be left blank when Gitaly is running locally on a Unix socket, which + # is the normal way to deploy Gitaly. + token: # # 4. Advanced settings diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb index e30bcd7ae3a..f605c06dfc3 100644 --- a/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb @@ -50,8 +50,8 @@ module Gitlab address end - # All RPC calls should use GitalyClient.call. This method makes sure - # that per-request authentication headers are set. + # All Gitaly RPC call sites should use GitalyClient.call. This method + # makes sure that per-request authentication headers are set. def self.call(storage, service, rpc, request) metadata = request_metadata(storage) metadata = yield(metadata) if block_given? diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index 43305f63911..f96ee69096d 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -28,7 +28,7 @@ module Gitlab if Gitlab.config.gitaly.enabled server = { address: Gitlab::GitalyClient.address(project.repository_storage), - token: Gitlab::GitalyClient.token(project.repository_storage), + token: Gitlab::GitalyClient.token(project.repository_storage) } params[:Repository] = repository.gitaly_repository.to_h