Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
65253017df68
Commit
c3b9774f
authored
Dec 13, 2012
by
Riyad Preukschas
Browse files
Update and add checks
parent
54ed61c74235
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
lib/tasks/gitlab/check.rake
View file @
65253017
This diff is collapsed.
Click to expand it.
lib/tasks/gitlab/info.rake
View file @
65253017
...
...
@@ -84,7 +84,13 @@ namespace :gitlab do
# 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
)
run
(
command
).
try
(
:match
,
regexp
)
end
...
...
@@ -93,6 +99,8 @@ namespace :gitlab do
#
# Returns nil if the command was not found
# Returns the output of the command otherwise
#
# see also #run_and_match
def
run
(
command
)
unless
`
#{
command
}
2>/dev/null`
.
blank?
`
#{
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