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/History.markdown +5 -0
- data/Manifest.txt +19 -1
- data/Rakefile +14 -5
- data/db/at/2011_12/bl.rb +52 -53
- data/db/at/2011_12/cup.rb +14 -12
- data/db/at/2012_13/bl.rb +127 -125
- data/db/at/2012_13/cup.rb +66 -66
- data/db/at/teams.rb +3 -9
- data/db/cl/2011_12/cl.rb +11 -12
- data/db/cl/2011_12/el.rb +9 -9
- data/db/cl/2012_13/cl.rb +25 -25
- data/db/cl/teams.rb +80 -55
- data/db/countries.rb +70 -0
- data/db/de/2012_13/bl.rb +175 -0
- data/db/de/teams.rb +36 -0
- data/db/en/2012_13/pl.rb +9 -0
- data/db/en/teams.rb +40 -0
- data/db/euro/2012.rb +14 -14
- data/db/euro/teams.rb +52 -22
- data/db/mx/apertura_2012.rb +84 -84
- data/db/mx/teams.rb +4 -2
- data/db/nhl/teams.rb +50 -0
- data/db/ro/l1_2012_13.rb +134 -0
- data/db/ro/teams.rb +31 -0
- data/db/world/quali_2012_13.rb +17 -92
- data/db/world/quali_2012_13_c.rb +127 -0
- data/db/world/quali_2012_13_i.rb +114 -0
- data/lib/sportdb.rb +34 -10
- data/lib/sportdb/cli/runner.rb +12 -2
- data/lib/sportdb/loader.rb +6 -1
- data/lib/sportdb/models/country.rb +26 -0
- data/lib/sportdb/models/event.rb +19 -0
- data/lib/sportdb/models/event_team.rb +14 -0
- data/lib/sportdb/{models.rb → models/game.rb} +141 -215
- data/lib/sportdb/models/group.rb +18 -0
- data/lib/sportdb/models/group_team.rb +15 -0
- data/lib/sportdb/models/prop.rb +12 -0
- data/lib/sportdb/models/round.rb +15 -0
- data/lib/sportdb/models/team.rb +49 -0
- data/lib/sportdb/schema.rb +22 -5
- data/lib/sportdb/version.rb +1 -1
- metadata +67 -10
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!( :
|
7
|
-
:
|
8
|
-
:
|
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!( :
|
11
|
-
cuprunde2 = Round.create!( :
|
12
|
-
cup16 = Round.create!( :
|
13
|
-
cup8 = Round.create!( :
|
14
|
-
cup4 = Round.create!( :
|
15
|
-
cup1 = Round.create!( :
|
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
|
-
[
|
131
|
-
# [
|
132
|
-
[
|
133
|
-
[
|
134
|
-
# [
|
135
|
-
[
|
136
|
-
[
|
137
|
-
# [
|
138
|
-
[
|
139
|
-
# [
|
140
|
-
[
|
141
|
-
# [
|
142
|
-
[
|
143
|
-
[
|
144
|
-
# [
|
145
|
-
[
|
146
|
-
[
|
147
|
-
# [
|
148
|
-
[
|
149
|
-
# [
|
150
|
-
# [
|
151
|
-
# [
|
152
|
-
[
|
153
|
-
# [
|
154
|
-
[
|
155
|
-
[
|
156
|
-
[
|
157
|
-
[
|
158
|
-
# [
|
159
|
-
[
|
160
|
-
[
|
161
|
-
[
|
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
|
-
[
|
166
|
-
[
|
167
|
-
[
|
168
|
-
[
|
169
|
-
[
|
170
|
-
[
|
171
|
-
[
|
172
|
-
[
|
173
|
-
[
|
174
|
-
[
|
175
|
-
[
|
176
|
-
[
|
177
|
-
[
|
178
|
-
[
|
179
|
-
[
|
180
|
-
[
|
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
|
-
[
|
185
|
-
[
|
186
|
-
[
|
187
|
-
[
|
188
|
-
[
|
189
|
-
[
|
190
|
-
[
|
191
|
-
[
|
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!( :
|
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!( :
|
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
|
-
|
9
|
-
|
10
|
-
:
|
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!( :
|
41
|
-
cl16_2 = Round.create!( :
|
42
|
-
cl8 = Round.create!( :
|
43
|
-
cl8_2 = Round.create!( :
|
44
|
-
cl4 = Round.create!( :
|
45
|
-
cl4_2 = Round.create!( :
|
46
|
-
cl1 = Round.create!( :
|
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!( :
|
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!( :
|
9
|
-
:
|
10
|
-
:
|
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!( :
|
31
|
-
el8_2 = Round.create!( :
|
32
|
-
el4 = Round.create!( :
|
33
|
-
el4_2 = Round.create!( :
|
34
|
-
el1 = Round.create!( :
|
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!( :
|
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!( :
|
9
|
-
:
|
10
|
-
:
|
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!( :
|
96
|
-
clb = Group.create!( :
|
97
|
-
clc = Group.create!( :
|
98
|
-
cld = Group.create!( :
|
99
|
-
cle = Group.create!( :
|
100
|
-
clf = Group.create!( :
|
101
|
-
clg = Group.create!( :
|
102
|
-
clh = Group.create!( :
|
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!( :
|
176
|
-
clr2 = Round.create!( :
|
177
|
-
clr3 = Round.create!( :
|
178
|
-
clr4 = Round.create!( :
|
179
|
-
clr5 = Round.create!( :
|
180
|
-
clr6 = Round.create!( :
|
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!( :
|
183
|
-
cl16_2 = Round.create!( :
|
184
|
-
cl8 = Round.create!( :
|
185
|
-
cl8_2 = Round.create!( :
|
186
|
-
cl4 = Round.create!( :
|
187
|
-
cl4_2 = Round.create!( :
|
188
|
-
cl1 = Round.create!( :
|
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!( :
|
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
|
-
|
86
|
+
|
87
|
+
Team.create_from_ary!( teams, club: true )
|
63
88
|
|
64
89
|
|
65
|
-
Prop.create!( :
|
66
|
-
Prop.create!( :
|
90
|
+
Prop.create!( key: 'db.cl.teams.version', value: '1' )
|
91
|
+
Prop.create!( key: 'db.el.teams.version', value: '1' )
|