sportdb 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/db/at/2012_13/cup.rb CHANGED
@@ -3,16 +3,16 @@
3
3
  ##################################
4
4
  ### ÖFB Cup 2012/13
5
5
 
6
- cup = Event.create!( :key => 'at_cup_2012_13',
7
- :title => 'ÖFB Cup 2012/13',
8
- :start_at => Time.cet( '2012-07-13 00:00' ) )
6
+ cup = Event.create!( key: 'at_cup_2012_13',
7
+ title: 'ÖFB Cup 2012/13',
8
+ start_at: Time.cet( '2012-07-13 00:00' ) )
9
9
 
10
- cuprunde1 = Round.create!( :event => cup, :pos => 1, :title => '1. Runde', :title2 => '13.-15. Juli 2012' )
11
- cuprunde2 = Round.create!( :event => cup, :pos => 2, :title => '2. Runde', :title2 => '25.+26. Sep 2012' )
12
- cup16 = Round.create!( :event => cup, :pos => 3, :title => 'Achtelfinale', :title2 => '30.+31. Okt 2012' )
13
- cup8 = Round.create!( :event => cup, :pos => 4, :title => 'Viertelfinale', :title2 => '16.+17. April 2013' )
14
- cup4 = Round.create!( :event => cup, :pos => 5, :title => 'Halbfinale', :title2 => '7.+8. Mai 2013' )
15
- cup1 = Round.create!( :event => cup, :pos => 6, :title => 'Finale', :title2 => '30. Mai 2013' )
10
+ cuprunde1 = Round.create!( event: cup, pos: 1, title: '1. Runde', start_at: Time.cet( '2012-07-13' ), title2: 'Fr-So 13.-15. Juli 2012' )
11
+ cuprunde2 = Round.create!( event: cup, pos: 2, title: '2. Runde', start_at: Time.cet( '2012-09-25' ), title2: 'Di+Mi 25.+26. Sep 2012' )
12
+ cup16 = Round.create!( event: cup, pos: 3, title: 'Achtelfinale', start_at: Time.cet( '2012-10-30' ), title2: 'Di+Mi 30.+31. Okt 2012' )
13
+ cup8 = Round.create!( event: cup, pos: 4, title: 'Viertelfinale', start_at: Time.cet( '2013-04-16' ), title2: 'Di+Mi 16.+17. April 2013' )
14
+ cup4 = Round.create!( event: cup, pos: 5, title: 'Halbfinale', start_at: Time.cet( '2013-05-07' ), title2: 'Di+Mi 7.+8. Mai 2013' )
15
+ cup1 = Round.create!( event: cup, pos: 6, title: 'Finale', start_at: Time.cet( '2013-05-30' ), title2: 'Do 30. Mai 2013' )
16
16
 
17
17
 
18
18
  ## bundesliga teams
@@ -127,68 +127,68 @@ cup.teams << horn
127
127
 
128
128
 
