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,7 +57,7 @@ namespace :gitlab do
57 57
58 database_config_file = Rails.root.join("config", "database.yml") 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 puts "no".green 61 puts "no".green
62 else 62 else
63 puts "yes".red 63 puts "yes".red
@@ -317,7 +317,7 @@ namespace :gitlab do @@ -317,7 +317,7 @@ namespace :gitlab do
317 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user 317 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
318 print "Has no \"-e\" in ~#{gitolite_ssh_user}/.profile ... " 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 unless File.read(profile_file) =~ /^-e PATH/ 322 unless File.read(profile_file) =~ /^-e PATH/
323 puts "yes".green 323 puts "yes".green
@@ -474,7 +474,7 @@ namespace :gitlab do @@ -474,7 +474,7 @@ namespace :gitlab do
474 def check_dot_gitolite_exists 474 def check_dot_gitolite_exists
475 print "Config directory exists? ... " 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 if File.directory?(gitolite_config_path) 479 if File.directory?(gitolite_config_path)
480 puts "yes".green 480 puts "yes".green
@@ -495,7 +495,7 @@ namespace :gitlab do @@ -495,7 +495,7 @@ namespace :gitlab do
495 def check_dot_gitolite_permissions 495 def check_dot_gitolite_permissions
496 print "Config directory access is drwxr-x---? ... " 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 unless File.exists?(gitolite_config_path) 499 unless File.exists?(gitolite_config_path)
500 puts "can't check because of previous errors".magenta 500 puts "can't check because of previous errors".magenta
501 return 501 return
@@ -519,7 +519,7 @@ namespace :gitlab do @@ -519,7 +519,7 @@ namespace :gitlab do
519 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user 519 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
520 print "Config directory owned by #{gitolite_ssh_user}:#{gitolite_ssh_user} ... " 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 unless File.exists?(gitolite_config_path) 523 unless File.exists?(gitolite_config_path)
524 puts "can't check because of previous errors".magenta 524 puts "can't check because of previous errors".magenta
525 return 525 return
@@ -645,7 +645,6 @@ namespace :gitlab do @@ -645,7 +645,6 @@ namespace :gitlab do
645 hook_file = "post-receive" 645 hook_file = "post-receive"
646 gitolite_hooks_path = File.join(Gitlab.config.gitolite.hooks_path, "common") 646 gitolite_hooks_path = File.join(Gitlab.config.gitolite.hooks_path, "common")
647 gitolite_hook_file = File.join(gitolite_hooks_path, hook_file) 647 gitolite_hook_file = File.join(gitolite_hooks_path, hook_file)
648 - gitolite_hook_content = File.read(gitolite_hook_file)  
649 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user 648 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
650 649
651 unless File.exists?(gitolite_hook_file) 650 unless File.exists?(gitolite_hook_file)
@@ -653,6 +652,7 @@ namespace :gitlab do @@ -653,6 +652,7 @@ namespace :gitlab do
653 return 652 return
654 end 653 end
655 654
  655 + gitolite_hook_content = File.read(gitolite_hook_file)
656 gitlab_hook_file = Rails.root.join.join("lib", "hooks", hook_file) 656 gitlab_hook_file = Rails.root.join.join("lib", "hooks", hook_file)
657 gitlab_hook_content = File.read(gitlab_hook_file) 657 gitlab_hook_content = File.read(gitlab_hook_file)
658 658