]> gitweb.fluxo.info Git - puppet-inifile.git/log
puppet-inifile.git
12 years agoMerge pull request #36 from bodepd/travis_part_three master
Chris Price [Wed, 3 Apr 2013 22:05:53 +0000 (15:05 -0700)]
Merge pull request #36 from bodepd/travis_part_three

Add travisfile and Gemfile

12 years agoAdd travisfile and Gemfile
Dan Bode [Tue, 2 Apr 2013 22:23:36 +0000 (15:23 -0700)]
Add travisfile and Gemfile

in order to automate travis-ci tests.

12 years agoUpdate README.markdown
Chris Price [Tue, 2 Apr 2013 22:28:34 +0000 (15:28 -0700)]
Update README.markdown

12 years agoMerge pull request #33 from bodepd/doc_update
Chris Price [Tue, 2 Apr 2013 22:13:08 +0000 (15:13 -0700)]
Merge pull request #33 from bodepd/doc_update

Update Modulefile and Changelog, prepping for 0.10.0 release

12 years agoUpdate Modulefile and Changelog, prepping for 0.10.0 release
Chris Price [Mon, 1 Apr 2013 22:29:54 +0000 (15:29 -0700)]
Update Modulefile and Changelog, prepping for 0.10.0 release

This commit also adds some comments clarifying the new code
that was added to support purging.

12 years agoMerge pull request #32 from bodepd/fix_test_failures
Chris Price [Tue, 2 Apr 2013 00:36:49 +0000 (17:36 -0700)]
Merge pull request #32 from bodepd/fix_test_failures

fix unit test failures

12 years agofix unit test failures
Dan Bode [Tue, 2 Apr 2013 00:27:10 +0000 (17:27 -0700)]
fix unit test failures

the previous tests were stubbing global class instances
in a way that was causing other tests to fail.

This commit updates the tests, and introdcuces child classes which
can safely be stubbed (and more closely test the real behavior intended to
be tested here)

12 years agoMerge pull request #29 from kbrezina/subsetting
Chris Price [Mon, 25 Mar 2013 18:00:41 +0000 (11:00 -0700)]
Merge pull request #29 from kbrezina/subsetting

Added 'ini_subsetting' custom resource type

12 years agoAdded 'ini_subsetting' custom resource type
Karel Brezina [Fri, 15 Feb 2013 09:56:44 +0000 (10:56 +0100)]
Added 'ini_subsetting' custom resource type

12 years agoMerge pull request #30 from bodepd/fix_nil_indentation
Chris Price [Tue, 12 Mar 2013 18:11:09 +0000 (11:11 -0700)]
Merge pull request #30 from bodepd/fix_nil_indentation

guard against nil indentation values

12 years agoguard against nil indentation values
Dan Bode [Tue, 12 Mar 2013 00:31:00 +0000 (17:31 -0700)]
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.

12 years agoMerge pull request #25 from bodepd/add_purging_support
Chris Price [Mon, 11 Mar 2013 20:08:01 +0000 (13:08 -0700)]
Merge pull request #25 from bodepd/add_purging_support

Add purging support to ini file

12 years agoAdd purging support to ini file
Dan Bode [Mon, 7 Jan 2013 23:54:41 +0000 (15:54 -0800)]
Add purging support to ini file

This commit adds purging to ini file native types.

Purging will only work for child providers that
implement the method: self.file_path. This is
because collecting all instances of the type (
which is a requirement for purging) is only possible
when the path of the file that is being managed
can be accessed by the class instance (in the
method self.instances.)

This commit adds the following method to the internal
of the ini_file:
- get_settings - has of all settings/values for
a given section

It also adds the following method to the section
class:
- setting_names - list of all setting names in a
section.

These methods are required for the instances method
to be able to list the values for all settings of
each section.

12 years agoMerge pull request #28 from supercow/master
Chris Price [Wed, 6 Feb 2013 16:18:32 +0000 (08:18 -0800)]
Merge pull request #28 from supercow/master

Fix the key_val_setting parameter

12 years agoFix test to use correct key_val_parameter
James Sweeny [Tue, 5 Feb 2013 08:26:18 +0000 (08:26 +0000)]
Fix test to use correct key_val_parameter

