summaryrefslogtreecommitdiff
path: root/lib/gitlab_shell.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-25 23:29:37 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-03-25 23:29:37 -0700
commit05382645f0bd3a28d114ef4b21f334372737685e (patch)
treea5ef146a1ea12b29e622adbba29b23601d7ac62d /lib/gitlab_shell.rb
parent02c7da2e484478a88825f2350a391c13773944ab (diff)
parent7d4780eca8dc964ac5b825b183a1fd73a074514e (diff)
downloadgitlab-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.rb6
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