git_repositories.rb revision 03dee28977299b4b40210d9b7842bf85c136ab7d
included do
end
end
"#{Ontohub::Application.config.git_root}/#{id}"
end
end
end
if o
# update existing ontology
version = o.versions.build({ :commit_oid => commit_oid, :user => user }, { without_protection: true })
else
# create new ontology
o = clazz.new
o.iri = iri || "http://#{Settings.hostname}/#{path}/#{Ontology.filename_without_extension(filepath)}"
version = o.versions.build({ :commit_oid => commit_oid, :user => user }, { without_protection: true })
end
end
end
path ||= '/'
end
path ||= '/'
if path_exists?(path, commit_oid)
end
return nil if entries.empty?
if entries.size == 1
{ type: :file_base,
}
else
{ type: :file_base_ambiguous,
}
end
end
folderpath ||= '/'
end
end
# given a commit oid or a branch name, commit_id returns a hash of oid and branch name if existent
branch_names = git.get_branches.select { |b| b[:oid] == oid }
{ oid: oid, branch_name: nil }
else
{ oid: oid, branch_name: branch_names[0][:name] }
end
else
else
end
end
end
end
end
end
end