Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
9f940aea
Commit
9f940aea
authored
Dec 10, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix detecting Ruby version and Omniauth providers in gitlab:env:info task
Fixes #2245
parent
8918d113
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
lib/tasks/gitlab/info.rake
lib/tasks/gitlab/info.rake
+7
-2
No files found.
lib/tasks/gitlab/info.rake
View file @
9f940aea
...
@@ -16,6 +16,8 @@ namespace :gitlab do
...
@@ -16,6 +16,8 @@ namespace :gitlab do
# check if there is an RVM environment
# check if there is an RVM environment
rvm_version
=
run_and_match
(
"rvm --version"
,
/[\d\.]+/
).
try
(
:to_s
)
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
# check Gem version
gem_version
=
run
(
"gem --version"
)
gem_version
=
run
(
"gem --version"
)
# check Bundler version
# check Bundler version
...
@@ -29,7 +31,7 @@ namespace :gitlab do
...
@@ -29,7 +31,7 @@ namespace :gitlab do
puts
"Current User:
\t
#{
`whoami`
}
"
puts
"Current User:
\t
#{
`whoami`
}
"
puts
"Using RVM:
\t
#{
rvm_version
.
present?
?
"yes"
.
green
:
"no"
}
"
puts
"Using RVM:
\t
#{
rvm_version
.
present?
?
"yes"
.
green
:
"no"
}
"
puts
"RVM Version:
\t
#{
rvm_version
}
"
if
rvm_version
.
present?
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
"Gem Version:
\t
#{
gem_version
||
"unknown"
.
red
}
"
puts
"Bundler Version:
#{
bunder_version
||
"unknown"
.
red
}
"
puts
"Bundler Version:
#{
bunder_version
||
"unknown"
.
red
}
"
puts
"Rake Version:
\t
#{
rake_version
||
"unknown"
.
red
}
"
puts
"Rake Version:
\t
#{
rake_version
||
"unknown"
.
red
}
"
...
@@ -44,6 +46,9 @@ namespace :gitlab do
...
@@ -44,6 +46,9 @@ namespace :gitlab do
http_clone_url
=
project
.
http_url_to_repo
http_clone_url
=
project
.
http_url_to_repo
ssh_clone_url
=
project
.
ssh_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
""
puts
"GitLab information"
.
yellow
puts
"GitLab information"
.
yellow
puts
"Version:
\t
#{
Gitlab
::
Version
}
"
puts
"Version:
\t
#{
Gitlab
::
Version
}
"
...
@@ -55,7 +60,7 @@ namespace :gitlab do
...
@@ -55,7 +60,7 @@ namespace :gitlab do
puts
"SSH Clone URL:
\t
#{
ssh_clone_url
}
"
puts
"SSH Clone URL:
\t
#{
ssh_clone_url
}
"
puts
"Using LDAP:
\t
#{
Gitlab
.
config
.
ldap_enabled?
?
"yes"
.
green
:
"no"
}
"
puts
"Using LDAP:
\t
#{
Gitlab
.
config
.
ldap_enabled?
?
"yes"
.
green
:
"no"
}
"
puts
"Using Omniauth:
\t
#{
Gitlab
.
config
.
omniauth_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?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment