lib/routes/main.rb in gaptool-server-0.4.13 vs lib/routes/main.rb in gaptool-server-0.4.14

- old
+ new

@@ -7,31 +7,9 @@ get '/ping' do "PONG" end - post '/redishash' do - data = JSON.parse request.body.read - redishash(data).to_json - end - - get '/servicebalance/:role/:environment' do - runlist = balanceservices(params[:role], params[:environment]) - unless runlist.kind_of? Hash - servicestopall(params[:role], params[:environment]) - runlist.peach do |event| - runservice(event[:host][:hostname], params[:role], params[:environment], event[:service][:name], event[:service][:keys], 'start') - end - end - runlist.to_json - end - - post '/regenhosts' do - data = JSON.parse request.body.read - hostsgen(data['zone']) - hosts.to_json - end - post '/init' do data = JSON.parse request.body.read AWS.config(:access_key_id => $redis.hget('config', 'aws_id'), :secret_access_key => $redis.hget('config', 'aws_secret'), :ec2_endpoint => "ec2.#{data['zone'].chop}.amazonaws.com") @ec2 = AWS::EC2.new # create shared secret to reference in /register