13 years agoAdded license file w/Apache 2.0 license
Chris Price [Tue, 6 Nov 2012 21:53:15 +0000 (13:53 -0800)]
Added license file w/Apache 2.0 license

13 years agoUpdate Modulefile/CHANGELOG ; final commit for v0.9.0 release
Chris Price [Fri, 2 Nov 2012 19:45:11 +0000 (12:45 -0700)]
Update Modulefile/CHANGELOG ; final commit for v0.9.0 release

13 years agoMerge pull request #20 from cprice-puppet/feature/master/detect-commented-settings
Chris Price [Sat, 27 Oct 2012 00:27:28 +0000 (17:27 -0700)]
Merge pull request #20 from cprice-puppet/feature/master/detect-commented-settings

Add detection for commented versions of settings

13 years agoAdd detection for commented versions of settings
Chris Price [Sat, 27 Oct 2012 00:24:37 +0000 (17:24 -0700)]
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.

13 years agoMerge pull request #19 from cprice-puppet/feature/master/use-existing-indentation
Chris Price [Mon, 22 Oct 2012 18:05:39 +0000 (11:05 -0700)]
Merge pull request #19 from cprice-puppet/feature/master/use-existing-indentation

Feature/master/use existing indentation

13 years agoRefactor to clarify implementation of `save`
Chris Price [Sun, 21 Oct 2012 06:14:39 +0000 (23:14 -0700)]
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.

13 years agoAdd example for `ensure=absent`
Chris Price [Sun, 21 Oct 2012 05:16:36 +0000 (22:16 -0700)]
Add example for `ensure=absent`

13 years agoBetter handling of whitespace lines at ends of sections
Chris Price [Sat, 20 Oct 2012 07:24:37 +0000 (00:24 -0700)]
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.

13 years agoRespect indentation / spacing for existing sections and settings
Chris Price [Sat, 20 Oct 2012 07:08:06 +0000 (00:08 -0700)]
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.

13 years agoMerge pull request #18 from cprice-puppet/feature/master/tweaks-to-setting-removal
Chris Price [Wed, 17 Oct 2012 22:50:02 +0000 (15:50 -0700)]
Merge pull request #18 from cprice-puppet/feature/master/tweaks-to-setting-removal

Feature/master/tweaks to setting removal

13 years agoMinor tweaks to handling of removing settings
Chris Price [Wed, 17 Oct 2012 20:27:28 +0000 (13:27 -0700)]
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.

13 years agoAdd support for removing lines
Dan Bode [Thu, 11 Oct 2012 00:40:38 +0000 (17:40 -0700)]
Add support for removing lines

This commit adds the ability to ensure that lines are absent.

13 years agoMerge pull request #16 from bodepd/master
Chris Price [Wed, 3 Oct 2012 16:29:27 +0000 (09:29 -0700)]
Merge pull request #16 from bodepd/master

changes for child provider usage

13 years agoMake value a property
Dan Bode [Wed, 3 Oct 2012 01:53:53 +0000 (18:53 -0700)]
Make value a property

This commit converts value to a property so that it
can be managed and modified when a file already has
a value set.

It was previously treating the line creation state
the same as the update case, which is not in
alignment with Puppet's model.

13 years agoMake ruby provider a better parent.
Dan Bode [Wed, 3 Oct 2012 01:52:34 +0000 (18:52 -0700)]
Make ruby provider a better parent.

In order to allow the provider to be a parent for
other providers, I have implemented the following
methods: section, setting, file_path, separator so
that they can be overridden by child providers and
decouple this provider from its type.

13 years agoMerge pull request #15 from reidmv/bug/master/spaces
Chris Price [Mon, 1 Oct 2012 16:31:59 +0000 (09:31 -0700)]
Merge pull request #15 from reidmv/bug/master/spaces

Cool, thanks!

13 years agoAllow values with spaces to be parsed and set
Reid Vandewiele [Sat, 29 Sep 2012 19:39:00 +0000 (12:39 -0700)]
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.

13 years agoUpdated CHANGELOG and Modulefile; final commit for 0.0.3 release
Chris Price [Mon, 24 Sep 2012 17:20:45 +0000 (10:20 -0700)]
Updated CHANGELOG and Modulefile; final commit for 0.0.3 release

