diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-10 22:53:33 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-10 22:53:33 +0100 |
commit | 9f940aeaf4fbfed2906900dda81b1f6b5a0656a6 (patch) | |
tree | 0d48fe25823f36f668d43b990469c3b407eb6659 | |
parent | 8918d11379cc29d679de72f230193cd35d722c3e (diff) | |
download | gitlab-ce-9f940aeaf4fbfed2906900dda81b1f6b5a0656a6.tar.gz |
Fix detecting Ruby version and Omniauth providers in gitlab:env:info task
Fixes #2245
-rw-r--r-- | lib/tasks/gitlab/info.rake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tasks/gitlab/info.rake b/lib/tasks/gitlab/info.rake index 231c05b4c59..9f423628332 100644 --- a/lib/tasks/gitlab/info.rake +++ b/lib/tasks/gitlab/info.rake @@ -16,6 +16,8 @@ namespace :gitlab do # check if there is an RVM environment rvm_version = run_and_match("rvm --version", /[\d\.]+/).try(:to_s) + # check Ruby version + ruby_version = run_and_match("ruby --version", /[\d\.p]+/).try(:to_s) # check Gem version gem_version = run("gem --version") # check Bundler version @@ -29,7 +31,7 @@ namespace :gitlab do puts "Current User:\t#{`whoami`}" puts "Using RVM:\t#{rvm_version.present? ? "yes".green : "no"}" puts "RVM Version:\t#{rvm_version}" if rvm_version.present? - puts "Ruby Version:\t#{ENV['RUBY_VERSION'] || "unknown".red}" + puts "Ruby Version:\t#{ruby_version || "unknown".red}" puts "Gem Version:\t#{gem_version || "unknown".red}" puts "Bundler Version:#{bunder_version || "unknown".red}" puts "Rake Version:\t#{rake_version || "unknown".red}" @@ -44,6 +46,9 @@ namespace :gitlab do http_clone_url = project.http_url_to_repo ssh_clone_url = project.ssh_url_to_repo + omniauth_providers = Gitlab.config.omniauth_providers + omniauth_providers.map! { |provider| provider['name'] } + puts "" puts "GitLab information".yellow puts "Version:\t#{Gitlab::Version}" @@ -55,7 +60,7 @@ namespace :gitlab do puts "SSH Clone URL:\t#{ssh_clone_url}" puts "Using LDAP:\t#{Gitlab.config.ldap_enabled? ? "yes".green : "no"}" puts "Using Omniauth:\t#{Gitlab.config.omniauth_enabled? ? "yes".green : "no"}" - puts "Omniauth Providers:\t#{Gitlab.config.omniauth_providers}" if Gitlab.config.omniauth_enabled? + puts "Omniauth Providers: #{omniauth_providers.map(&:magenta).join(', ')}" if Gitlab.config.omniauth_enabled? |