summaryrefslogtreecommitdiff
path: root/spec/unit/settings/config_file_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-04-16(PUP-1114) Deprecate environment sections in puppet.confJosh Partlow1-0/+29
Environments specified in puppet.conf are deprecated ahead of removing legacy puppet.conf environments in 4.0. Now we issue a single deprecation warning if a section other than main, master, agent or user is present in puppet.conf. Because the deprecation warnings are all coming from the same line, Puppet::Util::Logging handles ensuring that only one is issued.
2014-04-16(maint) Remove unused helper methodJosh Partlow1-6/+0
2013-12-12(#23373) Provide a more structure config file parseAndrew Parker1-15/+49
The previous parsing of the config file was a hierarchy of hashes, which made it hard to discover what the parts were. This changes it to use a more structured system and lays the groundwork for moving lookup behavior elsewhere.
2013-12-09(#23373) Always open config so we are reading from the beginningJosh Partlow1-2/+1
Not all operating systems start reading from the same position with 'a+' when opening the file. This ensures that we create the file with default permissions, and begin reading from the first line. We also make some acceptance changes for testing puppet config set, and remove an acceptance test which was of dubious value.
2013-12-06(#23373) Fix line number tracking for settings configJosh Partlow1-0/+20
Ensure we incremenet line count when parsing an ini_file, and tests that we are correctly tracking line count in multi line config errors.
2013-12-06(#23373) Pull apart ConfigFile and IniFileAndrew Parker1-59/+0
The ConfigFile was getting muddled and large. This pulls out the new file manipulation code into IniFile and has ConfigFile use that.
2013-12-06(#23373) Remove duplicate config file parsersAndrew Parker1-1/+3
This merges together the two concrete parsers for the puppet config file. The transformation into the section groups is now done as a second pass that works on the individual line objects. In doing so it became clear that the error reporting was supposed to be issuing line numbers, but was instead outputing the entire line that was wrong. This also fixes up that mistake.
2013-12-06(#23373) Allow basic control of puppet.confAndrew Parker1-0/+57
This provides a new action on the puppet config subcommand to allow setting configuration values in the puppet.conf file. This implemenation does not understand sections and so will simply change the first instance of the configuration parameter that it is trying to change.
2012-10-04Revert "Merge pull request #1190 from ↵Jeff McCune1-6/+0
jeffmccune/fix/master/7316_load_faces_from_modulepath_try4" This reverts commit bdda511d06ed6f89b58343e815585957a33db94e, reversing changes made to 8f9699cee0d1028d538b0a26aa5bc885751b6d46. Conflicts: lib/puppet/settings/config_file.rb
2012-10-02Merge pull request #1190 from ↵Andrew Parker1-0/+6
jeffmccune/fix/master/7316_load_faces_from_modulepath_try4 (#7316) Do not set default values for confdir and vardir in the master Conflicts: lib/puppet/settings.rb Merge conflict config file parsing related to a disallowed section replicated in the config_file.rb parser.
2012-10-01(Maint) Add test coverage around config file parsingAndrew Parker1-0/+100
This adds coverage for, I think, all of the config file structure parsing behavior. Since the value transformations are not currently part of this parsing code, they are not taken into account.