13 years agoMerge pull request #9 from cprice-puppet/feature/master/allow-override-of-separator-str
Chris Price [Thu, 20 Sep 2012 19:53:59 +0000 (12:53 -0700)]
Merge pull request #9 from cprice-puppet/feature/master/allow-override-of-separator-str

Allow overriding separator string between key/val pairs

13 years agoAdd validation for key_val_separator
Chris Price [Thu, 20 Sep 2012 18:35:45 +0000 (11:35 -0700)]
Add validation for key_val_separator

For now, the key_val_separator is required to contain
exactly one '=' character.  This commit simply validates
that that is the case.

13 years agoAllow overriding separator string between key/val pairs
Chris Price [Wed, 19 Sep 2012 22:42:16 +0000 (15:42 -0700)]
Allow overriding separator string between key/val pairs

This introduces a new parameter, 'key_val_separator', which
can be set in order to override the string that is used
as a separator between the key/value pair of a setting line.
The default is ' = ', but you could set the param to '=' if
you don't want to include whitespace in your settings file.

13 years agoMerge pull request #5 from jtopjian/jtopjian-colon
Chris Price [Tue, 4 Sep 2012 17:27:39 +0000 (10:27 -0700)]
Merge pull request #5 from jtopjian/jtopjian-colon

Added support for colons in section names

13 years agoAdded tests for sections with colons
Joe Topjian [Tue, 4 Sep 2012 17:16:05 +0000 (17:16 +0000)]
Added tests for sections with colons

13 years agoFixed spec_helper.rb so original tests can pass.
Joe Topjian [Tue, 4 Sep 2012 16:55:36 +0000 (16:55 +0000)]
Fixed spec_helper.rb so original tests can pass.

13 years agoAdded support for colons in section names
Joe Topjian [Fri, 24 Aug 2012 08:37:08 +0000 (08:37 +0000)]
Added support for colons in section names

13 years agoAdd CHANGELOG and update README; final commit for 0.0.2 release
Chris Price [Mon, 20 Aug 2012 21:10:39 +0000 (14:10 -0700)]
Add CHANGELOG and update README; final commit for 0.0.2 release

13 years agoAdd support for "global" section at beginning of file
Chris Price [Fri, 17 Aug 2012 11:48:28 +0000 (04:48 -0700)]
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

13 years agofinal commit for 0.0.1 release
Chris Price [Fri, 17 Aug 2012 02:30:58 +0000 (19:30 -0700)]
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

13 years agoAdd Modulefile
Chris Price [Fri, 17 Aug 2012 01:49:40 +0000 (18:49 -0700)]
Add Modulefile

13 years agoMerge pull request #4 from stephenrjohnson/miscfixes
Chris Price [Tue, 14 Aug 2012 20:48:57 +0000 (13:48 -0700)]
Merge pull request #4 from stephenrjohnson/miscfixes

Updated Section/ Setting  regex, fixed bug with empty files and updated provider to not care about variable type

13 years agomake the regex less matchy
Stephen [Tue, 14 Aug 2012 18:30:14 +0000 (19:30 +0100)]
make the regex less matchy

13 years agoFixed regex to match sections and settings with non alphanumeric
Stephen [Tue, 14 Aug 2012 12:38:08 +0000 (13:38 +0100)]
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.

13 years agoMerge pull request #1 from stephenrjohnson/master
Chris Price [Mon, 13 Aug 2012 18:26:42 +0000 (11:26 -0700)]
Merge pull request #1 from stephenrjohnson/master

Fix require paths

13 years agofix path for require statement
Stephen [Mon, 13 Aug 2012 17:54:01 +0000 (18:54 +0100)]
fix path for require statement

13 years agoFirst (basic) working version of ini_setting provider
Chris Price [Sun, 29 Jul 2012 04:59:54 +0000 (21:59 -0700)]
First (basic) working version of ini_setting provider

13 years agoStarted writing some tests, work has been punted
Chris Price [Thu, 14 Jun 2012 18:42:49 +0000 (11:42 -0700)]
Started writing some tests, work has been punted

13 years agoInitial commit
Chris Price [Thu, 14 Jun 2012 14:52:17 +0000 (07:52 -0700)]
Initial commit