From d2c1e07e8088fb2372d258cfdd27ee4aab10cef1 Mon Sep 17 00:00:00 2001 From: Stephen Date: Tue, 14 Aug 2012 13:38:08 +0100 Subject: Fixed regex to match sections and settings with non alphanumeric characters. Fixed writing to file without any sections at all. Fixed exists checking for variable type by always casting to string and added all the tests for the above items. --- lib/puppet/provider/ini_setting/ruby.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/provider') diff --git a/lib/puppet/provider/ini_setting/ruby.rb b/lib/puppet/provider/ini_setting/ruby.rb index f04af06..9f13dff 100644 --- a/lib/puppet/provider/ini_setting/ruby.rb +++ b/lib/puppet/provider/ini_setting/ruby.rb @@ -2,7 +2,7 @@ require File.expand_path('../../../util/ini_file', __FILE__) Puppet::Type.type(:ini_setting).provide(:ruby) do def exists? - ini_file.get_value(resource[:section], resource[:setting]) == resource[:value] + ini_file.get_value(resource[:section], resource[:setting]) == resource[:value].to_s end def create -- cgit v1.2.3