diff options
Diffstat (limited to 'lib/gitlab_projects.rb')
| -rw-r--r-- | lib/gitlab_projects.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab_projects.rb b/lib/gitlab_projects.rb index ae8cb2d..83f542a 100644 --- a/lib/gitlab_projects.rb +++ b/lib/gitlab_projects.rb @@ -3,7 +3,7 @@ require 'fileutils' require_relative 'gitlab_config' class GitlabProjects - attr_accessor :project_name + attr_reader :project_name, :full_path def initialize @command = ARGV.shift @@ -25,12 +25,12 @@ class GitlabProjects protected def add_project - FileUtils.mkdir_p(@full_path, mode: 0770) - cmd = "cd #{@full_path} && git init --bare && ln -s #{@hook_path} #{@full_path}/hooks/post-receive" + FileUtils.mkdir_p(full_path, mode: 0770) + cmd = "cd #{full_path} && git init --bare && ln -s #{@hook_path} #{full_path}/hooks/post-receive" system(cmd) end def rm_project - FileUtils.rm_rf(@full_path) + FileUtils.rm_rf(full_path) end end |
