Created
March 15, 2012 13:22
-
-
Save kalabiyau/2044173 to your computer and use it in GitHub Desktop.
Ruby starter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%html | |
%title Starter | |
%body | |
%form{:action => "", :method => "post"} | |
%h4 Choose territory | |
%select{ :name => "territory" } | |
%option AllodsOnline_en | |
%option AllodsOnline_pl | |
%option AllodsOnline_de | |
%option AllodsOnline_fr | |
%option USGala | |
%option LytoGame | |
%option MailRU_GMBH | |
%option LevelUp_Brazil | |
%option LevelUp | |
%option Giant | |
%option CJI | |
%option Cayenne | |
%option MENA | |
%h4 Enter version | |
%input{ :name => "version", :size => "11" } | |
%h4 Choose job type | |
%select{ :name => "job" } | |
%option full_deploy | |
%option download_version | |
%option restart_shard | |
%option test | |
%h4 Choose server | |
%select{ :name => "server"} | |
%option m100 | |
%option Bart | |
%option Lisa | |
%br | |
%br | |
%input{:type => "submit", :value => "Send", :class => "button"} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
set :haml, :format => :html5 | |
get '/' do | |
haml :index | |
end | |
post '/' do | |
territory = params[:territory] | |
version = params[:version] | |
job = params[:job] | |
server = params[:server] | |
system("/usr/bin/python /home/a1/GPT_launcher/launcher.py --job #{job} --config #{server} --territory #{territory} --version #{version}") | |
haml :index | |
redirect '/success' | |
end | |
get '/success' do | |
haml :success | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%html | |
%title Success | |
%body | |
Success |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment