Cross Reference:
xref
: /
ontohub
/
app
/
models
/
repository
/
git_repositories.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
git_repositories.rb revision f1304db188bff0f7c40172819863ffe54401b400
module
Repository
::
GitRepositories
extend
ActiveSupport
::
Concern
included
do
after_create
:
git
after_destroy
:
destroy_git
end
def
git
@
git
||=
GitRepository.new
(
local_path
)
end
def
local_path
"#{Ontohub::
Application.config.git
_root}/#{id}"
end
def
destroy_git
FileUtils.rmtree
local_path
end
end