Diff: [root] @ ffe1b809e0b | faq | css

better iface

File: scripts/emul29ah.erb [Diff]

-- a/scripts/emul29ah.erb++ b/scripts/emul29ah.erb
@@ -5,7 +5,9 @@
<input type="submit" />
</form>

<% if params[:sentence] %>

<%
response = Open3.popen3("hmark /home/bitcheese_net/l29ah burst") do |stdin, stdout, stderr|
stdin.write(params[:sentence])
stdin.close



@@ -13,12 +15,12 @@
Rails.logger.error "hmark fucked up: #{err}" unless err.empty?
stdout.read
end
end
%>

<h2> Ответ Эмуляха </h2>

<pre>
[you] <%= h params[:sentence] %>
[emul29ah] <%= h response %>
</pre>

<% end %>

By Voker57 on 2014-09-14 14:19:40 +0000