Commit graph

18 commits

Author SHA1 Message Date
Bryan Jen
69bee205c4 Adds acceptance testing for setting names containing white space in the middle 2015-03-31 15:28:42 -07:00
Michael Siroskey
a747f6656f Fixed SETTING_REGEX and COMMENTED_SETTING_REGEX to allow spaces in setting names. 2015-03-31 14:27:45 -07:00
Pete Johns
3e46c13dc2 Fix Ruby 1.9.3 build 2014-11-08 18:52:20 +11:00
Pete Johns
efeb174427 Add spec for #123
I may have made this configuration file up
2014-11-08 18:47:08 +11:00
Pete Johns
d98e9bcb77 Add failing spec for KDE Configuration with braces in setting names
Refer https://github.com/puppetlabs/puppetlabs-inifile/pull/131
2014-11-08 17:05:59 +11:00
Huan Do
f343c41cd8 modify test to compare to a hash which better tests the state of each setting
also update @@COMMENTED_SETTING_REGEX to be roughly equal to "(\s*)[#;]+" + @@SETTING_REGEX
2014-09-12 16:55:24 -07:00
Huan Do
681f5c0cb4 fix issue where single characters settings were not being saved.
see https://github.com/boxen/puppet-git/issues/30
2014-09-08 23:12:09 -07:00
Pete Johns
b3fed85b57 Spec for MODULES-1194
Ini_file module does not recognize section names with forward slashes in them

https://tickets.puppetlabs.com/browse/MODULES-1194
2014-07-04 14:31:39 +10:00
Pete Johns
bd99244353 Test allowing $ signs in section names
Verifying that this PR addresses https://github.com/puppetlabs/puppetlabs-inifile/pull/98
2014-06-28 13:22:01 +10:00
Pete Johns
49960e1c5e Handle quotation marks in section names
The section name appears on a line by itself, in square brackets (`[` and
`]`), all characters between the opening `[` and the closing `]` should
be considered to form the section name.
2014-06-26 21:42:45 +10:00
Michal Růžička
77854d55f8 Tests for the quote_char parameter. 2014-05-07 23:52:07 +02:00
Rob Braden
6870dfed7d Add tests to cover settings with square brackets and quotes in the name 2013-12-04 17:16:19 -08:00
Terry Wilson
5904c6f7b4 Allow empty values
It is a legitimate use case to set empty values; to override a
default when an empty value is acceptable for instance. This patch
changes the regex in three ways: it 1) removes the requirement for
a non-whitespace terminator on a setting value, 2) makes the value
match non-greedy so that the \s*$ at the end can catch the newline
and 3) changes the \s*=\s* to [ \t]*=[ \t]* because we don't want
that to capture *any* whitespace (like a newline).
2013-07-10 10:26:37 -05:00
Karel Brezina
4351d8b9c8 Added 'ini_subsetting' custom resource type 2013-03-25 11:34:37 +01:00
Reid Vandewiele
3829e20c49 Allow values with spaces to be parsed and set
Previously, the following stanza would fail as a result of the
ini_setting type not being able to parse spaces in setting values.

  ini_setting { 'main_config_version':
    ensure  => present,
    path    => '/etc/puppetlabs/puppet/puppet.conf',
    section => 'main',
    setting => 'config_version',
    value   => '/etc/puppetlabs/puppet/config_version.sh $environment',
  }

This commit modifes the SETTING_REGEX to account for spaces in setting values.
2012-09-29 12:39:00 -07:00
Chris Price
c57dab4903 Add support for "global" section at beginning of file
This commit does the following:

* Fixes a bug in ExternalIterator
* Adds support for a "global" section before the first named
  section at the beginning of the INI file
* Improves test coverage
2012-08-17 04:48:28 -07:00
Chris Price
4f0e7264e3 final commit for 0.0.1 release
* Updated README
* Fixed a small bug that would be triggered if the file specified
  by `path` didn't exist.
* Added a smoke test manifest
2012-08-16 21:50:20 -07:00
Chris Price
9c76b6af12 First (basic) working version of ini_setting provider 2012-07-28 21:59:54 -07:00