Created
June 17, 2009 09:13
-
-
Save timcowlishaw/131161 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
RAILS_ENV='production' | |
require '/srv/rails/oneandother/current/config/environment.rb' | |
@pairs = [[160,34841],[542,37225],[411,32931],[290,35770],[396,28013],[344,35363],[390,35806],[569,29046],[132,29077],[76,34435],[170,31940],[430,33192],[223,30408],[385,26738],[372,28237],[505,28830],[205,35745],[31,26037],[17,33674],[474,35652],[46,25034],[316,31369],[426,29798],[350,30811],[581,34305],[612,34341],[359,36284],[230,24812],[456,30900],[600,32600],[410,29414],[424,30743],[552,34245],[334,35572],[228,24449],[333,32759],[391,31950],[336,27947],[171,24509],[87,30719],[186,27931],[138,32987],[139,24480],[404,32402],[568,32217],[468,26783],[297,34307],[571,35473],[164,37063],[185,25608],[249,33795],[392,32373],[193,32247],[398,28113],[155,25517],[557,27867],[245,29562],[418,26860],[70,27662],[88,34106],[531,34023],[394,34232],[236,33332],[49,29108],[416,29254],[379,28057],[495,34064],[159,28875],[97,36038],[312,29969],[281,31443],[48,33488],[473,35766],[226,33836],[44,33665],[402,30904],[45,35183],[326,31051],[299,33784],[259,27677],[478,24523],[429,28919],[525,33775],[295,29621],[380,36677],[613,26944],[144,32631],[606,30230],[22,36979],[509,30752],[293,28606],[192,25775],[69,36106],[339,31685],[337,34612],[282,35609],[273,24898],[26,30604],[585,36076],[62,35904],[43,32479],[381,31618],[276,25501],[405,26193],[212,37189],[510,29409],[53,31629],[469,28026],[107,30886],[366,31224],[56,30776],[383,30029],[184,34336],[434,34513],[304,26663],[300,30151],[181,32017],[530,25977],[248,33053],[357,25193],[578,28283],[555,34575],[262,31694],[74,28634],[198,25187],[123,27309],[201,25503],[307,27626],[189,37195],[80,35634],[291,28058],[449,33014],[91,32449],[126,27542],[191,34355],[614,35295],[131,31329],[308,26503]] | |
puts "********EXPIRED COMPETITORS REPORT********" | |
puts "------------------------------------------" | |
puts "" | |
@pairs.each do |slot_id, old_competitor_id| | |
slot = Slot.find(slot_id) | |
puts "Slot: #{slot.starts_at} (#{slot_id})" | |
begin | |
old_competitor = Competitor.find(old_competitor_id) | |
rescue ActiveRecord::RecordNotFound | |
old_competitor = nil | |
puts "Replaced Competitor: Retired from Competition" | |
end | |
if old_competitor | |
puts "Replaced Competitor: #{old_competitor_id}" | |
puts "\tFirst Name: #{old_competitor.first_name}" | |
puts "\tSurname: #{old_competitor.surname}" | |
puts "\tEmail: #{old_competitor.email}" | |
puts "\tContact Number: #{old_competitor.contact_number}" | |
end | |
new_competitor = slot.winner.competitor | |
puts "New Competitor: #{new_competitor.id}" | |
puts "\tFirst Name: #{new_competitor.first_name}" | |
puts "\tSurname: #{new_competitor.surname}" | |
puts "\tEmail: #{new_competitor.email}" | |
puts "\tContact Number: #{new_competitor.contact_number}" | |
puts "------------------------------------------" | |
puts "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment