From e0d62d9c5fa1145ef5378db07f28c3d399e9c34d Mon Sep 17 00:00:00 2001 From: Cameron Yule Date: Sat, 2 Feb 2013 20:04:07 +0000 Subject: Replacing the manual parsing of the /etc/group file with the equivalent call from the Etc class in the Ruby standard library. This has the benefit of supporting additional platforms (e.g. OS X). --- lib/tasks/gitlab/task_helpers.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/tasks') diff --git a/lib/tasks/gitlab/task_helpers.rake b/lib/tasks/gitlab/task_helpers.rake index d494125f76c..cb4e34cc0d7 100644 --- a/lib/tasks/gitlab/task_helpers.rake +++ b/lib/tasks/gitlab/task_helpers.rake @@ -77,8 +77,7 @@ namespace :gitlab do end def gid_for(group_name) - group_line = File.read("/etc/group").lines.select{|l| l.start_with?("#{group_name}:")}.first - group_line.split(":")[2].to_i + Etc.getgrnam(group_name).gid end def warn_user_is_not_gitlab -- cgit v1.2.1 From 08dfbc962b9263662a188cbd71ebf39e6223e721 Mon Sep 17 00:00:00 2001 From: Bhagavan Das Date: Thu, 14 Feb 2013 21:39:48 +0000 Subject: rename setup to setup_db so that it does not collide with gitlab:shell:setup task --- lib/tasks/gitlab/setup.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/tasks') diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake index bc0742564d0..8d4950cf396 100644 --- a/lib/tasks/gitlab/setup.rake +++ b/lib/tasks/gitlab/setup.rake @@ -1,10 +1,10 @@ namespace :gitlab do desc "GITLAB | Setup production application" task :setup => :environment do - setup + setup_db end - def setup + def setup_db warn_user_is_not_gitlab puts "This will create the necessary database tables and seed the database." -- cgit v1.2.1 From 4bc7d98d65a84d037d6d8ddc807cdf0ceeb5a456 Mon Sep 17 00:00:00 2001 From: Bhagavan Das Date: Thu, 14 Feb 2013 23:10:18 +0000 Subject: Remove hardcoded refernce to gitlab-shell home. so that gitlab can be installed on any unix account other than git --- lib/tasks/gitlab/shell.rake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/tasks') diff --git a/lib/tasks/gitlab/shell.rake b/lib/tasks/gitlab/shell.rake index 0ab8df1d094..ec5451dd47c 100644 --- a/lib/tasks/gitlab/shell.rake +++ b/lib/tasks/gitlab/shell.rake @@ -25,12 +25,13 @@ namespace :gitlab do def setup warn_user_is_not_gitlab + gitlab_shell_authorized_keys = File.join(File.expand_path("~#{Gitlab.config.gitlab_shell.ssh_user}"),'.ssh/authorized_keys') puts "This will rebuild an authorized_keys file." - puts "You will lose any data stored in /home/git/.ssh/authorized_keys." + puts "You will lose any data stored in #{gitlab_shell_authorized_keys}." ask_to_continue puts "" - system("echo '# Managed by gitlab-shell' > /home/git/.ssh/authorized_keys") + system("echo '# Managed by gitlab-shell' > #{gitlab_shell_authorized_keys}") Key.find_each(batch_size: 1000) do |key| if Gitlab::Shell.new.add_key(key.shell_id, key.key) -- cgit v1.2.1 From b7297285369171c95b006e49d6da7bc84b969fc8 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 16 Feb 2013 14:42:22 +0200 Subject: uppercase Gitlab version and revision constants. check api return gitlab version now --- lib/tasks/gitlab/info.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/tasks') diff --git a/lib/tasks/gitlab/info.rake b/lib/tasks/gitlab/info.rake index c44016ef6e8..091de6ee6d5 100644 --- a/lib/tasks/gitlab/info.rake +++ b/lib/tasks/gitlab/info.rake @@ -40,8 +40,8 @@ namespace :gitlab do puts "" puts "GitLab information".yellow - puts "Version:\t#{Gitlab::Version}" - puts "Revision:\t#{Gitlab::Revision}" + puts "Version:\t#{Gitlab::VERSION}" + puts "Revision:\t#{Gitlab::REVISION}" puts "Directory:\t#{Rails.root}" puts "DB Adapter:\t#{database_adapter}" puts "URL:\t\t#{Gitlab.config.gitlab.url}" -- cgit v1.2.1