application_helper.rb revision c196d8c65ee481e9f02c114c5f419b757dfd22fe
end
false
else
false
end
end
end
end
return @resource_chain if @resource_chain
@resource_chain = []
return @resource_chain
end
@resource_chain = []
return @resource_chain
end
@resource_chain = [ Repository.find_by_path!( controller_name=='repositories' ? params[:id] : params[:repository_id] )]
@resource_chain << CommitReference.new(id)
end
if id = (controller_name=='ontologies' ? params[:id] : params[:ontology_id])
@resource_chain << Ontology.find(id)
end
@resource_chain
end
def display_commit?
!! Settings.display_head_commit
end
def display_commit
# try to read the HEAD from the Git repository
$commit_oid ||= begin
path = Rails.root.join(".git")
Subprocess.run(*%w(git rev-parse --short HEAD), GIT_DIR: path.to_s).strip if path.exist?
end
# try to read the revision from file
$commit_oid ||= begin
path = Rails.root.join("REVISION")
path.read.strip if path.exist?
end
$commit_oid ||= 'unknown'
end
def to_name(sym)
sym.to_s.gsub('_', ' ')
end
end