Class: Gisha::CreateRepositoryCommand

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/gisha/cli.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



40
41
42
43
# File 'lib/gisha/cli.rb', line 40

def execute
  Rugged::Repository.init_at(path, :bare)
  FileUtils.cp("#{root_path}/hooks/update", "#{path}/hooks")
end

#root_pathObject



45
46
47
# File 'lib/gisha/cli.rb', line 45

def root_path
  @root_path ||= File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
end