Cross Reference: symlinks.rb
xref
: /
ontohub
/
app
/
models
/
repository
/
symlinks.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
symlinks.rb revision 9337e8c9590bbc8ad58d26bba312236c6328cc9d
281
N/A
#
281
N/A
# Generates a symlink for exposing the repositories via git daemon
281
N/A
#
281
N/A
module
Repository
::
Symlinks
281
N/A
extend
ActiveSupport
::
Concern
281
N/A
281
N/A
included
do
281
N/A
after_save
:
symlink_update
,
if
: :
path_changed
?
281
N/A
before_destroy
:
symlink_remove
281
N/A
end
281
N/A
281
N/A
def
symlink_name
281
N/A
Ontohub
::
Application.config.git_daemon_path.join
(
"#{path}.git"
)
281
N/A
end
281
N/A
281
N/A
protected
281
N/A
281
N/A
def
symlink_update
281
N/A
Ontohub
::
Application.config.git_daemon_path.mkpath
281
N/A
symlink_remove
281
N/A
symlink_name.make
_symlink
local_path
281
N/A
end
281
N/A
281
N/A
def
symlink_remove
281
N/A
symlink_name.unlink
if
symlink_name.exist
?
281
N/A
end
281
N/A
281
N/A
end
281
N/A