]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/edit_file.rb
civi ext version bump
[chef.git] / cookbooks / chef / libraries / edit_file.rb
1 module OpenStreetMap
2   module Mixin
3     module EditFile
4       def edit_file(file, &_block)
5         Chef::DelayedEvaluator.new do
6           ::File.new(file).collect do |line|
7             yield line
8           end.join("")
9         end
10       end
11     end
12   end
13 end
14
15 Chef::DSL::Recipe.include(OpenStreetMap::Mixin::EditFile)