Commit graph

242 commits

Author SHA1 Message Date
Jesse Newland
c058ee5d40 support spaces in sections 2013-12-02 12:57:02 -05:00
Ashley Penney
2b45293d6d Merge pull request #59 from antroy/master
Adding whitespace capability to section header regex
2013-11-20 09:21:12 -08:00
Ashley Penney
10f270f435 Merge pull request #63 from JHaals/master
make ensure => present the first attribute
2013-10-17 09:53:02 -07:00
Johan Haals
ff98e78c0a make ensure => present the first attribute
ensure should be the first attribute. puppet-lint errors otherwise
2013-10-17 13:30:49 +02:00
Ashley Penney
d75ce1c7b9 Merge pull request #61 from apenney/metadata
Add empty dependencies section.
2013-10-08 15:18:12 -07:00
Ashley Penney
cd9bb11adb Add empty dependencies section. 2013-10-08 15:13:13 -07:00
Ashley Penney
85cfc933fe FM-103: Add metadata.json to all modules. 2013-10-08 11:29:19 -07:00
Ashley Penney
0a1dea40c6 Merge pull request #60 from apenney/metadata
FM-103: Add metadata.json to all modules.
2013-10-08 11:26:11 -07:00
Anthony Roy
86c57aa480 Adding whitespace capability to section header regex 2013-08-28 10:21:43 +01:00
Ashley Penney
fe9b0d5229 Merge pull request #56 from apenney/travis-secure
Fix this to the right key, after adding appropriate --repo and --org
2013-07-16 19:37:36 -04:00
Ashley Penney
a3ad3bac21 Fix this to the right key, after adding appropriate --repo and --org
options to travis.
2013-07-16 19:25:46 -04:00
Hunter Haugen
2308acac00 Merge pull request #55 from apenney/100-release
Prepare a 1.0.0 release.
2013-07-16 15:36:43 -07:00
Ashley Penney
d94dc1c886 Add autopublishing details. 2013-07-16 12:31:40 -04:00
Ashley Penney
903d47648a Prepare a 1.0.0 release. 2013-07-16 12:21:36 -04:00
Ashley Penney
14ef514cfd Merge pull request #50 from richardc/bug/inherited_purging
Bug/inherited purging
2013-07-16 06:50:23 -07:00
Richard Clamp
756e7ab166 .instances isn't stable between puppet versions
Extract the names from all the instances, and check they don't have the form
`[ '/green', '/red' ]` which they would if the inheritance doesn't work.
2013-07-16 14:38:45 +01:00
Richard Clamp
6f7b28bd59 fix syntax for 1.8.7 2013-07-16 13:42:38 +01:00
Richard Clamp
b0c8d5c34a allow for the namevar construction
The default type would always have a section as part of its namevar, but if
you're inheriting from ini_setting you may be modelling a flat file with no
sections.

This pushes the formation of the namevar from the section_name and setting into
a method, then demonstrates overriding it so that inherited_ini_setting can just
be

   inherited_ini_file { 'setting':
     value => '12',
   }

and continue to be purgable.
2013-07-16 10:18:15 +01:00
Richard Clamp
abd7065936 actually write a file in spec/fixtures/tmp
This is useful for testing with puppet apply
2013-07-16 10:18:15 +01:00
Richard Clamp
857496424c Fix the sample usage in the README
If you follow the example in the README you may not have implemented the
:key_value_separator parameter in your type, and you get the wonderful failure
case:

   Puppet::Error: Invalid parameter key_val_separator(:key_val_separator)

This change looks first, and if the user hasn't specified that attribute in
their type in their type, it falls back to '='
2013-07-16 10:18:15 +01:00
Richard Clamp
e5898439c5 add a test for creating subclassed instances 2013-07-16 10:18:15 +01:00
Richard Clamp
bd6d244610 add a type to test inheriting from ini_setting
In order to test with rspec-puppet we need to set up the fixtures, and test via
rake spec, so we change that too
2013-07-16 10:17:27 +01:00
Ashley Penney
1338d03944 Merge pull request #54 from apenney/travis
Test only against the versions we want.
2013-07-15 13:28:38 -07:00
Ashley Penney
cf79220fba Test only against the versions we want. 2013-07-15 16:27:05 -04:00
Ashley Penney
4304dee233 Merge pull request #53 from apenney/51-ivanov-aleksey
Replacement for #51
2013-07-15 13:23:03 -07:00
Ashley Penney
32e4b1f2e9 support for whitespaces in settings names (need for smb.conf)
smb.conf contains settings names with white spaces, for example

