From 266ab2d4d698da4908e7c4ff99b40a36492aa423 Mon Sep 17 00:00:00 2001 From: Tim Heckman Date: Mon, 23 Jan 2017 18:12:40 -0800 Subject: [PATCH] fix --event-group and --group flag generation; v0.2.4 The flags `--event_group` and `--metric_group` just didn't exist. Switch them to be `--event-group` and `--group` respectively. --- libraries/lwrp_helpers.rb | 4 ++-- metadata.rb | 2 +- test/recipes/lwrp_test.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/lwrp_helpers.rb b/libraries/lwrp_helpers.rb index a4059a4..0804157 100644 --- a/libraries/lwrp_helpers.rb +++ b/libraries/lwrp_helpers.rb @@ -26,8 +26,8 @@ def command_string c_str << "--label=#{format_string(label)} " c_str << "--namespace=#{format_string(namespace)} " unless namespace.nil? || namespace.empty? - c_str << "--event_group=#{format_string(event_group)} " unless event_group.nil? || event_group.empty? - c_str << "--metric_group=#{format_string(metric_group)} " unless metric_group.nil? || metric_group.empty? + c_str << "--event-group=#{format_string(event_group)} " unless event_group.nil? || event_group.empty? + c_str << "--group=#{format_string(metric_group)} " unless metric_group.nil? || metric_group.empty? c_str << "--warn-after=#{warn_after} " if warn_after > 0 c_str << "--wait-secs=#{wait_secs_for_lock} " if lock && wait_secs_for_lock > 0 diff --git a/metadata.rb b/metadata.rb index b637c8c..78eedb6 100644 --- a/metadata.rb +++ b/metadata.rb @@ -13,7 +13,7 @@ # limitations under the License. name 'cronner' -version '0.2.3' +version '0.2.4' license 'Apache 2.0' description 'Installs/Configures cronner' diff --git a/test/recipes/lwrp_test.rb b/test/recipes/lwrp_test.rb index de8f812..0d456af 100644 --- a/test/recipes/lwrp_test.rb +++ b/test/recipes/lwrp_test.rb @@ -23,6 +23,6 @@ its('group') { should eql 'root' } its('content') { should match /^# Crontab for test_job managed by Chef\./ } its('content') do - should match %r(^0 12 \* \* \* root /usr/local/bin/cronner --label=test_job --namespace=testenv --event_group=eventgroup --metric_group=metricgroup --warn-after=10 --event --log-fail --lock --sensitive -- /bin/true$) + should match %r(^0 12 \* \* \* root /usr/local/bin/cronner --label=test_job --namespace=testenv --event-group=eventgroup --group=metricgroup --warn-after=10 --event --log-fail --lock --sensitive -- /bin/true$) end end