From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Apr 5 14:50:02 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90630CF8 for ; Sat, 5 Apr 2014 14:50:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8679C6 for ; Sat, 5 Apr 2014 14:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s35Eo2jn027640 for ; Sat, 5 Apr 2014 14:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s35Eo2JH027639; Sat, 5 Apr 2014 14:50:02 GMT (envelope-from gnats) Resent-Date: Sat, 5 Apr 2014 14:50:02 GMT Resent-Message-Id: <201404051450.s35Eo2JH027639@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Michael Moll Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D8FFA9F for ; Sat, 5 Apr 2014 14:44:54 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1A5F98A for ; Sat, 5 Apr 2014 14:44:53 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s35EirWJ090556 for ; Sat, 5 Apr 2014 14:44:53 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s35EiriR090548; Sat, 5 Apr 2014 14:44:53 GMT (envelope-from nobody) Message-Id: <201404051444.s35EiriR090548@cgiserv.freebsd.org> Date: Sat, 5 Apr 2014 14:44:53 GMT From: Michael Moll To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/188289: [PATCH] sysutils/rubygem-hammer_cli: update to 0.1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Apr 2014 14:50:02 -0000 >Number: 188289 >Category: ports >Synopsis: [PATCH] sysutils/rubygem-hammer_cli: update to 0.1.0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Apr 05 14:50:02 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Michael Moll >Release: >Organization: >Environment: >Description: ..and take maintainership. files/patch-bin__hammer was removed >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 350222) +++ Makefile (working copy) @@ -2,19 +2,23 @@ # $FreeBSD$ PORTNAME= hammer_cli -PORTVERSION= 0.0.18 +PORTVERSION= 0.1.0 CATEGORIES= sysutils ruby MASTER_SITES= RG -MAINTAINER= ruby@FreeBSD.org +MAINTAINER= kvedulv@kvedulv.de COMMENT= Provides CLI interfaces for Ruby apps LICENSE= GPLv3 -RUN_DEPENDS= rubygem-awesome_print>=1.1.0:${PORTSDIR}/devel/rubygem-awesome_print \ +RUN_DEPENDS= rubygem-apipie-bindings>=0.0.6:${PORTSDIR}/devel/rubygem-apipie-bindings \ + rubygem-awesome_print>=1.1.0:${PORTSDIR}/devel/rubygem-awesome_print \ rubygem-clamp>=0.6.3:${PORTSDIR}/devel/rubygem-clamp \ rubygem-fastercsv>=1.5.5:${PORTSDIR}/devel/rubygem-fastercsv \ + rubygem-fast_gettext>=0.8.1:${PORTSDIR}/devel/rubygem-fast_gettext \ rubygem-highline>=1.6.20:${PORTSDIR}/devel/rubygem-highline \ + rubygem-json>=1.8.1:${PORTSDIR}/devel/rubygem-json \ + rubygem-locale=2.0.8:${PORTSDIR}/devel/rubygem-locale \ rubygem-logging>=1.8.1:${PORTSDIR}/devel/rubygem-logging \ rubygem-mime-types>=1.0:${PORTSDIR}/misc/rubygem-mime-types \ rubygem-rest-client>=1.6.7:${PORTSDIR}/www/rubygem-rest-client \ @@ -24,6 +28,11 @@ USE_RUBYGEMS= yes RUBYGEM_AUTOPLIST= yes -PLIST_FILES= bin/hammer +.include -.include +post-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/hammer + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/hammer/cli.modules.d + ${INSTALL_DATA} ${FILESDIR}/cli_config.yml.sample ${STAGEDIR}${PREFIX}/etc/hammer/cli_config.yml.sample + +.include Index: distinfo =================================================================== --- distinfo (revision 350222) +++ distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (rubygem/hammer_cli-0.0.18.gem) = 6cbda00ba509029e8fc96edda0d1076d285d1f97eeb0b8590f4b939106ec023c -SIZE (rubygem/hammer_cli-0.0.18.gem) = 80896 +SHA256 (rubygem/hammer_cli-0.1.0.gem) = 2b41ae48e3eb3f4adb8a11c2facce28cf6e61eca163f2bbef9dc90eb7c45fca7 +SIZE (rubygem/hammer_cli-0.1.0.gem) = 91136 Index: files/cli_config.yml.sample =================================================================== --- files/cli_config.yml.sample (revision 0) +++ files/cli_config.yml.sample (working copy) @@ -0,0 +1,15 @@ +:ui: + :interactive: true + :per_page: 20 + :history_file: '~/.hammer/history' + + +# enable/disable color output of logger in Clamp commands +:watch_plain: false + +:log_dir: '~/.hammer/log' +:log_level: 'error' +:log_api_calls: false +#:log_owner: 'foreman' +#:log_group: 'foreman' +#:log_size: 5 #MB Property changes on: files/cli_config.yml.sample ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-bin__hammer =================================================================== --- files/patch-bin__hammer (revision 350222) +++ files/patch-bin__hammer (working copy) @@ -1,11 +0,0 @@ ---- bin/hammer.orig 2014-03-12 11:07:16.000000000 +0100 -+++ bin/hammer 2014-03-12 11:07:33.000000000 +0100 -@@ -20,7 +20,7 @@ - # load user's settings - require 'hammer_cli/settings' - --CFG_PATH = ['./config/cli_config.yml', '~/.foreman/cli_config.yml', '/etc/foreman/cli_config.yml'] -+CFG_PATH = ['./config/cli_config.yml', '~/.foreman/cli_config.yml', '/etc/foreman/cli_config.yml', "#{::RbConfig::CONFIG['sysconfdir']}/foreman/cli_config.yml"].uniq - - if preparser.config - CFG_PATH.unshift preparser.config Index: files/patch-fca42d1a8e9f7a4dfabca0900818e5d355b3b554 =================================================================== --- files/patch-fca42d1a8e9f7a4dfabca0900818e5d355b3b554 (revision 0) +++ files/patch-fca42d1a8e9f7a4dfabca0900818e5d355b3b554 (working copy) @@ -0,0 +1,69 @@ +commit fca42d1a8e9f7a4dfabca0900818e5d355b3b554 +Author: Ivan Nečas +Date: Wed Apr 2 15:08:17 2014 +0200 + + Fixes #5025 - Add support for boolean fields + +diff --git lib/hammer_cli/output/fields.rb lib/hammer_cli/output/fields.rb +index 1abe7b2..26b5540 100644 +--- lib/hammer_cli/output/fields.rb ++++ lib/hammer_cli/output/fields.rb +@@ -86,4 +86,7 @@ module Fields + class Collection < ContainerField + end + ++ class Boolean < Field ++ end ++ + end +diff --git lib/hammer_cli/output/formatters.rb lib/hammer_cli/output/formatters.rb +index fa2d299..2d261de 100644 +--- lib/hammer_cli/output/formatters.rb ++++ lib/hammer_cli/output/formatters.rb +@@ -144,10 +144,22 @@ module HammerCLI::Output + end + end + ++ class BooleanFormatter < FieldFormatter ++ ++ def tags ++ [:flat, :screen] ++ end ++ ++ def format(value) ++ !value || value == "" ? _("no") : _("yes") ++ end ++ end ++ + HammerCLI::Output::Output.register_formatter(DateFormatter.new, :Date) + HammerCLI::Output::Output.register_formatter(ListFormatter.new, :List) + HammerCLI::Output::Output.register_formatter(KeyValueFormatter.new, :KeyValue) + HammerCLI::Output::Output.register_formatter(LongTextFormatter.new, :LongText) ++ HammerCLI::Output::Output.register_formatter(BooleanFormatter.new, :Boolean) + + end + end +diff --git test/unit/output/formatters_test.rb test/unit/output/formatters_test.rb +index 2a3a610..050a085 100644 +--- test/unit/output/formatters_test.rb ++++ test/unit/output/formatters_test.rb +@@ -138,3 +138,19 @@ describe HammerCLI::Output::Formatters::LongTextFormatter do + end + + end ++ ++describe HammerCLI::Output::Formatters::BooleanFormatter do ++ ++ it "says yes for true like objects" do ++ formatter = HammerCLI::Output::Formatters::BooleanFormatter.new ++ formatter.format(true).must_equal "yes" ++ formatter.format("yes").must_equal "yes" ++ end ++ ++ it "says no for false and nil and empty string" do ++ formatter = HammerCLI::Output::Formatters::BooleanFormatter.new ++ formatter.format(nil).must_equal "no" ++ formatter.format(false).must_equal "no" ++ formatter.format("").must_equal "no" ++ end ++end Property changes on: files/patch-fca42d1a8e9f7a4dfabca0900818e5d355b3b554 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: pkg-plist =================================================================== --- pkg-plist (revision 0) +++ pkg-plist (working copy) @@ -0,0 +1,6 @@ +bin/hammer +@unexec if cmp -s %D/etc/hammer/cli_config.yml.sample %D/etc/hammer/cli_config.yml; then rm -f %D/etc/hammer/cli_config.yml; fi +etc/hammer/cli_config.yml.sample +@exec if [ ! -f %D/etc/hammer/cli_config.yml ] ; then cp -p %D/etc/hammer/cli_config.yml.sample %D/etc/hammer/cli_config.yml; fi +@dirrmtry etc/hammer/cli.modules.d +@dirrmtry etc/hammer Property changes on: pkg-plist ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property >Release-Note: >Audit-Trail: >Unformatted: