Accept mode as argument in `file_write' action

This commit is contained in:
Thibault Jouan
2014-04-24 23:46:43 +00:00
parent 47412d8bce
commit 5cb6296057
6 changed files with 64 additions and 5 deletions

View File

@@ -30,8 +30,8 @@ module Producer
nil
end
def file_write(path, content)
sftp.file.open path, 'w' do |f|
def file_write(path, content, mode = nil)
sftp.file.open path, 'w', mode do |f|
f.write content
end
end