Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-05 21:10:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-05 21:10:05 +0300
commit585c8dce43fd374a18e48e03c7ba8b5b96395b14 (patch)
treebc91d7a2ea940133a7a6ac323e0be9eb6f513282 /lib
parent35cccb0c12024672d5a6e003fb0fb920fc9a323f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/gitaly_client.rb2
-rw-r--r--lib/gitlab/gitaly_client/storage_settings.rb2
-rw-r--r--lib/tasks/gitlab/gitaly.rake2
-rw-r--r--lib/tasks/gitlab/helpers.rake4
4 files changed, 7 insertions, 3 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb
index f4a89edecd1..2c26da037da 100644
--- a/lib/gitlab/gitaly_client.rb
+++ b/lib/gitlab/gitaly_client.rb
@@ -120,7 +120,7 @@ module Gitlab
raise "storage #{storage.inspect} is missing a gitaly_address"
end
- unless URI(address).scheme.in?(%w(tcp unix tls))
+ unless %w(tcp unix tls).include?(URI(address).scheme)
raise "Unsupported Gitaly address: #{address.inspect} does not use URL scheme 'tcp' or 'unix' or 'tls'"
end
diff --git a/lib/gitlab/gitaly_client/storage_settings.rb b/lib/gitlab/gitaly_client/storage_settings.rb
index f66dc3010ea..4cc0269673f 100644
--- a/lib/gitlab/gitaly_client/storage_settings.rb
+++ b/lib/gitlab/gitaly_client/storage_settings.rb
@@ -52,7 +52,7 @@ module Gitlab
@legacy_disk_path = File.expand_path(storage['path'], Rails.root) if storage['path']
storage['path'] = Deprecated
- @hash = storage.with_indifferent_access
+ @hash = ActiveSupport::HashWithIndifferentAccess.new(storage)
end
def gitaly_address
diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake
index df75b3cf716..cafa06e2a67 100644
--- a/lib/tasks/gitlab/gitaly.rake
+++ b/lib/tasks/gitlab/gitaly.rake
@@ -3,7 +3,7 @@
namespace :gitlab do
namespace :gitaly do
desc 'GitLab | Gitaly | Install or upgrade gitaly'
- task :install, [:dir, :storage_path, :repo] => :gitlab_environment do |t, args|
+ task :install, [:dir, :storage_path, :repo] => :with_gitlab_helpers do |t, args|
warn_user_is_not_gitlab
unless args.dir.present? && args.storage_path.present?
diff --git a/lib/tasks/gitlab/helpers.rake b/lib/tasks/gitlab/helpers.rake
index b61b1833c5a..220a333fbd6 100644
--- a/lib/tasks/gitlab/helpers.rake
+++ b/lib/tasks/gitlab/helpers.rake
@@ -6,3 +6,7 @@ StateMachines::Machine.ignore_method_conflicts = true if ENV['CRON']
task gitlab_environment: :environment do
extend SystemCheck::Helpers
end
+
+task :with_gitlab_helpers do
+ extend SystemCheck::Helpers
+end