cookbook 'line', '= 0.5.0', :supermarket
Provides line editing resources for use by recipes
cookbook 'line', '= 0.5.0'
knife supermarket install line
knife supermarket download line
Quite often, the need arises to do line editing instead of managing an entire file with a template resource. This cookbook supplies various resources that will help you do this.
Add "depends 'line'" to your cookbook's metadata.rb to gain access to the resoures.
append_if_no_line "make sure a line is in dangerfile" do file "/tmp/dangerfile" line "HI THERE I AM STRING" end replace_or_add "spread the love" do path "/some/file" pattern "Why hello there.*" line "Why hello there, you beautiful person, you." end
So far, the only resource implemented are
More to follow.
tester - A recipe to exercise the resources
Author:: Sean OMeara (firstname.lastname@example.org)
This cookbook has no specified dependencies.