Skip to content

Instantly share code, notes, and snippets.

@kalabiyau
Created March 15, 2012 13:22
Show Gist options
  • Save kalabiyau/2044173 to your computer and use it in GitHub Desktop.
Save kalabiyau/2044173 to your computer and use it in GitHub Desktop.
Ruby starter
%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"}
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
%html
%title Success
%body
Success
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment