Browse files

use plain text fixtures for at cup

  • Loading branch information...
1 parent 11e283f commit d3bccd14a84724fe68138f9377abaa09988fa7a7 @geraldb geraldb committed Oct 27, 2012
Showing with 175 additions and 220 deletions.
  1. +2 −0 TODO.md
  2. +15 −22 db/at/2012_13/bl.rb
  3. +32 −131 db/at/2012_13/cup.rb
  4. +91 −0 db/at/2012_13/cup.txt
  5. +24 −43 db/de/2012_13/bl.rb
  6. +11 −24 db/world/quali_2012_13_c.rb
View
2 TODO.md
@@ -5,6 +5,8 @@
- allow (1) (2) etc. to preserve/specify game pos
- add group key import - search in round for
group {xxx} or gruppe {xxx} e.g. Gruppe A => group key is >a<
+
+- add empty rounds - how? what start_at/end_at date to use??
## export
View
37 db/at/2012_13/bl.rb
@@ -12,27 +12,20 @@
title: 'Österr. Bundesliga 2012/13',
start_at: Time.cet('2012-07-21 00:00') )
-salzburg = Team.find_by_key!( 'salzburg' )
-rapid = Team.find_by_key!( 'rapid' )
-admira = Team.find_by_key!( 'admira' )
-austria = Team.find_by_key!( 'austria' )
-sturm = Team.find_by_key!( 'sturm' )
-ried = Team.find_by_key!( 'ried' )
-wacker = Team.find_by_key!( 'wacker' )
-mattersburg = Team.find_by_key!( 'mattersburg' )
-neustadt = Team.find_by_key!( 'neustadt' )
-wac = Team.find_by_key!( 'wac' )
-
-
-bl.teams << salzburg
-bl.teams << rapid
-bl.teams << admira
-bl.teams << austria
-bl.teams << sturm
-bl.teams << ried
-bl.teams << wacker
-bl.teams << mattersburg
-bl.teams << neustadt
-bl.teams << wac
+## 10 Bundeliga Teams
+
+bl_team_keys = [
+ 'salzburg',
+ 'rapid',
+ 'admira',
+ 'austria',
+ 'sturm',
+ 'ried',
+ 'wacker',
+ 'mattersburg',
+ 'neustadt',
+ 'wac' ]
+
+bl.add_teams_from_ary!( bl_team_keys )
Prop.create!( key: 'db.at.2012/13.version', value: '1' )
View
163 db/at/2012_13/cup.rb
@@ -7,39 +7,38 @@
title: 'ÖFB Cup 2012/13',
start_at: Time.cet( '2012-07-13 00:00' ) )
-cuprunde1 = Round.create!( event: cup, pos: 1, title: '1. Runde', start_at: Time.cet( '2012-07-13' ), title2: 'Fr-So 13.-15. Juli 2012' )
-cuprunde2 = Round.create!( event: cup, pos: 2, title: '2. Runde', start_at: Time.cet( '2012-09-25' ), title2: 'Di+Mi 25.+26. Sep 2012' )
-cup16 = Round.create!( event: cup, pos: 3, title: 'Achtelfinale', start_at: Time.cet( '2012-10-30' ), title2: 'Di+Mi 30.+31. Okt 2012' )
-cup8 = Round.create!( event: cup, pos: 4, title: 'Viertelfinale', start_at: Time.cet( '2013-04-16' ), title2: 'Di+Mi 16.+17. April 2013' )
-cup4 = Round.create!( event: cup, pos: 5, title: 'Halbfinale', start_at: Time.cet( '2013-05-07' ), title2: 'Di+Mi 7.+8. Mai 2013' )
-cup1 = Round.create!( event: cup, pos: 6, title: 'Finale', start_at: Time.cet( '2013-05-30' ), title2: 'Do 30. Mai 2013' )
-
-
-## bundesliga teams
-
-salzburg = Team.find_by_key!( 'salzburg' )
-rapid = Team.find_by_key!( 'rapid' )
-admira = Team.find_by_key!( 'admira' )
-austria = Team.find_by_key!( 'austria' )
-sturm = Team.find_by_key!( 'sturm' )
-ried = Team.find_by_key!( 'ried' )
-wacker = Team.find_by_key!( 'wacker' )
-mattersburg = Team.find_by_key!( 'mattersburg' )
-neustadt = Team.find_by_key!( 'neustadt' )
-wac = Team.find_by_key!( 'wac' )
-
-## erste liga teams
-
-ksv = Team.find_by_key!( 'ksv' )
-altach = Team.find_by_key!( 'altach' )
-austrial = Team.find_by_key!( 'austrial' )
-stpoelten = Team.find_by_key!( 'stpoelten' )
-linz = Team.find_by_key!( 'linz' )
-groedig = Team.find_by_key!( 'groedig' )
-lustenau = Team.find_by_key!( 'lustenau' )
-vienna = Team.find_by_key!( 'vienna' )
-hartberg = Team.find_by_key!( 'hartberg' )
-horn = Team.find_by_key!( 'horn' )
+
+## 10 Bundeliga Teams
+
+cup_bl_team_keys = [
+ 'salzburg',
+ 'rapid',
+ 'admira',
+ 'austria',
+ 'sturm',
+ 'ried',
+ 'wacker',
+ 'mattersburg',
+ 'neustadt',
+ 'wac' ]
+
+## 10 Erste Liga Teams
+
+cup_erste_team_keys = [
+ 'ksv',
+ 'altach',
+ 'austrial',
+ 'stpoelten',
+ 'linz',
+ 'groedig',
+ 'lustenau',
+ 'vienna',
+ 'hartberg',
+ 'horn']
+
+
+cup.add_teams_from_ary!( cup_bl_team_keys + cup_erste_team_keys )
+
## regionalliga west teams
@@ -98,103 +97,5 @@
viktoria = Team.find_by_key!( 'viktoria' )
-## 10 Bundeliga Teams
-
-cup.teams << salzburg
-cup.teams << rapid
-cup.teams << admira
-cup.teams << austria
-cup.teams << sturm
-cup.teams << ried
-cup.teams << wacker
-cup.teams << mattersburg
-cup.teams << neustadt
-cup.teams << wac
-
-## 10 Erste Liga Teams
-
-cup.teams << ksv
-cup.teams << altach
-cup.teams << austrial
-cup.teams << stpoelten
-cup.teams << linz
-cup.teams << groedig
-cup.teams << lustenau
-cup.teams << vienna
-cup.teams << hartberg
-cup.teams << horn
-
-
-
-games_cuprunde1 = [
- [ fac, [0,1], altach, Time.cet('2012-07-12 19:00') ],
-# [ hard, [1,0], schwaz, Time.cet('2012-07-13 18:30') ],
- [ dsc, [1,2], hartberg, Time.cet('2012-07-13 19:00') ],
- [ gratkorn, [0,0,0,0,4,5], wacker, Time.cet('2012-07-13 19:00') ],
-# [ pasching, [2,1], austrias, Time.cet('2012-07-13 19:00') ],
- [ parndorf, [0,3], admira, Time.cet('2012-07-13 19:00') ],
- [ voecklamarkt, [3,4], lustenau, Time.cet('2012-07-13 19:00') ],
-# [ kalsdorf, [3,1], wallern, Time.cet('2012-07-13 19:00') ],
- [ wattens, [0,1], sturm, Time.cet('2012-07-13 19:00') ],
-# [ vsv, [4,2], rohrendorf, Time.cet('2012-07-13 19:00') ],
- [ pinzgau, [0,4], groedig, Time.cet('2012-07-13 19:15') ],
-# [ amstetten, [0,1], schwechat, Time.cet('2012-07-13 19:30') ],
- [ stflorian, [2,1], linz, Time.cet('2012-07-13 19:30') ],
- [ austriak, [3,2], horn, Time.cet('2012-07-13 19:30') ],
-# [ sak, [0,5], allerheiligen, Time.cet('2012-07-13 19:30') ],
- [ gak, [2,2,3,2], vienna, Time.cet('2012-07-13 20:00') ],
- [ wienersk, [0,2], salzburg, Time.cet('2012-07-13 20:30') ],
-# [ stegersbach, [2,2,3,2], reutte, Time.cet('2012-07-14 17:00') ],
- [ badvoeslau, [1,0], stpoelten, Time.cet('2012-07-14 17:00') ],
-# [ micheldorf, [0,1], viktoria, Time.cet('2012-07-14 17:00') ],
-# [ klagenfurt, [1,2], stjohann, Time.cet('2012-07-14 18:00') ],
-# [ lask, [7,0], spittal, Time.cet('2012-07-14 18:00') ],
- [ ostbahn, [1,8], wac, Time.cet('2012-07-14 18:00') ],
-# [ gaflenz, [1,2], sollenau, Time.cet('2012-07-14 18:00') ],
- [ oberwart, [1,3], austria, Time.cet('2012-07-14 18:00') ],
- [ leoben, [1,3], mattersburg, Time.cet('2012-07-14 18:00') ],
- [ retz, [1,7], austrial, Time.cet('2012-07-14 18:00') ],
- [ bregenz, [1,2], ksv, Time.cet('2012-07-14 18:30') ],
-# [ ardagger, [2,2,2,3], dornbirn, Time.cet('2012-07-14 19:00') ],
- [ kufstein, [1,4], ried, Time.cet('2012-07-14 19:00') ],
- [ wolfurt, [2,2,2,4], neustadt, Time.cet('2012-07-15 10:30') ],
- [ heiligenkreuz,[0,5], rapid, Time.cet('2012-07-15 18:00') ]
-]
-
-games_cuprunde2 = [
- [ kalsdorf, [3,0], hartberg, Time.cet('2012-09-24 19:00') ],
- [ viktoria, [2,2,3,3,7,4], ksv, Time.cet('2012-09-25 16:00') ],
- [ hard, [0,3], altach, Time.cet('2012-09-25 16:30') ],
- [ stegersbach, [1,3], salzburg, Time.cet('2012-09-25 18:00') ],
- [ pasching, [1,1,3,2], austrial, Time.cet('2012-09-25 19:00') ],
- [ austriak, [0,0,2,0], admira, Time.cet('2012-09-25 19:00') ],
- [ schwechat, [0,5], sturm, Time.cet('2012-09-25 19:00') ],
- [ lask, [2,0], groedig, Time.cet('2012-09-25 19:00') ],
- [ stjohann, [0,3], lustenau, Time.cet('2012-09-25 19:00') ],
- [ sollenau, [1,1,1,5], wacker, Time.cet('2012-09-25 19:00') ],
- [ vsv, [3,1], neustadt, Time.cet('2012-09-25 19:00') ],
- [ dornbirn, [2,3], austria, Time.cet('2012-09-25 20:30') ],
- [ badvoeslau, [2,3], mattersburg, Time.cet('2012-09-26 16:00') ],
- [ stflorian, [1,1,1,1,5,6], ried, Time.cet('2012-09-26 19:00') ],
- [ allerheiligen, [1,4], rapid, Time.cet('2012-09-26 19:00') ],
- [ gak, [0,6], wac, Time.cet('2012-09-26 20:20') ]
-]
-
-games_cup16 = [
- [ lask, [], mattersburg, Time.cet('2012-10-30 00:00') ],
- [ rapid, [], altach, Time.cet('2012-10-30 00:00') ],
- [ viktoria, [], ried, Time.cet('2012-10-30 00:00') ],
- [ sturm, [], wacker, Time.cet('2012-10-30 00:00') ],
- [ pasching, [], austriak, Time.cet('2012-10-30 00:00') ],
- [ lustenau, [], wac, Time.cet('2012-10-30 00:00') ],
- [ kalsdorf, [], salzburg, Time.cet('2012-10-30 00:00') ],
- [ vsv, [], austria, Time.cet('2012-10-30 00:00') ]]
-
-
-Game.create_knockouts_from_ary!( games_cuprunde1, cuprunde1 )
-Game.create_knockouts_from_ary!( games_cuprunde2, cuprunde2 )
-Game.create_knockouts_from_ary!( games_cup16, cup16 )
-
-
Prop.create!( key: 'db.at.cup.2012/13.version', value: '1' )
View
91 db/at/2012_13/cup.txt
@@ -0,0 +1,91 @@
+##################################
+### ÖFB Cup 2012/13
+
+
+### todo: how to mark "plain" round as knockoff k.o round in text??
+### todo: how to mark overtime and penalty scores??
+
+
+## Game.create_knockouts_from_ary!( games_cuprunde1, cuprunde1 )
+## Game.create_knockouts_from_ary!( games_cuprunde2, cuprunde2 )
+## Game.create_knockouts_from_ary!( games_cup16, cup16 )
+
+
+1. Runde - Fr-So 13.-15. Juli 2012 !!Knockout (Knockout??) // Knockout??
+
+fac 0:1 altach 2012-07-12 19:00
+# hard 1:0 schwaz 2012-07-13 18:30
+dsc 1:2 hartberg 2012-07-13 19:00
+gratkorn 0:0 0:0nV 4:5iE wacker 2012-07-13 19:00
+# pasching 2:1 austrias 2012-07-13 19:00
+parndorf 0:3 admira 2012-07-13 19:00
+voecklamarkt 3:4 lustenau 2012-07-13 19:00
+# kalsdorf 3:1 wallern 2012-07-13 19:00
+wattens 0:1 sturm 2012-07-13 19:00
+# vsv 4:2 rohrendorf 2012-07-13 19:00
+pinzgau 0:4 groedig 2012-07-13 19:15
+# amstetten 0:1 schwechat 2012-07-13 19:30
+stflorian 2:1 linz 2012-07-13 19:30
+austriak 3:2 horn 2012-07-13 19:30
+# sak 0:5 allerheiligen 2012-07-13 19:30
+gak 2:2 3:2nV vienna 2012-07-13 20:00
+wienersk 0:2 salzburg 2012-07-13 20:30
+# stegersbach 2:2 3:2nV reutte 2012-07-14 17:00
+badvoeslau 1:0 stpoelten 2012-07-14 17:00
+# micheldorf 0:1 viktoria 2012-07-14 17:00
+# klagenfurt 1:2 stjohann 2012-07-14 18:00
+# lask 7:0 spittal 2012-07-14 18:00
+ostbahn 1:8 wac 2012-07-14 18:00
+# gaflenz 1:2 sollenau 2012-07-14 18:00
+oberwart 1:3 austria 2012-07-14 18:00
+leoben 1:3 mattersburg 2012-07-14 18:00
+retz 1:7 austrial 2012-07-14 18:00
+bregenz 1:2 ksv 2012-07-14 18:30
+# ardagger 2:2 2:3nV dornbirn 2012-07-14 19:00
+kufstein 1:4 ried 2012-07-14 19:00
+wolfurt 2:2 2:4nV neustadt 2012-07-15 10:30
+heiligenkreuz 0:5 rapid 2012-07-15 18:00
+
+
+2. Runde - Di+Mi 25.+26. Sep 2012
+
+kalsdorf 3:0 hartberg 2012-09-24 19:00
+viktoria 2:2 3:3nV 7:4iE ksv 2012-09-25 16:00
+hard 0:3 altach 2012-09-25 16:30
+stegersbach 1:3 salzburg 2012-09-25 18:00
+pasching 1:1 3:2nV austrial 2012-09-25 19:00
+austriak 0:0 2:0nV admira 2012-09-25 19:00
+schwechat 0:5 sturm 2012-09-25 19:00
+lask 2:0 groedig 2012-09-25 19:00
+stjohann 0:3, lustenau 2012-09-25 19:00
+sollenau 1:1 1:5nV wacker 2012-09-25 19:00
+vsv 3:1 neustadt 2012-09-25 19:00
+dornbirn 2:3 austria 2012-09-25 20:30
+badvoeslau 2:3 mattersburg 2012-09-26 16:00
+stflorian 1:1 1:1nV 5:6iE ried 2012-09-26 19:00
+allerheiligen 1:4 rapid 2012-09-26 19:00
+gak 0:6 wac 2012-09-26 20:20
+
+
+3. Runde / Achtelfinale - Di+Mi 30.+31. Okt 2012
+
+lask - mattersburg 2012-10-30 15:00
+rapid - altach 2012-10-30 15:00
+viktoria - ried 2012-10-30 15:00
+sturm - wacker 2012-10-30 15:00
+pasching - austriak 2012-10-30 15:00
+lustenau - wac 2012-10-30 15:00
+kalsdorf - salzburg 2012-10-30 15:00
+vsv - austria 2012-10-30 15:00
+
+
+
+4. Runde / Viertelfinale - Di+Mi 16.+17. April 2013
+
+
+5. Runde / Halbfinale - Di+Mi 7.+8. Mai 2013
+
+
+6. Runde / Finale - Do 30. Mai 2013
+
+
View
67 db/de/2012_13/bl.rb
@@ -12,46 +12,27 @@
title: 'Deutsche Bundesliga 2012/13',
start_at: Time.cet('2012-07-21 00:00') )
-
-bayern = Team.find_by_key!( 'bayern' )
-frankfurt = Team.find_by_key!( 'frankfurt' )
-schalke = Team.find_by_key!( 'schalke' )
-dortmund = Team.find_by_key!( 'dortmund' )
-hannover = Team.find_by_key!( 'hannover' )
-leverkusen = Team.find_by_key!( 'leverkusen' )
-duesseldorf = Team.find_by_key!( 'duesseldorf' )
-hsv = Team.find_by_key!( 'hsv' )
-mainz = Team.find_by_key!( 'mainz' )
-mgladbach = Team.find_by_key!( 'mgladbach' )
-freiburg = Team.find_by_key!( 'freiburg' )
-bremen = Team.find_by_key!( 'bremen' )
-hoffenheim = Team.find_by_key!( 'hoffenheim' )
-nuernberg = Team.find_by_key!( 'nuernberg' )
-stuttgart = Team.find_by_key!( 'stuttgart' )
-augsburg = Team.find_by_key!( 'augsburg' )
-wolfsburg = Team.find_by_key!( 'wolfsburg' )
-fuerth = Team.find_by_key!( 'fuerth' )
-
-
-
-bl.teams << bayern
-bl.teams << frankfurt
-bl.teams << schalke
-bl.teams << dortmund
-bl.teams << hannover
-bl.teams << leverkusen
-bl.teams << duesseldorf
-bl.teams << hsv
-bl.teams << mainz
-bl.teams << mgladbach
-bl.teams << freiburg
-bl.teams << bremen
-bl.teams << hoffenheim
-bl.teams << nuernberg
-bl.teams << stuttgart
-bl.teams << augsburg
-bl.teams << wolfsburg
-bl.teams << fuerth
-
-
-Prop.create!( key: 'db.de.bl.2012/13.version', value: '1' )
+bl_team_keys = [
+ 'bayern',
+ 'frankfurt',
+ 'schalke',
+ 'dortmund',
+ 'hannover',
+ 'leverkusen',
+ 'duesseldorf',
+ 'hsv',
+ 'mainz',
+ 'mgladbach',
+ 'freiburg',
+ 'bremen',
+ 'hoffenheim',
+ 'nuernberg',
+ 'stuttgart',
+ 'augsburg',
+ 'wolfsburg',
+ 'fuerth' ]
+
+bl.add_teams_from_ary( bl_team_keys )
+
+
+Prop.create!( key: 'db.de.2012/13.version', value: '1' )
View
35 db/world/quali_2012_13_c.rb
@@ -2,39 +2,26 @@
###########################################
## WM 2014 - Qualification Europe Group C
+#
+# note: for teams see seeds/euro/teams.rb
world = Event.find_by_key!( 'wmq' )
+worldc_team_keys = [ 'ger',
+ 'fro',
+ 'irl',
+ 'kaz',
+ 'aut',
+ 'swe' ]
+
+world.add_teams_from_ary( worldc_team_keys )
#################################3
# Gruppe C
-# note: for teams see seeds/euro/teams.rb
-
-ger = Team.find_by_key!( 'ger' )
-fro = Team.find_by_key!( 'fro' )
-irl = Team.find_by_key!( 'irl' )
-kaz = Team.find_by_key!( 'kaz' )
-aut = Team.find_by_key!( 'aut' )
-swe = Team.find_by_key!( 'swe' )
-
-
worldc = Group.create!( event: world, pos: 3, title: 'Gruppe C' )
-worldc.teams << ger
-worldc.teams << fro
-worldc.teams << irl
-worldc.teams << kaz
-worldc.teams << aut
-worldc.teams << swe
-
-
-world.teams << ger
-world.teams << fro
-world.teams << irl
-world.teams << kaz
-world.teams << aut
-world.teams << swe
+worldc.add_teams_from_ary( worldc_team_keys )
Prop.create!( key: 'db.world.quali.2012/13.c.version', value: '1' )

0 comments on commit d3bccd1

Please sign in to comment.