projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b2e5c2
)
Make deferring of edit_file work properly
author
Tom Hughes
<tom@compton.nu>
Sun, 24 Nov 2013 10:36:50 +0000
(10:36 +0000)
committer
Tom Hughes
<tom@compton.nu>
Sun, 24 Nov 2013 10:39:50 +0000
(10:39 +0000)
cookbooks/chef/libraries/edit_file.rb
patch
|
blob
|
history
diff --git
a/cookbooks/chef/libraries/edit_file.rb
b/cookbooks/chef/libraries/edit_file.rb
index e632bcfd49dbd93f8dafd1caf4c09276b90aa01d..8a04a8090f3e45ce03a13e71bbba768d9b945376 100644
(file)
--- a/
cookbooks/chef/libraries/edit_file.rb
+++ b/
cookbooks/chef/libraries/edit_file.rb
@@
-6,6
+6,10
@@
class Chef
@block = block
end
+ def kind_of?(klass)
+ klass == String || super
+ end
+
def to_s
::File.new(@file).collect do |line|
line = @block.call(line)
@@
-16,7
+20,7
@@
class Chef
class Recipe
def edit_file(file, &block)
- Chef::Util::EditedFile.new(file, block)
.to_s
+ Chef::Util::EditedFile.new(file, block)
end
end
end