c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksamodule HistoryHelper
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa def repository
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa @repository ||= Repository.find_by_path!(params[:repository_id])
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa end
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa def ontology
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa @ontology ||= repository.primary_ontology(path)
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa end
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa def ref
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa params[:ref] || 'master'
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa end
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa def commit_id
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa @commit_id ||= repository.commit_id(params[:ref])
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa end
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa def oid
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa @oid ||= commit_id[:oid] unless commit_id.nil?
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa end
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa def path
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa params[:path]
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksa end
c91b6cebaf80ffa16d47815b9dd52413369f47f5Eugen Kuksaend