From 752aa8e56440d94dfddc6c251e7b0ff4fbf8fd1c Mon Sep 17 00:00:00 2001 From: Helen Campbell Date: Mon, 18 Jul 2016 11:17:37 +0100 Subject: [PATCH] Revert "Remove brackets from ini_setting titles to workaround PUP-4709" This reverts commit b425fe5a492a7eb9049ff4c5d111a10b6c8d1219. --- lib/puppet/parser/functions/create_ini_settings.rb | 2 +- spec/classes/create_ini_settings_test_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/puppet/parser/functions/create_ini_settings.rb b/lib/puppet/parser/functions/create_ini_settings.rb index eb00404..f0eff6d 100644 --- a/lib/puppet/parser/functions/create_ini_settings.rb +++ b/lib/puppet/parser/functions/create_ini_settings.rb @@ -69,7 +69,7 @@ EOS end settings[section].each do |setting, value| - res["#{path} #{section} #{setting}"] = { + res["#{path} [#{section}] #{setting}"] = { 'ensure' => 'present', 'section' => section, 'setting' => setting, diff --git a/spec/classes/create_ini_settings_test_spec.rb b/spec/classes/create_ini_settings_test_spec.rb index e1c99fe..c81f93f 100644 --- a/spec/classes/create_ini_settings_test_spec.rb +++ b/spec/classes/create_ini_settings_test_spec.rb @@ -2,21 +2,21 @@ require 'spec_helper' # end-to-end test of the create_init_settings function describe 'create_ini_settings_test' do it { should have_ini_setting_resource_count(3) } - it { should contain_ini_setting('/tmp/foo.ini section1 setting1').with( + it { should contain_ini_setting('/tmp/foo.ini [section1] setting1').with( :ensure => 'present', :section => 'section1', :setting => 'setting1', :value => 'val1', :path => '/tmp/foo.ini' )} - it { should contain_ini_setting('/tmp/foo.ini section2 setting2').with( + it { should contain_ini_setting('/tmp/foo.ini [section2] setting2').with( :ensure => 'present', :section => 'section2', :setting => 'setting2', :value => 'val2', :path => '/tmp/foo.ini' )} - it { should contain_ini_setting('/tmp/foo.ini section2 setting3').with( + it { should contain_ini_setting('/tmp/foo.ini [section2] setting3').with( :ensure => 'absent', :section => 'section2', :setting => 'setting3',