module-inifile/spec
mh 6eb8f9ca98 introduce create_ini_settings
create_ini_settings is a function that allows you to create
ini_setting resources from a simple hash:

    $settings = {  section1 => {
        setting1 => val1
      },
      section2 => {
        setting2 => val2,
        setting3 => {
          ensure => absent
        }
      }
    }
    $defaults = {
      path => '/tmp/foo.ini'
    }
    create_ini_settings($settings,$defaults)

Will create the following resources

    ini_setting{'[section1] setting1':
      ensure  => present,
      section => 'section1',
      setting => 'setting1',
      value   => 'val1',
      path    => '/tmp/foo.ini',
    }
    ini_setting{'[section2] setting2':
      ensure  => present,
      section => 'section2',
      setting => 'setting2',
      value   => 'val2',
      path    => '/tmp/foo.ini',
    }
    ini_setting{'[section2] setting3':
      ensure  => absent,
      section => 'section2',
      setting => 'setting3',
      path    => '/tmp/foo.ini',
    }

This allows one to create much easier classes
that should be able to manage an arbritary set of
ini-style settings without having to specify each
one of them.
2015-01-28 22:09:34 +01:00
..
acceptance Merge pull request #141 from petems/dry_up_spec_test 2015-01-15 08:49:00 -08:00
classes introduce create_ini_settings 2015-01-28 22:09:34 +01:00
fixtures introduce create_ini_settings 2015-01-28 22:09:34 +01:00
functions introduce create_ini_settings 2015-01-28 22:09:34 +01:00
unit/puppet Fix spec: predicates return booleans 2014-12-18 10:22:20 -08:00
spec.opts Sync files 2014-06-25 17:23:22 -07:00
spec_helper.rb (FM-161) Add beaker tests for parameter coverage 2014-01-27 10:33:45 -08:00
spec_helper_acceptance.rb Update spec_helper for consistency. 2014-08-28 12:39:44 -04:00