From owner-freebsd-ports-bugs@FreeBSD.ORG Wed May 21 14:00:01 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 C0B1EA2 for ; Wed, 21 May 2014 14:00:01 +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 9D18729BC for ; Wed, 21 May 2014 14:00:01 +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 s4LE01g7058266 for ; Wed, 21 May 2014 14:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4LE01VG058265; Wed, 21 May 2014 14:00:01 GMT (envelope-from gnats) Resent-Date: Wed, 21 May 2014 14:00:01 GMT Resent-Message-Id: <201405211400.s4LE01VG058265@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 [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 C418FFBB for ; Wed, 21 May 2014 13:56:59 +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 A4A8B2993 for ; Wed, 21 May 2014 13:56:59 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4LDuxsq053837 for ; Wed, 21 May 2014 13:56:59 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4LDuxdT053836; Wed, 21 May 2014 13:56:59 GMT (envelope-from nobody) Message-Id: <201405211356.s4LDuxdT053836@cgiserv.freebsd.org> Date: Wed, 21 May 2014 13:56:59 GMT From: Michael Moll To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/190069: sysutils/rubygem-hammer_cli - update to 0.1.1 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 May 2014 14:00:01 -0000 >Number: 190069 >Category: ports >Synopsis: sysutils/rubygem-hammer_cli - update to 0.1.1 >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: Wed May 21 14:00:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Michael Moll >Release: >Organization: >Environment: >Description: >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 354749) +++ Makefile (working copy) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= hammer_cli -PORTVERSION= 0.1.0 +PORTVERSION= 0.1.1 CATEGORIES= sysutils ruby MASTER_SITES= RG @@ -11,7 +11,7 @@ LICENSE= GPLv3 -RUN_DEPENDS= rubygem-apipie-bindings>=0.0.6:${PORTSDIR}/devel/rubygem-apipie-bindings \ +RUN_DEPENDS= rubygem-apipie-bindings>=0.0.8:${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 \ Index: distinfo =================================================================== --- distinfo (revision 354749) +++ distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (rubygem/hammer_cli-0.1.0.gem) = 2b41ae48e3eb3f4adb8a11c2facce28cf6e61eca163f2bbef9dc90eb7c45fca7 -SIZE (rubygem/hammer_cli-0.1.0.gem) = 91136 +SHA256 (rubygem/hammer_cli-0.1.1.gem) = 8ed6878847894b69bd0c09317fc4e2e0557662bf2bf38d53f851d8ad85a6c7e2 +SIZE (rubygem/hammer_cli-0.1.1.gem) = 93696 Index: files/cli_config.yml.sample =================================================================== --- files/cli_config.yml.sample (revision 354749) +++ files/cli_config.yml.sample (working copy) @@ -1,15 +1,24 @@ +# User interface related settings :ui: + # Enable interactive queries? :interactive: true + # Number of records listed per page :per_page: 20 + # Location of shell history file :history_file: '~/.hammer/history' -# enable/disable color output of logger in Clamp commands +# Enable/disable color output of logger in Clamp commands :watch_plain: false +# Directory where the logs are stored. The default is /var/log/hammer/ and the log file is named hammer.log :log_dir: '~/.hammer/log' + +# Logging level. One of debug, info, warning, error, fatal :log_level: 'error' -:log_api_calls: false + #:log_owner: 'foreman' #:log_group: 'foreman' -#:log_size: 5 #MB + +# Maximum log size in bytes. Log rotates when the value gets exceeded +#:log_size: 5 #in MB Index: files/patch-fca42d1a8e9f7a4dfabca0900818e5d355b3b554 =================================================================== --- files/patch-fca42d1a8e9f7a4dfabca0900818e5d355b3b554 (revision 354749) +++ files/patch-fca42d1a8e9f7a4dfabca0900818e5d355b3b554 (working copy) @@ -1,69 +0,0 @@ -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 Index: pkg-plist =================================================================== --- pkg-plist (revision 354749) +++ pkg-plist (working copy) @@ -1,6 +1,4 @@ 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 +@sample etc/hammer/cli_config.yml.sample @dirrmtry etc/hammer/cli.modules.d @dirrmtry etc/hammer >Release-Note: >Audit-Trail: >Unformatted: