From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8461813877A for ; Sun, 3 Aug 2014 18:37:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2ABCEE0712; Sun, 3 Aug 2014 18:37:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C87B2E0712 for ; Sun, 3 Aug 2014 18:37:32 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 08A68340442 for ; Sun, 3 Aug 2014 18:37:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 9759D18815 for ; Sun, 3 Aug 2014 18:37:30 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1407091038.87d447ac63ffe56b419350a9740c21c7e1554ebb.robbat2@gentoo> Subject: [gentoo-commits] proj/infra-status:master commit in: lib/ X-VCS-Repository: proj/infra-status X-VCS-Files: lib/helpers.rb X-VCS-Directories: lib/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 87d447ac63ffe56b419350a9740c21c7e1554ebb X-VCS-Branch: master Date: Sun, 3 Aug 2014 18:37:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 5bab17f8-d4f5-4bca-b440-be3c6a30757c X-Archives-Hash: 10af16e7d2dd9f21998b5a88af6d6fe8 commit: 87d447ac63ffe56b419350a9740c21c7e1554ebb Author: Robin H. Johnson orbis-terrarum net> AuthorDate: Sun Aug 3 18:37:18 2014 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Aug 3 18:37:18 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/infra-status.git;a=commit;h=87d447ac Refactor to find a nil. Signed-off-by: Robin H. Johnson orbis-terrarum.net> --- lib/helpers.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/helpers.rb b/lib/helpers.rb index b321f0a..4ef27d4 100644 --- a/lib/helpers.rb +++ b/lib/helpers.rb @@ -22,12 +22,15 @@ helpers do content = '
' services.each do |service| + service_info_txt = service_info(service) + service_name = ServiceRegistry.instance.services[service][:name] + data_service_name = service_name.gsub('"', "'") content << " - #{service_info service} - #{ServiceRegistry.instance.services[service][:name]} + data-service=\"#{service}\" data-service-name=\"#{data_service_name}\"> + #{service_info_txt} + #{service_name} " end