]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/chef/libraries/edit_file.rb
civi ext version bump
[chef.git] / cookbooks / chef / libraries / edit_file.rb
index 6260c8a40c182f937e592ca882d91c32035b1e5a..7de56267f3628b62f639ce6afdc1d6b267accb0a 100644 (file)
@@ -1,17 +1,15 @@
-class Chef
+module OpenStreetMap
   module Mixin
     module EditFile
-      def edit_file(file, &block)
+      def edit_file(file, &_block)
         Chef::DelayedEvaluator.new do
           ::File.new(file).collect do |line|
-            block.call(line)
+            yield line
           end.join("")
         end
       end
     end
   end
-
-  class Recipe
-    include Chef::Mixin::EditFile
-  end
 end
+
+Chef::DSL::Recipe.include(OpenStreetMap::Mixin::EditFile)