129
129
  games_cuprunde1 = [
130
- [ 1, fac, [0,1], altach, Time.cet('2012-07-12 19:00') ],
131
- # [ 2, hard, [1,0], schwaz, Time.cet('2012-07-13 18:30') ],
132
- [ 3, dsc, [1,2], hartberg, Time.cet('2012-07-13 19:00') ],
133
- [ 4, gratkorn, [0,0,0,0,4,5], wacker, Time.cet('2012-07-13 19:00') ],
134
- # [ 5, pasching, [2,1], austrias, Time.cet('2012-07-13 19:00') ],
135
- [ 6, parndorf, [0,3], admira, Time.cet('2012-07-13 19:00') ],
136
- [ 7, voecklamarkt, [3,4], lustenau, Time.cet('2012-07-13 19:00') ],
137
- # [ 8, kalsdorf, [3,1], wallern, Time.cet('2012-07-13 19:00') ],
138
- [ 9, wattens, [0,1], sturm, Time.cet('2012-07-13 19:00') ],
139
- # [ 10, vsv, [4,2], rohrendorf, Time.cet('2012-07-13 19:00') ],
140
- [ 11, pinzgau, [0,4], groedig, Time.cet('2012-07-13 19:15') ],
141
- # [ 12, amstetten, [0,1], schwechat, Time.cet('2012-07-13 19:30') ],
142
- [ 13, stflorian, [2,1], linz, Time.cet('2012-07-13 19:30') ],
143
- [ 14, austriak, [3,2], horn, Time.cet('2012-07-13 19:30') ],
144
- # [ 15, sak, [0,5], allerheiligen, Time.cet('2012-07-13 19:30') ],
145
- [ 16, gak, [2,2,3,2], vienna, Time.cet('2012-07-13 20:00') ],
146
- [ 17, wienersk, [0,2], salzburg, Time.cet('2012-07-13 20:30') ],
147
- # [ 18, stegersbach, [2,2,3,2], reutte, Time.cet('2012-07-14 17:00') ],
148
- [ 19, badvoeslau, [1,0], stpoelten, Time.cet('2012-07-14 17:00') ],
149
- # [ 20, micheldorf, [0,1], viktoria, Time.cet('2012-07-14 17:00') ],
150
- # [ 21, klagenfurt, [1,2], stjohann, Time.cet('2012-07-14 18:00') ],
151
- # [ 22, lask, [7,0], spittal, Time.cet('2012-07-14 18:00') ],
152
- [ 23, ostbahn, [1,8], wac, Time.cet('2012-07-14 18:00') ],
153
- # [ 24, gaflenz, [1,2], sollenau, Time.cet('2012-07-14 18:00') ],
154
- [ 25, oberwart, [1,3], austria, Time.cet('2012-07-14 18:00') ],
155
- [ 26, leoben, [1,3], mattersburg, Time.cet('2012-07-14 18:00') ],
156
- [ 27, retz, [1,7], austrial, Time.cet('2012-07-14 18:00') ],
157
- [ 28, bregenz, [1,2], ksv, Time.cet('2012-07-14 18:30') ],
158
- # [ 29, ardagger, [2,2,2,3], dornbirn, Time.cet('2012-07-14 19:00') ],
159
- [ 30, kufstein, [1,4], ried, Time.cet('2012-07-14 19:00') ],
160
- [ 31, wolfurt, [2,2,2,4], neustadt, Time.cet('2012-07-15 10:30') ],
161
- [ 32, heiligenkreuz,[0,5], rapid, Time.cet('2012-07-15 18:00') ]
130
+ [ fac, [0,1], altach, Time.cet('2012-07-12 19:00') ],
131
+ # [ hard, [1,0], schwaz, Time.cet('2012-07-13 18:30') ],
132
+ [ dsc, [1,2], hartberg, Time.cet('2012-07-13 19:00') ],
133
+ [ gratkorn, [0,0,0,0,4,5], wacker, Time.cet('2012-07-13 19:00') ],
134
+ # [ pasching, [2,1], austrias, Time.cet('2012-07-13 19:00') ],
135
+ [ parndorf, [0,3], admira, Time.cet('2012-07-13 19:00') ],
136
+ [ voecklamarkt, [3,4], lustenau, Time.cet('2012-07-13 19:00') ],
137
+ # [ kalsdorf, [3,1], wallern, Time.cet('2012-07-13 19:00') ],
138
+ [ wattens, [0,1], sturm, Time.cet('2012-07-13 19:00') ],
139
+ # [ vsv, [4,2], rohrendorf, Time.cet('2012-07-13 19:00') ],
140
+ [ pinzgau, [0,4], groedig, Time.cet('2012-07-13 19:15') ],
141
+ # [ amstetten, [0,1], schwechat, Time.cet('2012-07-13 19:30') ],
142
+ [ stflorian, [2,1], linz, Time.cet('2012-07-13 19:30') ],
143
+ [ austriak, [3,2], horn, Time.cet('2012-07-13 19:30') ],
144
+ # [ sak, [0,5], allerheiligen, Time.cet('2012-07-13 19:30') ],
145
+ [ gak, [2,2,3,2], vienna, Time.cet('2012-07-13 20:00') ],
146
+ [ wienersk, [0,2], salzburg, Time.cet('2012-07-13 20:30') ],
147
+ # [ stegersbach, [2,2,3,2], reutte, Time.cet('2012-07-14 17:00') ],
148
+ [ badvoeslau, [1,0], stpoelten, Time.cet('2012-07-14 17:00') ],
149
+ # [ micheldorf, [0,1], viktoria, Time.cet('2012-07-14 17:00') ],
150
+ # [ klagenfurt, [1,2], stjohann, Time.cet('2012-07-14 18:00') ],
151
+ # [ lask, [7,0], spittal, Time.cet('2012-07-14 18:00') ],
152
+ [ ostbahn, [1,8], wac, Time.cet('2012-07-14 18:00') ],
153
+ # [ gaflenz, [1,2], sollenau, Time.cet('2012-07-14 18:00') ],
154
+ [ oberwart, [1,3], austria, Time.cet('2012-07-14 18:00') ],
155
+ [ leoben, [1,3], mattersburg, Time.cet('2012-07-14 18:00') ],
156
+ [ retz, [1,7], austrial, Time.cet('2012-07-14 18:00') ],
157
+ [ bregenz, [1,2], ksv, Time.cet('2012-07-14 18:30') ],
158
+ # [ ardagger, [2,2,2,3], dornbirn, Time.cet('2012-07-14 19:00') ],
159
+ [ kufstein, [1,4], ried, Time.cet('2012-07-14 19:00') ],
160
+ [ wolfurt, [2,2,2,4], neustadt, Time.cet('2012-07-15 10:30') ],
161
+ [ heiligenkreuz,[0,5], rapid, Time.cet('2012-07-15 18:00') ]
162
162
  ]
163
163
 
