Commit dea86281714336799fb432833a0ca517b509abaa

Authored by Riyad Preukschas
2 parents c49a3106 8ef7b9b6

Merge branch 'stable'

Showing 1 changed file with 6 additions and 6 deletions   Show diff stats
lib/tasks/gitlab/check.rake
... ... @@ -57,7 +57,7 @@ namespace :gitlab do
57 57  
58 58 database_config_file = Rails.root.join("config", "database.yml")
59 59  
60   - unless File.read(database_config_file) =~ /sqlite/
  60 + unless File.read(database_config_file) =~ /adapter:\s+sqlite/
61 61 puts "no".green
62 62 else
63 63 puts "yes".red
... ... @@ -317,7 +317,7 @@ namespace :gitlab do
317 317 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
318 318 print "Has no \"-e\" in ~#{gitolite_ssh_user}/.profile ... "
319 319  
320   - profile_file = File.expand_path("~#{Gitlab.config.gitolite.ssh_user}/.profile")
  320 + profile_file = File.join(gitolite_home, ".profile")
321 321  
322 322 unless File.read(profile_file) =~ /^-e PATH/
323 323 puts "yes".green
... ... @@ -474,7 +474,7 @@ namespace :gitlab do
474 474 def check_dot_gitolite_exists
475 475 print "Config directory exists? ... "
476 476  
477   - gitolite_config_path = File.expand_path("~#{Gitlab.config.gitolite.ssh_user}/.gitolite")
  477 + gitolite_config_path = File.join(gitolite_home, ".gitolite")
478 478  
479 479 if File.directory?(gitolite_config_path)
480 480 puts "yes".green
... ... @@ -495,7 +495,7 @@ namespace :gitlab do
495 495 def check_dot_gitolite_permissions
496 496 print "Config directory access is drwxr-x---? ... "
497 497  
498   - gitolite_config_path = File.expand_path("~#{Gitlab.config.gitolite.ssh_user}/.gitolite")
  498 + gitolite_config_path = File.join(gitolite_home, ".gitolite")
499 499 unless File.exists?(gitolite_config_path)
500 500 puts "can't check because of previous errors".magenta
501 501 return
... ... @@ -519,7 +519,7 @@ namespace :gitlab do
519 519 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
520 520 print "Config directory owned by #{gitolite_ssh_user}:#{gitolite_ssh_user} ... "
521 521  
522   - gitolite_config_path = File.expand_path("~#{gitolite_ssh_user}/.gitolite")
  522 + gitolite_config_path = File.join(gitolite_home, ".gitolite")
523 523 unless File.exists?(gitolite_config_path)
524 524 puts "can't check because of previous errors".magenta
525 525 return
... ... @@ -645,7 +645,6 @@ namespace :gitlab do
645 645 hook_file = "post-receive"
646 646 gitolite_hooks_path = File.join(Gitlab.config.gitolite.hooks_path, "common")
647 647 gitolite_hook_file = File.join(gitolite_hooks_path, hook_file)
648   - gitolite_hook_content = File.read(gitolite_hook_file)
649 648 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
650 649  
651 650 unless File.exists?(gitolite_hook_file)
... ... @@ -653,6 +652,7 @@ namespace :gitlab do
653 652 return
654 653 end
655 654  
  655 + gitolite_hook_content = File.read(gitolite_hook_file)
656 656 gitlab_hook_file = Rails.root.join.join("lib", "hooks", hook_file)
657 657 gitlab_hook_content = File.read(gitlab_hook_file)
658 658  
... ...