Execute task and getting output from rake

This commit is contained in:
Adam
2015-12-31 14:17:38 +01:00
parent ca91c3d16f
commit a41e997931
6 changed files with 45 additions and 5 deletions

View File

@@ -10,4 +10,18 @@ module ItemsHelper
file.close
file
end
def self.execute_command(command)
buffer = []
Open3.popen3(command) do |stdin, stdout, stderr|
begin
while line = stdout.readline
buffer << line
end
rescue
end
end
buffer
end
end