diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-25 23:29:37 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-03-25 23:29:37 -0700 |
commit | 05382645f0bd3a28d114ef4b21f334372737685e (patch) | |
tree | a5ef146a1ea12b29e622adbba29b23601d7ac62d /lib/gitlab_shell.rb | |
parent | 02c7da2e484478a88825f2350a391c13773944ab (diff) | |
parent | 7d4780eca8dc964ac5b825b183a1fd73a074514e (diff) | |
download | gitlab-shell-05382645f0bd3a28d114ef4b21f334372737685e.tar.gz |
Merge pull request #16 from docwhat/exec
Improve gitlab_shell spec and replace `system()` with `exec()`
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r-- | lib/gitlab_shell.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index abc5ac2..2d49370 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -44,13 +44,17 @@ class GitlabShell def process_cmd repo_full_path = File.join(repos_path, repo_name) - system("#{@git_cmd} #{repo_full_path}") + exec_cmd "#{@git_cmd} #{repo_full_path}" end def validate_access api.allowed?(@git_cmd, @repo_name, @key_id, '_any') end + def exec_cmd args + Kernel::exec args + end + def api GitlabNet.new end |