Merge pull request #16 from bodepd/master

changes for child provider usage
Minor tweaks to handling of removing settings

This commit makes some minor changes to how we handle removing
settings.  In particular, it updates all of the line numbers
of the various 'section' objects to correspond to the new
state of the world based on the removal of a line that appeared
before them.

Also adds one more test related to setting removal.
Merge pull request #18 from cprice-puppet/feature/master/tweaks-to-setting-removal

Feature/master/tweaks to setting removal
Respect indentation / spacing for existing sections and settings

This commit adds some cosmetic functionality.  The main two
improvements are:

* We'll now pay attention to indentation within existing
  sections, and when we write new settings or update
  existing ones, we'll match the existing indentation.

* When modifying existing settings, the regex now captures
  a greater portion of the original line and preserves it.
  Basically, the original whitespacing in the line should
  remain intact and only the value should be modified.
Better handling of whitespace lines at ends of sections

This is another bit of cosmetic functionality; prior to
this commit, when adding a new setting to a section, we'd
write it on the very last line before the next section,
even if there was a chunk of trailing whitespace lines
at the end of the existing section.  This was functional,
but the output was not always particularly pleasant for
human consumption.

This commit tweaks things so that we insert new settings
just before the final chunk of whitespace lines in an
existing section.  This keeps things a bit cleaner.
Add example for `ensure=absent`
Refactor to clarify implementation of `save`

The `save` method was previously relying on some really
specific implementation details of the `section` class
(when the start/end_line would be nil, etc.).  This made
the code a bit hard to follow.

This commit introduces a few utility methods in the
`section` class (`is_new_section?`, `is_global?`), and
refactors the `save` method to use them... this makes
the logic a little easier to follow and should hopefully
make it easier to maintain.
Merge pull request #19 from cprice-puppet/feature/master/use-existing-indentation

Feature/master/use existing indentation
Add detection for commented versions of settings

This commit adds support for detecting commented versions of
settings in an existing version of an inifile.  If you are
setting a value for a setting that isn't currently set
in the file, but a commented version is found, then we
add the new setting immediately following the commented
version, rather than at the end of the section.
Merge pull request #20 from cprice-puppet/feature/master/detect-commented-settings

Add detection for commented versions of settings
Update Modulefile/CHANGELOG ; final commit for v0.9.0 release
Added license file w/Apache 2.0 license
Fix test to use correct key_val_parameter
Merge pull request #28 from supercow/master

Fix the key_val_setting parameter
guard against nil indentation values

This commit is intended to resolves an issue where the indentation
value can be nil (which leads to a run time exception)

This occurrs in cases where a section is following by only one of more
comments.

The proposed fix is to guard against potential nil values where the
error occurs. This fix is idential to code used at line 125 of the same file.