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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
c3b9774f
Commit
c3b9774f
authored
Dec 13, 2012
by
Riyad Preukschas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update and add checks
parent
71266ad2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
903 additions
and
70 deletions
+903
-70
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+894
-69
lib/tasks/gitlab/info.rake
lib/tasks/gitlab/info.rake
+9
-1
No files found.
lib/tasks/gitlab/check.rake
View file @
c3b9774f
This diff is collapsed.
Click to expand it.
lib/tasks/gitlab/info.rake
View file @
c3b9774f
...
@@ -84,7 +84,13 @@ namespace :gitlab do
...
@@ -84,7 +84,13 @@ namespace :gitlab do
# Helper methods
# Helper methods
# Runs the given command and matches the output agains the given RegExp
# Runs the given command and matches the output agains the given pattern
#
# Returns nil if nothing matched
# Retunrs the MatchData if the pattern matched
#
# see also #run
# see also String#match
def
run_and_match
(
command
,
regexp
)
def
run_and_match
(
command
,
regexp
)
run
(
command
).
try
(
:match
,
regexp
)
run
(
command
).
try
(
:match
,
regexp
)
end
end
...
@@ -93,6 +99,8 @@ namespace :gitlab do
...
@@ -93,6 +99,8 @@ namespace :gitlab do
#
#
# Returns nil if the command was not found
# Returns nil if the command was not found
# Returns the output of the command otherwise
# Returns the output of the command otherwise
#
# see also #run_and_match
def
run
(
command
)
def
run
(
command
)
unless
`
#{
command
}
2>/dev/null`
.
blank?
unless
`
#{
command
}
2>/dev/null`
.
blank?
`
#{
command
}
`
`
#{
command
}
`
...
...
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