[globel]
server role = active directory domain controller
check password script = Disable
2013-07-15 16:22:30 -04:00
Ashley Penney
d19faad9b4 Tweak the Gemfile to be better for development, add a Rakefile. 2013-07-15 16:22:30 -04:00
Ashley Penney
4b91153c88 Merge pull request #52 from otherwiseguy/master
Properly handle empty values
2013-07-15 13:08:13 -07: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
Chris Price
4213189c18 Merge pull request #47 from cprice-puppet/bug/master/better-handling-of-quotes-for-subsettings
Bug/master/better handling of quotes for subsettings
2013-05-28 15:02:30 -07:00
Chris Price
e60d5910dc Update CHANGELOG and Modulefile for 0.10.3 release 2013-05-28 14:58:50 -07:00
Chris Price
cbea5dcd72 Fix bug in subsetting handling for new settings
Our new state variable `@quote_char` was not being initialized
property if you used `ini_subsetting` for a setting that did
not yet exist.  This fixes that bug.
2013-05-28 14:56:57 -07:00
Chris Price
6c6f9a4fa8 Merge pull request #45 from cprice-puppet/bug/master/better-handling-of-quotes-for-subsettings
Bug/master/better handling of quotes for subsettings
2013-05-22 16:32:19 -07:00
Chris Price
d4ccf14d6c Update Modulefile and Changelog for 0.10.2 release 2013-05-22 16:31:20 -07:00
Chris Price
1aa7e601f4 Better handling of quotes for subsettings
Prior to this commit, the `ini_subsetting` type assumed that
all of the settings strings were quoted, and always wrote
out the modified value with double-quotes around it.

This commit adds tests for the case where the original setting
is not quoted, and intelligently writes the modified setting
with the same quote character (or lack thereof) that the
original setting used.
2013-05-22 11:50:12 -07:00
Chris Price
f46fe29fad Merge pull request #44 from cprice-puppet/maint/master/change-constants-to-class-vars
Maint/master/change constants to class vars
2013-05-21 15:37:41 -07:00
Chris Price
530b053f71 Update Modulefile and CHANGELOG for 0.10.1 release 2013-05-21 15:28:42 -07:00
Chris Price
6b198641ea Change constants to class variables
Because of the way that puppet's autoloader and pluginsync work,
modules on the master get loaded twice, which means that
you can't use Ruby constants at all w/o getting warning messages.

This commit changes all of the constants in `ini_file` to class
variables, which will avoid the warning messages.
2013-05-21 15:19:33 -07:00
Chris Price
fdfd6f8840 Merge pull request #39 from dalen/master
Style fixes
2013-04-22 14:14:57 -07:00
Erik Dalén
c4af8c31d2 Style fixes 2013-04-10 14:57:39 +02:00
Chris Price
fa74951ffe Merge pull request #36 from bodepd/travis_part_three
Add travisfile and Gemfile
2013-04-03 15:05:53 -07:00
Dan Bode
c2052b3cbd Add travisfile and Gemfile
in order to automate travis-ci tests.
2013-04-02 15:38:36 -07:00
Chris Price
ad38a08dc7 Update README.markdown 2013-04-02 15:28:34 -07:00
Chris Price
389531a6f5 Merge pull request #33 from bodepd/doc_update
Update Modulefile and Changelog, prepping for 0.10.0 release
2013-04-02 15:13:08 -07:00
Chris Price
6c245ef674 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.
2013-04-02 15:10:43 -07:00
Chris Price
6e318317fb Merge pull request #32 from bodepd/fix_test_failures
fix unit test failures
2013-04-01 17:36:49 -07:00
Dan Bode
f48cae87a0 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)
2013-04-01 17:27:10 -07:00
Chris Price
e824ab2aba Merge pull request #29 from kbrezina/subsetting
Added 'ini_subsetting' custom resource type
2013-03-25 11:00:41 -07:00
Karel Brezina
4351d8b9c8 Added 'ini_subsetting' custom resource type 2013-03-25 11:34:37 +01:00
Chris Price
8064df6d00 Merge pull request #30 from bodepd/fix_nil_indentation
guard against nil indentation values
2013-03-12 11:11:09 -07:00