From 188e34af98d0f6fa5ea25284f62a1b0bf1abb948 Mon Sep 17 00:00:00 2001 From: Khai Do Date: Thu, 4 Aug 2016 10:55:37 -0700 Subject: [PATCH] fix its_rules parameterization in template The 'event-type' reference should be 'event_type' instead. Also fixed a bug in the documentation and subsequent beaker test. Change-Id: I4802f49e1fb1d3210aa49b4fe12a6e33a9f3bd42 --- manifests/init.pp | 4 ++-- spec/acceptance/fixtures/default.pp | 4 ++-- templates/gerrit.its_rules.erb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 307c469..146abf1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -86,9 +86,9 @@ # 'name' => 'approval-Code-Review', # 'approvals' => '-2, -1', # }, -# ] +# ], # }, -# ] +# ], # # trackingids: # A list of regexes to reference external tracking systems. diff --git a/spec/acceptance/fixtures/default.pp b/spec/acceptance/fixtures/default.pp index 7d5ba03..0d2f044 100644 --- a/spec/acceptance/fixtures/default.pp +++ b/spec/acceptance/fixtures/default.pp @@ -57,9 +57,9 @@ class { '::gerrit': 'name' => 'approval-Code-Review', 'approvals' => '-2, -1', }, - ] + ], }, - ] + ], } class { '::gerrit::cron': } diff --git a/templates/gerrit.its_rules.erb b/templates/gerrit.its_rules.erb index ec4e3e6..a9a7973 100644 --- a/templates/gerrit.its_rules.erb +++ b/templates/gerrit.its_rules.erb @@ -1,7 +1,7 @@ <% @its_rules.each do |its_rule| -%> [rule "<%= its_rule['name'] %>"] action = <%= its_rule['action'] %> - <% unless its_rule['event-type'].nil? -%> + <% unless its_rule['event_type'].nil? -%> event-type = <%= its_rule['event_type'] %> <% end -%> <% unless its_rule['label'].nil? -%>