164
164
  games_cuprunde2 = [
165
- [ 1, kalsdorf, [3,0], hartberg, Time.cet('2012-09-24 19:00') ],
166
- [ 2, viktoria, [2,2,3,3,7,4], ksv, Time.cet('2012-09-25 16:00') ],
167
- [ 3, hard, [0,3], altach, Time.cet('2012-09-25 16:30') ],
168
- [ 4, stegersbach, [1,3], salzburg, Time.cet('2012-09-25 18:00') ],
169
- [ 5, pasching, [1,1,3,2], austrial, Time.cet('2012-09-25 19:00') ],
170
- [ 6, austriak, [0,0,2,0], admira, Time.cet('2012-09-25 19:00') ],
171
- [ 7, schwechat, [0,5], sturm, Time.cet('2012-09-25 19:00') ],
172
- [ 8, lask, [2,0], groedig, Time.cet('2012-09-25 19:00') ],
173
- [ 9, stjohann, [0,3], lustenau, Time.cet('2012-09-25 19:00') ],
174
- [ 10, sollenau, [1,1,1,5], wacker, Time.cet('2012-09-25 19:00') ],
175
- [ 11, vsv, [3,1], neustadt, Time.cet('2012-09-25 19:00') ],
176
- [ 12, dornbirn, [2,3], austria, Time.cet('2012-09-25 20:30') ],
177
- [ 13, badvoeslau, [2,3], mattersburg, Time.cet('2012-09-26 16:00') ],
178
- [ 14, stflorian, [1,1,1,1,5,6], ried, Time.cet('2012-09-26 19:00') ],
179
- [ 15, allerheiligen, [1,4], rapid, Time.cet('2012-09-26 19:00') ],
180
- [ 16, gak, [0,6], wac, Time.cet('2012-09-26 20:20') ]
165
+ [ kalsdorf, [3,0], hartberg, Time.cet('2012-09-24 19:00') ],
166
+ [ viktoria, [2,2,3,3,7,4], ksv, Time.cet('2012-09-25 16:00') ],
167
+ [ hard, [0,3], altach, Time.cet('2012-09-25 16:30') ],
168
+ [ stegersbach, [1,3], salzburg, Time.cet('2012-09-25 18:00') ],
169
+ [ pasching, [1,1,3,2], austrial, Time.cet('2012-09-25 19:00') ],
170
+ [ austriak, [0,0,2,0], admira, Time.cet('2012-09-25 19:00') ],
171
+ [ schwechat, [0,5], sturm, Time.cet('2012-09-25 19:00') ],
172
+ [ lask, [2,0], groedig, Time.cet('2012-09-25 19:00') ],
173
+ [ stjohann, [0,3], lustenau, Time.cet('2012-09-25 19:00') ],
174
+ [ sollenau, [1,1,1,5], wacker, Time.cet('2012-09-25 19:00') ],
175
+ [ vsv, [3,1], neustadt, Time.cet('2012-09-25 19:00') ],
176
+ [ dornbirn, [2,3], austria, Time.cet('2012-09-25 20:30') ],
177
+ [ badvoeslau, [2,3], mattersburg, Time.cet('2012-09-26 16:00') ],
178
+ [ stflorian, [1,1,1,1,5,6], ried, Time.cet('2012-09-26 19:00') ],
179
+ [ allerheiligen, [1,4], rapid, Time.cet('2012-09-26 19:00') ],
180
+ [ gak, [0,6], wac, Time.cet('2012-09-26 20:20') ]
181
181
  ]
182
182
 
183
183
  games_cup16 = [
184
- [ 1, lask, [], mattersburg, Time.cet('2012-10-30 00:00') ],
185
- [ 2, rapid, [], altach, Time.cet('2012-10-30 00:00') ],
186
- [ 3, viktoria, [], ried, Time.cet('2012-10-30 00:00') ],
187
- [ 4, sturm, [], wacker, Time.cet('2012-10-30 00:00') ],
188
- [ 5, pasching, [], austriak, Time.cet('2012-10-30 00:00') ],
189
- [ 6, lustenau, [], wac, Time.cet('2012-10-30 00:00') ],
190
- [ 7, kalsdorf, [], salzburg, Time.cet('2012-10-30 00:00') ],
191
- [ 8, vsv, [], austria, Time.cet('2012-10-30 00:00') ]]
184
+ [ lask, [], mattersburg, Time.cet('2012-10-30 00:00') ],
185
+ [ rapid, [], altach, Time.cet('2012-10-30 00:00') ],
186
+ [ viktoria, [], ried, Time.cet('2012-10-30 00:00') ],
187
+ [ sturm, [], wacker, Time.cet('2012-10-30 00:00') ],
188
+ [ pasching, [], austriak, Time.cet('2012-10-30 00:00') ],
189
+ [ lustenau, [], wac, Time.cet('2012-10-30 00:00') ],
190
+ [ kalsdorf, [], salzburg, Time.cet('2012-10-30 00:00') ],
191
+ [ vsv, [], austria, Time.cet('2012-10-30 00:00') ]]
192
192
 
