puppetlabs/puppet — pull request #2683 by binford2k (2014-05-21 04:32:35+00:00)
Title: Add more config manipulation options

* puppet config add [name] [value] will add to a comma separated list.
* `puppet config add reports store` (adds store to the reports list)
* puppet config del [name] [value] will remove from a comma separated list
* `puppet config del reports store` (deletes store from the list)
* puppet config del [name] will remove a setting from puppet.conf
* `puppet config del reporturl` (removes reporturl from puppet.conf)

This obeys the standard options, like `--section` and shouldn't change
existing behaviour.

I tried writing spec tests, but all of the tests, not just the ones I
wrote, seemed to blow up. This is what I tried:

``` Ruby
it "adds a setting to a list" do
Puppet[:reports] = 'https'
subject.add('reports', 'store')

expect { subject.print("reports") }.to have_printed('https,store')
end
```