|
@@ -12,7 +12,7 @@ action :replace do
|
|
|
if ::File.exists? new_resource.name
|
|
|
current_content = Chef::Util::FileEdit.new new_resource.name
|
|
|
current_content.search_file_replace(new_resource.current_line, new_resource.new_line)
|
|
|
- edited = current_content.file_edited
|
|
|
+ edited = current_content.send(:file_edited)
|
|
|
current_content.write_file
|
|
|
new_resource.updated_by_last_action(edited)
|
|
|
else
|
|
@@ -37,7 +37,7 @@ action :insert_if_no_match do
|
|
|
new_file = Chef::Util::FileEdit.new new_resource.name
|
|
|
new_file.insert_line_if_no_match(new_resource.pattern,
|
|
|
new_resource.new_line)
|
|
|
- edited = new_file.file_edited
|
|
|
+ edited = new_file.send(:file_edited)
|
|
|
new_file.write_file
|
|
|
else
|
|
|
write_new_file(new_resource.name,
|
|
@@ -54,7 +54,7 @@ action :insert_after_match do
|
|
|
new_file = Chef::Util::FileEdit.new new_resource.name
|
|
|
new_file.insert_line_after_match(new_resource.pattern,
|
|
|
new_resource.new_line)
|
|
|
- edited = new_file.file_edited
|
|
|
+ edited = new_file.send(:file_edited)
|
|
|
new_file.write_file
|
|
|
else
|
|
|
write_new_file(new_resource.name,
|
|
@@ -70,7 +70,7 @@ action :remove do
|
|
|
if ::File.exists? new_resource.name
|
|
|
new_file = Chef::Util::FileEdit.new new_resource.name
|
|
|
new_file.search_file_delete_line(new_resource.pattern)
|
|
|
- edited = new_file.file_edited
|
|
|
+ edited = new_file.send(:file_edited)
|
|
|
new_file.write_file
|
|
|
new_resource.updated_by_last_action(edited)
|
|
|
end
|