193
193
 
194
194
  Game.create_knockouts_from_ary!( games_cuprunde1, cuprunde1 )
@@ -197,4 +197,4 @@ Game.create_knockouts_from_ary!( games_cup16, cup16 )
197
197
 
198
198
 
199
199
 
200
- Prop.create!( :key => 'db.at.cup.2012/13.version', :value => '1' )
200
+ Prop.create!( key: 'db.at.cup.2012/13.version', value: '1' )
data/db/at/teams.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
-
4
3
  bl = [
5
4
  [ 'salzburg', 'FC RB Salzburg', 'RBS' ],
6
5
  [ 'rapid', 'SK Rapid Wien', 'RAP' ],
@@ -84,13 +83,8 @@ misc = [
84
83
  [ 'juniors', 'FC RB Juniors Salzburg' ]
85
84
  ]
86
85
 
86
+ at = Country.find_by_key!( 'at' )
87
87
 
88
- Team.create_from_ary!( bl )
89
- Team.create_from_ary!( ersteliga )
90
- Team.create_from_ary!( rlwest )
91
- Team.create_from_ary!( rlmitte )
92
- Team.create_from_ary!( rlost )
93
- Team.create_from_ary!( misc )
94
-
88
+ Team.create_from_ary!( bl+ersteliga+rlwest+rlmitte+rlost+misc, club: true, country: at )
95
89
 
96
- Prop.create!( :key => 'db.at.teams.version', :value => '1' )
90
+ Prop.create!( key: 'db.at.teams.version', value: '1' )
data/db/cl/2011_12/cl.rb CHANGED
@@ -5,10 +5,9 @@
5
5
  #################################
6
6
  ## Champions League 2011/12
7
7
 
8
- ## note :team3 => false CL has no 3rd place (only final game)
9
- cl = Event.create!( :key => 'cl',
10
- :title => 'Champions League 2011/12',
11
- :start_at => Time.cet( '2011-10-10 17:00' ) )
8
+ cl = Event.create!( key: 'cl',
9
+ title: 'Champions League 2011/12',
10
+ start_at: Time.cet( '2011-10-10 17:00' ) )
12
11
 
13
12
 
14
13
  inter = Team.find_by_key!( 'inter' )
@@ -37,13 +36,13 @@ cl.teams << marseille
37
36
  cl.teams << bayern
38
37
 
39
38
 
40
- cl16 = Round.create!( :event => cl, :pos => 1, :title => 'Achtelfinale' )
41
- cl16_2 = Round.create!( :event => cl, :pos => 2, :title => 'Achtelfinale Rückspiele' )
42
- cl8 = Round.create!( :event => cl, :pos => 3, :title => 'Viertelfinale', :title2 => '27.+28. März 2012' )
43
- cl8_2 = Round.create!( :event => cl, :pos => 4, :title => 'Viertelfinale Rückspiele', :title2 => '3.+4. April 2012' )
44
- cl4 = Round.create!( :event => cl, :pos => 5, :title => 'Halbfinale', :title2 => '17.+18. April 2012' )
45
- cl4_2 = Round.create!( :event => cl, :pos => 6, :title => 'Halbfinale Rückspiele', :title2 => '24.+25. April 2012' )
46
- cl1 = Round.create!( :event => cl, :pos => 7, :title => 'Finale', :title2 => '19. Mai 2012' )
39
+ cl16 = Round.create!( event: cl, pos: 1, title: 'Achtelfinale', start_at: Time.cet( '2012-02-21' ), title2: 'Di+Mi 21.+22. Feb 2012' )
40
+ cl16_2 = Round.create!( event: cl, pos: 2, title: 'Achtelfinale Rückspiele', start_at: Time.cet( '2012-03-13' ), title2: 'Di+Mi 13.+14. März 2012' )
41
+ cl8 = Round.create!( event: cl, pos: 3, title: 'Viertelfinale', start_at: Time.cet( '2012-03-27' ), title2: 'Di+Mi 27.+28. März 2012' )
42
+ cl8_2 = Round.create!( event: cl, pos: 4, title: 'Viertelfinale Rückspiele', start_at: Time.cet( '2012-04-03' ), title2: 'Di+Mi 3.+4. April 2012' )
43
+ cl4 = Round.create!( event: cl, pos: 5, title: 'Halbfinale', start_at: Time.cet( '2012-04-17' ), title2: 'Di+Mi 17.+18. April 2012' )
44
+ cl4_2 = Round.create!( event: cl, pos: 6, title: 'Halbfinale Rückspiele', start_at: Time.cet( '2012-04-24' ), title2: 'Di+Mi 24.+25. April 2012' )
45
+ cl1 = Round.create!( event: cl, pos: 7, title: 'Finale', start_at: Time.cet( '2012-05-19' ), title2: 'Sa 19. Mai 2012' )
47
46
 
48
47
 
49
48
  games_cl16 = [
@@ -85,4 +84,4 @@ Game.create_knockout_pairs_from_ary!( games_cl4, cl4, cl4_2 )
85
84
  Game.create_knockouts_from_ary!( games_cl1, cl1 )
86
85
 
87
86
 
88
- Prop.create!( :key => 'db.cl.2011/12.version', :value => '1' )
87
+ Prop.create!( key: 'db.cl.2011/12.version', value: '1' )
data/db/cl/2011_12/el.rb CHANGED
@@ -5,9 +5,9 @@
5
5
  #################################
6
6
  ## Europa League 2012
7
7
 
8
- el = Event.create!( :key => 'el',
9
- :title => 'Europa League 2011/12',
10
- :start_at => Time.cet( '2011-10-10 17:00' ))
8
+ el = Event.create!( key: 'el',
9
+ title: 'Europa League 2011/12',
10
+ start_at: Time.cet( '2011-10-10 17:00' ))
11
11
 
12
12
  az = Team.find_by_key!( 'az' )
13
13
  valencia = Team.find_by_key!( 'valencia' )
@@ -27,11 +27,11 @@ el.teams << metalist
27
27
  el.teams << atletico
28
28
  el.teams << hannover
29
29
 
30
- el8 = Round.create!( :event => el, :pos => 1, :title => 'Viertelfinale', :title2 => '29. März 2012' )
31
- el8_2 = Round.create!( :event => el, :pos => 2, :title => 'Viertelfinale Rückspiele', :title2 => '5. April 2012' )
32
- el4 = Round.create!( :event => el, :pos => 3, :title => 'Halbfinale', :title2 => '19. April 2012' )
33
- el4_2 = Round.create!( :event => el, :pos => 4, :title => 'Halbfinale Rückspiele', :title2 => '26. April 2012' )
34
- el1 = Round.create!( :event => el, :pos => 5, :title => 'Finale', :title2 => '9. Mai 2012' )
30
+ el8 = Round.create!( event: el, pos: 1, title: 'Viertelfinale', start_at: Time.cet( '2012-03-29' ), title2: 'Do 29. März 2012' )
31
+ el8_2 = Round.create!( event: el, pos: 2, title: 'Viertelfinale Rückspiele', start_at: Time.cet( '2012-04-05' ), title2: 'Do 5. April 2012' )
32
+ el4 = Round.create!( event: el, pos: 3, title: 'Halbfinale', start_at: Time.cet( '2012-04-19' ), title2: 'Do 19. April 2012' )
33
+ el4_2 = Round.create!( event: el, pos: 4, title: 'Halbfinale Rückspiele', start_at: Time.cet( '2012-04-26' ), title2: 'Do 26. April 2012' )
34
+ el1 = Round.create!( event: el, pos: 5, title: 'Finale', start_at: Time.cet( '2012-05-09' ), title2: 'Mi 9. Mai 2012' )
35
35
 
36
36
 
37
37
  games_el8 = [
@@ -61,4 +61,4 @@ Game.create_knockout_pairs_from_ary!( games_el4, el4, el4_2 )
61
61
  Game.create_knockouts_from_ary!( games_el1, el1 )
62
62
 
63
63
 
64
- Prop.create!( :key => 'db.el.2011/12.version', :value => '1' )
64
+ Prop.create!( key: 'db.el.2011/12.version', value: '1' )
data/db/cl/2012_13/cl.rb CHANGED
@@ -5,9 +5,9 @@
5
5
  #################################
6
6
  ## Champions League 2012/13
7
7
 
8
- cl = Event.create!( :key => 'cl.2012/13',
9
- :title => 'Champions League 2012/13',
10
- :start_at => Time.cet( '2012-09-18 18:30' ) )
8
+ cl = Event.create!( key: 'cl.2012/13',
9
+ title: 'Champions League 2012/13',
10
+ start_at: Time.cet( '2012-09-18 18:30' ) )
11
11
 
12
12
  porto = Team.find_by_key!( 'porto' )
13
13
  kiew = Team.find_by_key!( 'kiew' )
@@ -92,14 +92,14 @@ cl.teams << galatasaray
92
92
  cl.teams << cluj
93
93
 
94
94
 
95
- cla = Group.create!( :event => cl, :pos => 1, :title => 'Gruppe A' )
96
- clb = Group.create!( :event => cl, :pos => 2, :title => 'Gruppe B' )
97
- clc = Group.create!( :event => cl, :pos => 3, :title => 'Gruppe C' )
98
- cld = Group.create!( :event => cl, :pos => 4, :title => 'Gruppe D' )
99
- cle = Group.create!( :event => cl, :pos => 5, :title => 'Gruppe E' )
100
- clf = Group.create!( :event => cl, :pos => 6, :title => 'Gruppe F' )
101
- clg = Group.create!( :event => cl, :pos => 7, :title => 'Gruppe G' )
102
- clh = Group.create!( :event => cl, :pos => 8, :title => 'Gruppe H' )
95
+ cla = Group.create!( event: cl, pos: 1, title: 'Gruppe A' )
96
+ clb = Group.create!( event: cl, pos: 2, title: 'Gruppe B' )
97
+ clc = Group.create!( event: cl, pos: 3, title: 'Gruppe C' )
98
+ cld = Group.create!( event: cl, pos: 4, title: 'Gruppe D' )
99
+ cle = Group.create!( event: cl, pos: 5, title: 'Gruppe E' )
100
+ clf = Group.create!( event: cl, pos: 6, title: 'Gruppe F' )
101
+ clg = Group.create!( event: cl, pos: 7, title: 'Gruppe G' )
102
+ clh = Group.create!( event: cl, pos: 8, title: 'Gruppe H' )
103
103
 
104
104
  #################################
105
105
  # Gruppe A
@@ -172,20 +172,20 @@ clh.teams << galatasaray
172
172
  clh.teams << cluj
173
173
 
174
174
 
175
- clr1 = Round.create!( :event => cl, :pos => 1, :title => 'Spieltag 1', :title2 => 'Di./Mi., 18.+19. Sep 2012' )
176
- clr2 = Round.create!( :event => cl, :pos => 2, :title => 'Spieltag 2', :title2 => 'Di./Mi., 2.+3. Okt 2012' )
177
- clr3 = Round.create!( :event => cl, :pos => 3, :title => 'Spieltag 3', :title2 => 'Di./Mi., 23.+24. Okt 2012' )
178
- clr4 = Round.create!( :event => cl, :pos => 4, :title => 'Spieltag 4', :title2 => 'Di./Mi., 6.+7. Nov 2012' )
179
- clr5 = Round.create!( :event => cl, :pos => 5, :title => 'Spieltag 5', :title2 => 'Di./Mi., 20.+21. Nov 2012' )
180
- clr6 = Round.create!( :event => cl, :pos => 6, :title => 'Spieltag 6', :title2 => 'Di./Mi., 4.+5. Dez 2012' )
175
+ clr1 = Round.create!( event: cl, pos: 1, title: 'Spieltag 1', start_at: Time.cet( '2012-09-18' ), title2: 'Di./Mi., 18.+19. Sep 2012' )
176
+ clr2 = Round.create!( event: cl, pos: 2, title: 'Spieltag 2', start_at: Time.cet( '2012-10-02' ), title2: 'Di./Mi., 2.+3. Okt 2012' )
177
+ clr3 = Round.create!( event: cl, pos: 3, title: 'Spieltag 3', start_at: Time.cet( '2012-10-23' ), title2: 'Di./Mi., 23.+24. Okt 2012' )
178
+ clr4 = Round.create!( event: cl, pos: 4, title: 'Spieltag 4', start_at: Time.cet( '2012-11-06' ), title2: 'Di./Mi., 6.+7. Nov 2012' )
179
+ clr5 = Round.create!( event: cl, pos: 5, title: 'Spieltag 5', start_at: Time.cet( '2012-11-20' ), title2: 'Di./Mi., 20.+21. Nov 2012' )
180
+ clr6 = Round.create!( event: cl, pos: 6, title: 'Spieltag 6', start_at: Time.cet( '2012-12-04' ), title2: 'Di./Mi., 4.+5. Dez 2012' )
181
181
 
182
- cl16 = Round.create!( :event => cl, :pos => 7, :title => 'Achtelfinale', :title2 => 'Di./Mi., 12.+13./19.+20. Feb 2013' )
183
- cl16_2 = Round.create!( :event => cl, :pos => 8, :title => 'Achtelfinale Rückspiele', :title2 => 'Di./Mi., 5.+6./12.+13. Mär 2013' )
184
- cl8 = Round.create!( :event => cl, :pos => 9, :title => 'Viertelfinale', :title2 => 'Di./Mi., 2.+3. Apr 2013' )
185
- cl8_2 = Round.create!( :event => cl, :pos => 10, :title => 'Viertelfinale Rückspiele', :title2 => 'Di./Mi., 9.+10. Apr 2013' )
186
- cl4 = Round.create!( :event => cl, :pos => 11, :title => 'Halbfinale', :title2 => 'Di./Mi., 23.+24. Apr 2013' )
187
- cl4_2 = Round.create!( :event => cl, :pos => 12, :title => 'Halbfinale Rückspiele', :title2 => 'Di./Mi., 30. Apr/1. Mai 2013' )
188
- cl1 = Round.create!( :event => cl, :pos => 13, :title => 'Finale', :title2 => 'Sa. 25. Mai 2013' )
182
+ cl16 = Round.create!( event: cl, pos: 7, title: 'Achtelfinale', start_at: Time.cet( '2013-02-12' ), title2: 'Di./Mi., 12.+13./19.+20. Feb 2013' )
183
+ cl16_2 = Round.create!( event: cl, pos: 8, title: 'Achtelfinale Rückspiele', start_at: Time.cet( '2013-03-05' ), title2: 'Di./Mi., 5.+6./12.+13. Mär 2013' )
184
+ cl8 = Round.create!( event: cl, pos: 9, title: 'Viertelfinale', start_at: Time.cet( '2013-04-02' ), title2: 'Di./Mi., 2.+3. Apr 2013' )
185
+ cl8_2 = Round.create!( event: cl, pos: 10, title: 'Viertelfinale Rückspiele', start_at: Time.cet( '2013-04-09' ), title2: 'Di./Mi., 9.+10. Apr 2013' )
186
+ cl4 = Round.create!( event: cl, pos: 11, title: 'Halbfinale', start_at: Time.cet( '2013-04-23' ), title2: 'Di./Mi., 23.+24. Apr 2013' )
187
+ cl4_2 = Round.create!( event: cl, pos: 12, title: 'Halbfinale Rückspiele', start_at: Time.cet( '2013-04-30' ), title2: 'Di./Mi., 30. Apr/1. Mai 2013' )
188
+ cl1 = Round.create!( event: cl, pos: 13, title: 'Finale', start_at: Time.cet( '2013-05-25' ), title2: 'Sa. 25. Mai 2013' )
189
189
 
190
190
 
191
191
  games_cla = [
@@ -319,4 +319,4 @@ Game.create_pairs_from_ary_for_group!( games_clg, clg )
319
319
  Game.create_pairs_from_ary_for_group!( games_clh, clh )
320
320
 
321
321
 
322
- Prop.create!( :key => 'db.cl.2012/13.version', :value => '1' )
322
+ Prop.create!( key: 'db.cl.2012/13.version', value: '1' )
data/db/cl/teams.rb CHANGED
@@ -1,66 +1,91 @@
1
1
  # encoding: utf-8
2
2
 
3
+ de = Country.find_by_key!( 'de' )
4
+ at = Country.find_by_key!( 'at' )
5
+ es = Country.find_by_key!( 'es' )
6
+ fr = Country.find_by_key!( 'fr' )
7
+ en = Country.find_by_key!( 'en' )
8
+ pl = Country.find_by_key!( 'pl' )
9
+ gr = Country.find_by_key!( 'gr' )
10
+ ru = Country.find_by_key!( 'ru' )
11
+ cz = Country.find_by_key!( 'cz' )
12
+ nl = Country.find_by_key!( 'nl' )
13
+ dk = Country.find_by_key!( 'dk' )
14
+ pt = Country.find_by_key!( 'pt' )
15
+ it = Country.find_by_key!( 'it' )
16
+ hr = Country.find_by_key!( 'hr' )
17
+ ua = Country.find_by_key!( 'ua' )
18
+ be = Country.find_by_key!( 'be' )
19
+ by = Country.find_by_key!( 'by' )
20
+ sc = Country.find_by_key!( 'sc' )
21
+ ro = Country.find_by_key!( 'ro' )
22
+ tr = Country.find_by_key!( 'tr' )
23
+ ch = Country.find_by_key!( 'ch' )
24
+ mt = Country.find_by_key!( 'mt' )
25
+
26
+
3
27
  teams = [
4
- [ 'porto', 'FC Porto' ],
5
- [ 'kiew', 'Dynamo Kiew' ],
6
- [ 'paris', 'Paris St. Germain' ],
7
- [ 'zagreb', 'Dinamo Zagreb' ],
8
-
9
- [ 'arsenal', 'FC Arsenal' ],
10
- [ 'schalke', 'FC Schalke 04' ],
11
- [ 'olympiacos', 'Olympiakos Piräus' ],
12
- [ 'montpellier', 'HSC Montpellier' ],
13
-
14
- [ 'milan', 'AC Mailand' ],
15
- [ 'zenit', 'Zenit St. Petersburg' ],
16
- [ 'anderlecht', 'RSC Anderlecht' ],
17
- [ 'malaga', 'FC Málaga' ],
18
-
19
- [ 'madrid', 'Real Madrid' ],
20
- [ 'mancity', 'Manchester City' ],
21
- [ 'ajax', 'Ajax Amsterdam' ],
22
- [ 'dortmund', 'Borussia Dortmund' ],
23
-
24
- [ 'chelsea', 'FC Chelsea' ],
25
- [ 'donezk', 'Schachtjor Donezk' ],
26
- [ 'juventus', 'Juventus Turin' ],
27
- [ 'nordsjalland', 'FC Nordsjælland' ],
28
-
29
- [ 'bayern', 'Bayern München' ],
30
- [ 'valencia', 'FC Valencia' ],
31
- [ 'lille', 'OSC Lille' ],
32
- [ 'borissow', 'BATE Borissow' ],
33
-
34
- [ 'barcelona', 'FC Barcelona' ],
35
- [ 'benfica', 'Benfica Lissabon' ],
36
- [ 'spartak', 'Spartak Moskau' ],
37
- [ 'celtic', 'Celtic Glasgow' ],
38
-
39
- [ 'manunited', 'Manchester United' ],
40
- [ 'braga', 'Sporting Braga' ],
41
- [ 'galatasaray', 'Galatasaray' ],
42
- [ 'cluj', 'CFR Cluj' ],
28
+ [ 'porto', 'FC Porto', pt ],
29
+ [ 'kiew', 'Dynamo Kiew', ua ],
30
+ [ 'paris', 'Paris St. Germain', fr ],
31
+ [ 'zagreb', 'Dinamo Zagreb', hr ],
32
+
33
+ [ 'arsenal', 'FC Arsenal', en ],
34
+ [ 'schalke', 'FC Schalke 04', de ],
35
+ [ 'olympiacos', 'Olympiakos Piräus', gr ],
36
+ [ 'montpellier', 'HSC Montpellier', fr ],
37
+
38
+ [ 'milan', 'AC Mailand', it ],
39
+ [ 'zenit', 'Zenit St. Petersburg', ru ],
40
+ [ 'anderlecht', 'RSC Anderlecht', be ],
41
+ [ 'malaga', 'FC Málaga', es ],
42
+
43
+ [ 'madrid', 'Real Madrid', es ],
44
+ [ 'mancity', 'Manchester City', en ],
45
+ [ 'ajax', 'Ajax Amsterdam', nl ],
46
+ [ 'dortmund', 'Borussia Dortmund', de ],
47
+
48
+ [ 'chelsea', 'FC Chelsea', en ],
49
+ [ 'donezk', 'Schachtjor Donezk', ua ],
50
+ [ 'juventus', 'Juventus Turin', it ],
51
+ [ 'nordsjalland', 'FC Nordsjælland', dk ],
52
+
53
+ [ 'bayern', 'Bayern München', de ],
54
+ [ 'valencia', 'FC Valencia', es ],
55
+ [ 'lille', 'OSC Lille', fr ],
56
+ [ 'borissow', 'BATE Borissow', by ],
57
+
58
+ [ 'barcelona', 'FC Barcelona', es ],
59
+ [ 'benfica', 'Benfica Lissabon', pt ],
60
+ [ 'spartak', 'Spartak Moskau', ru ],
61
+ [ 'celtic', 'Celtic Glasgow', sc ],
62
+
63
+ [ 'manunited', 'Manchester United', en ],
64
+ [ 'braga', 'Sporting Braga', pt ],
65
+ [ 'galatasaray', 'Galatasaray', tr ],
66
+ [ 'cluj', 'CFR Cluj', ro ],
43
67
 
44
68
  ###################
45
69
  # more teams from cl/el 2011-12
46
70
  #
47
- [ 'inter', 'FC Internazionale Milano' ],
48
- [ 'marseille', 'Olympique Marseille' ],
49
- [ 'basel', 'FC Basel 1893' ],
50
- [ 'napoli', 'SSC Napoli' ],
51
- [ 'moskva', 'PFC CSKA Moskva' ],
52
- [ 'apoel', 'APOEL Nikosia' ],
53
-
54
- [ 'az', 'AZ Alkmaar' ],
55
- [ 'athletic', 'Athletic Bilbao' ],
56
- [ 'sporting', 'Sporting Lisboa' ],
57
- [ 'metalist', 'FC Metalist Kharkiv' ],
58
- [ 'atletico', 'Atlético Madrid' ],
59
- [ 'hannover', 'Hannover 96' ]
71
+ [ 'inter', 'FC Internazionale Milano', it ],
72
+ [ 'marseille', 'Olympique Marseille', fr ],
73
+ [ 'basel', 'FC Basel 1893', ch ],
74
+ [ 'napoli', 'SSC Napoli', it ],
75
+ [ 'moskva', 'PFC CSKA Moskva', ru ],
76
+ [ 'apoel', 'APOEL Nikosia', mt ],
77
+
78
+ [ 'az', 'AZ Alkmaar', nl ],
79
+ [ 'athletic', 'Athletic Bilbao', es ],
80
+ [ 'sporting', 'Sporting Lisboa', pt ],
81
+ [ 'metalist', 'FC Metalist Kharkiv', ua ],
82
+ [ 'atletico', 'Atlético Madrid', es ],
83
+ [ 'hannover', 'Hannover 96', de ]
60
84
  ]
61
85
 
62
- Team.create_from_ary!( teams )
86
+
87
+ Team.create_from_ary!( teams, club: true )
63
88
 
64
89
 
65
- Prop.create!( :key => 'db.cl.teams.version', :value => '1' )
66
- Prop.create!( :key => 'db.el.teams.version', :value => '1' )
90
+ Prop.create!( key: 'db.cl.teams.version', value: '1' )
91
+ Prop.create!( key: 'db.el.teams.version', value: '1' )