sportdb 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,9 +3,9 @@
3
3
  # note: timezone for games (play_at) is *always* CST (central standard time / -6 hours ??)
4
4
 
5
5
 
6
- mx = Event.create!( :key => 'mx_ap_2012',
7
- :title => 'México Primera División Apertura 2012',
8
- :start_at => Time.cst('2012-07-20 00:00') )
6
+ mx = Event.create!( key: 'mx_ap_2012',
7
+ title: 'México Primera División Apertura 2012',
8
+ start_at: Time.cst('2012-07-20 00:00') )
9
9
 
10
10
 
11
11
  america = Team.find_by_key!( 'america' )
@@ -47,104 +47,104 @@ mx.teams << toluca
47
47
  mx.teams << tigres
48
48
  mx.teams << pumas
49
49
 
50
- j1 = Round.create!( :event => mx, :pos => 1, :title => 'Jornada 1', :title2 => '20, 21 y 22 de julio' )
51
- j2 = Round.create!( :event => mx, :pos => 2, :title => 'Jornada 2', :title2 => '27, 28 y 29 de julio' )
52
- j3 = Round.create!( :event => mx, :pos => 3, :title => 'Jornada 3', :title2 => '3, 4, y 5 de agosto' )
53
- j4 = Round.create!( :event => mx, :pos => 4, :title => 'Jornada 4', :title2 => '10, 11 y 12 de agosto' )
54
- j5 = Round.create!( :event => mx, :pos => 5, :title => 'Jornada 5', :title2 => '17, 18 y 19 de agosto' )
55
- j6 = Round.create!( :event => mx, :pos => 6, :title => 'Jornada 6', :title2 => '24, 25 y 26 de agosto' )
56
- j7 = Round.create!( :event => mx, :pos => 7, :title => 'Jornada 7', :title2 => '31 de agosto, 1 y 2 de septiembre' )
57
- j8 = Round.create!( :event => mx, :pos => 8, :title => 'Jornada 8', :title2 => '14, 15 y 16 de septiembre' )
50
+ j1 = Round.create!( event: mx, pos: 1, title: 'Jornada 1', start_at: Time.cst('2012-07-20'), title2: '20, 21 y 22 de julio' )
51
+ j2 = Round.create!( event: mx, pos: 2, title: 'Jornada 2', start_at: Time.cst('2012-07-27'), title2: '27, 28 y 29 de julio' )
52
+ j3 = Round.create!( event: mx, pos: 3, title: 'Jornada 3', start_at: Time.cst('2012-08-03'), title2: '3, 4, y 5 de agosto' )
53
+ j4 = Round.create!( event: mx, pos: 4, title: 'Jornada 4', start_at: Time.cst('2012-08-10'), title2: '10, 11 y 12 de agosto' )
54
+ j5 = Round.create!( event: mx, pos: 5, title: 'Jornada 5', start_at: Time.cst('2012-08-17'), title2: '17, 18 y 19 de agosto' )
55
+ j6 = Round.create!( event: mx, pos: 6, title: 'Jornada 6', start_at: Time.cst('2012-08-24'), title2: '24, 25 y 26 de agosto' )
56
+ j7 = Round.create!( event: mx, pos: 7, title: 'Jornada 7', start_at: Time.cst('2012-08-31'), title2: '31 de agosto, 1 y 2 de septiembre' )
57
+ j8 = Round.create!( event: mx, pos: 8, title: 'Jornada 8', start_at: Time.cst('2012-09-14'), title2: '14, 15 y 16 de septiembre' )
58
58
 
59
59
 
60
60
  games_j1 = [
61
- [1, jaguares, [], tigres, Time.cst('2012-07-20 19:30') ],
62
- [2, tijuana, [], puebla, Time.cst('2012-07-20 21:30') ],
63
- [3, cruzazul, [], monarcas, Time.cst('2012-07-21 17:00') ],
64
- [4, queretaro, [], leon, Time.cst('2012-07-21 17:00') ],
65
- [5, slaguna, [], sanluis, Time.cst('2012-07-21 19:00') ],
66
- [6, monterrey, [], america, Time.cst('2012-07-21 19:00') ],
67
- [7, atlas, [], pumas, Time.cst('2012-07-21 21:00') ],
68
- [8, toluca, [], chivas, Time.cst('2012-07-22 12:00') ],
69
- [9, atlante, [], pachuca, Time.cst('2012-07-22 18:00') ]]
61
+ [ jaguares, [], tigres, Time.cst('2012-07-20 19:30') ],
62
+ [ tijuana, [], puebla, Time.cst('2012-07-20 21:30') ],
63
+ [ cruzazul, [], monarcas, Time.cst('2012-07-21 17:00') ],
64
+ [ queretaro, [], leon, Time.cst('2012-07-21 17:00') ],
65
+ [ slaguna, [], sanluis, Time.cst('2012-07-21 19:00') ],
66
+ [ monterrey, [], america, Time.cst('2012-07-21 19:00') ],
67
+ [ atlas, [], pumas, Time.cst('2012-07-21 21:00') ],
68
+ [ toluca, [], chivas, Time.cst('2012-07-22 12:00') ],
69
+ [ atlante, [], pachuca, Time.cst('2012-07-22 18:00') ]]
70
70
 
71
71
 
72
72
  games_j2 = [
73
- [1, monarcas, [], monterrey, Time.cst('2012-07-27 19:30') ],
74
- [2, leon, [], tijuana, Time.cst('2012-07-27 21:30') ],
75
- [3, america, [], jaguares, Time.cst('2012-07-28 17:00') ],
76
- [4, pachuca, [], atlas, Time.cst('2012-07-28 19:00') ],
77
- [5, tigres, [], atlante, Time.cst('2012-07-28 19:00') ],
78
- [6, sanluis, [], cruzazul, Time.cst('2012-07-28 21:00') ],
79
- [7, puebla, [], toluca, Time.cst('2012-07-29 12:00') ],
80
- [8, pumas, [], queretaro, Time.cst('2012-07-29 12:00') ],
81
- [9, chivas, [], slaguna, Time.cst('2012-07-29 17:00')]]
73
+ [ monarcas, [], monterrey, Time.cst('2012-07-27 19:30') ],
74
+ [ leon, [], tijuana, Time.cst('2012-07-27 21:30') ],
75
+ [ america, [], jaguares, Time.cst('2012-07-28 17:00') ],
76
+ [ pachuca, [], atlas, Time.cst('2012-07-28 19:00') ],
77
+ [ tigres, [], atlante, Time.cst('2012-07-28 19:00') ],
78
+ [ sanluis, [], cruzazul, Time.cst('2012-07-28 21:00') ],
79
+ [ puebla, [], toluca, Time.cst('2012-07-29 12:00') ],
80
+ [ pumas, [], queretaro, Time.cst('2012-07-29 12:00') ],
81
+ [ chivas, [], slaguna, Time.cst('2012-07-29 17:00')]]
82
82
 
83
83
  games_j3 = [
84
- [1, slaguna, [], puebla, Time.cst('2012-08-03 19:00') ],
85
- [2, tijuana, [], pumas, Time.cst('2012-08-03 19:30') ],
86
- [3, monarcas, [], sanluis, Time.cst('2012-08-03 21:30') ],
87
- [4, cruzazul, [], chivas, Time.cst('2012-08-04 17:00') ],
88
- [5, queretaro, [], pachuca, Time.cst('2012-08-04 17:00') ],
89
- [6, monterrey, [], jaguares, Time.cst('2012-08-04 19:00') ],
90
- [7, atlas, [], tigres, Time.cst('2012-08-04 21:00') ],
91
- [8, toluca, [], leon, Time.cst('2012-08-05 12:00') ],
92
- [9, atlante, [], america, Time.cst('2012-08-05 18:00') ]]
84
+ [ slaguna, [], puebla, Time.cst('2012-08-03 19:00') ],
85
+ [ tijuana, [], pumas, Time.cst('2012-08-03 19:30') ],
86
+ [ monarcas, [], sanluis, Time.cst('2012-08-03 21:30') ],
87
+ [ cruzazul, [], chivas, Time.cst('2012-08-04 17:00') ],
88
+ [ queretaro, [], pachuca, Time.cst('2012-08-04 17:00') ],
89
+ [ monterrey, [], jaguares, Time.cst('2012-08-04 19:00') ],
90
+ [ atlas, [], tigres, Time.cst('2012-08-04 21:00') ],
91
+ [ toluca, [], leon, Time.cst('2012-08-05 12:00') ],
92
+ [ atlante, [], america, Time.cst('2012-08-05 18:00') ]]
93
93
 
94
94
  games_j4 = [
95
- [1, jaguares, [], atlante, Time.cst('2012-08-10 19:30') ],
96
- [2, leon, [], slaguna, Time.cst('2012-08-10 21:30') ],
97
- [3, america, [], atlas, Time.cst('2012-08-11 17:00') ],
98
- [4, pachuca, [], tijuana, Time.cst('2012-08-11 19:00') ],
99
- [5, tigres, [], queretaro, Time.cst('2012-08-11 19:00') ],
100
- [6, sanluis, [], monterrey, Time.cst('2012-08-11 21:00') ],
101
- [7, puebla, [], cruzazul, Time.cst('2012-08-12 12:00') ],
102
- [8, pumas, [], toluca, Time.cst('2012-08-12 12:00') ],
103
- [9, chivas, [], monarcas, Time.cst('2012-08-12 17:00') ]]
95
+ [ jaguares, [], atlante, Time.cst('2012-08-10 19:30') ],
96
+ [ leon, [], slaguna, Time.cst('2012-08-10 21:30') ],
97
+ [ america, [], atlas, Time.cst('2012-08-11 17:00') ],
98
+ [ pachuca, [], tijuana, Time.cst('2012-08-11 19:00') ],
99
+ [ tigres, [], queretaro, Time.cst('2012-08-11 19:00') ],
100
+ [ sanluis, [], monterrey, Time.cst('2012-08-11 21:00') ],
101
+ [ puebla, [], cruzazul, Time.cst('2012-08-12 12:00') ],
102
+ [ pumas, [], toluca, Time.cst('2012-08-12 12:00') ],
103
+ [ chivas, [], monarcas, Time.cst('2012-08-12 17:00') ]]
104
104
 
105
105
  games_j5 = [
106
- [1, tijuana, [], tigres, Time.cst('2012-08-17 19:30') ],
107
- [2, monarcas, [], puebla, Time.cst('2012-08-17 21:30') ],
108
- [3, cruzazul, [], leon, Time.cst('2012-08-17 21:30') ],
109
- [4, queretaro, [], america, Time.cst('2012-08-18 17:00') ],
110
- [5, slaguna, [], pumas, Time.cst('2012-08-18 19:00') ],
111
- [6, monterrey, [], atlante, Time.cst('2012-08-18 19:00') ],
112
- [7, sanluis, [], chivas, Time.cst('2012-08-18 21:00') ],
113
- [8, atlas, [], jaguares, Time.cst('2012-08-18 21:00') ],
114
- [9, toluca, [], pachuca, Time.cst('2012-08-19 12:00') ]]
106
+ [ tijuana, [], tigres, Time.cst('2012-08-17 19:30') ],
107
+ [ monarcas, [], puebla, Time.cst('2012-08-17 21:30') ],
108
+ [ cruzazul, [], leon, Time.cst('2012-08-17 21:30') ],
109
+ [ queretaro, [], america, Time.cst('2012-08-18 17:00') ],
110
+ [ slaguna, [], pumas, Time.cst('2012-08-18 19:00') ],
111
+ [ monterrey, [], atlante, Time.cst('2012-08-18 19:00') ],
112
+ [ sanluis, [], chivas, Time.cst('2012-08-18 21:00') ],
113
+ [ atlas, [], jaguares, Time.cst('2012-08-18 21:00') ],
114
+ [ toluca, [], pachuca, Time.cst('2012-08-19 12:00') ]]
115
115
 
116
116
  games_j6 = [
117
- [1, jaguares, [], queretaro, Time.cst('2012-08-24 19:30') ],
118
- [2, leon, [], monarcas, Time.cst('2012-08-24 21:30') ],
119
- [3, america, [], tijuana, Time.cst('2012-08-25 17:00') ],
120
- [4, pachuca, [], slaguna, Time.cst('2012-08-25 19:00') ],
121
- [5, tigres, [], toluca, Time.cst('2012-08-25 19:00') ],
122
- [6, puebla, [], sanluis, Time.cst('2012-08-26 12:00') ],
123
- [7, pumas, [], cruzazul, Time.cst('2012-08-26 12:00') ],
124
- [8, chivas, [], monterrey, Time.cst('2012-08-26 17:00') ],
125
- [9, atlante, [], atlas, Time.cst('2012-08-26 18:00') ]]
117
+ [ jaguares, [], queretaro, Time.cst('2012-08-24 19:30') ],
118
+ [ leon, [], monarcas, Time.cst('2012-08-24 21:30') ],
119
+ [ america, [], tijuana, Time.cst('2012-08-25 17:00') ],
120
+ [ pachuca, [], slaguna, Time.cst('2012-08-25 19:00') ],
121
+ [ tigres, [], toluca, Time.cst('2012-08-25 19:00') ],
122
+ [ puebla, [], sanluis, Time.cst('2012-08-26 12:00') ],
123
+ [ pumas, [], cruzazul, Time.cst('2012-08-26 12:00') ],
124
+ [ chivas, [], monterrey, Time.cst('2012-08-26 17:00') ],
125
+ [ atlante, [], atlas, Time.cst('2012-08-26 18:00') ]]
126
126
 
127
127
  games_j7 = [
128
- [1, tijuana, [], jaguares, Time.cst('2012-08-31 19:30') ],
129
- [2, monarcas, [], pumas, Time.cst('2012-08-31 21:30') ],
130
- [3, cruzazul, [], pachuca, Time.cst('2012-09-01 17:00') ],
131
- [4, queretaro, [], atlante, Time.cst('2012-09-01 17:00') ],
132
- [5, slaguna, [], tigres, Time.cst('2012-09-01 19:00') ],
133
- [6, monterrey, [], atlas, Time.cst('2012-09-01 19:00') ],
134
- [7, sanluis, [], leon, Time.cst('2012-09-01 21:00') ],
135
- [8, toluca, [], america, Time.cst('2012-09-02 12:00') ],
136
- [9, chivas, [], puebla, Time.cst('2012-09-02 17:00') ]]
128
+ [ tijuana, [], jaguares, Time.cst('2012-08-31 19:30') ],
129
+ [ monarcas, [], pumas, Time.cst('2012-08-31 21:30') ],
130
+ [ cruzazul, [], pachuca, Time.cst('2012-09-01 17:00') ],
131
+ [ queretaro, [], atlante, Time.cst('2012-09-01 17:00') ],
132
+ [ slaguna, [], tigres, Time.cst('2012-09-01 19:00') ],
133
+ [ monterrey, [], atlas, Time.cst('2012-09-01 19:00') ],
134
+ [ sanluis, [], leon, Time.cst('2012-09-01 21:00') ],
135
+ [ toluca, [], america, Time.cst('2012-09-02 12:00') ],
136
+ [ chivas, [], puebla, Time.cst('2012-09-02 17:00') ]]
137
137
 
138
138
  games_j8 = [
139
- [1, jaguares, [], toluca, Time.cst('2012-09-14 19:30') ],
140
- [2, pachuca, [], monarcas, Time.cst('2012-09-14 19:30') ],
141
- [3, leon, [], chivas, Time.cst('2012-09-14 21:30') ],
142
- [4, america, [], slaguna, Time.cst('2012-09-15 17:00') ],
143
- [5, tigres, [], cruzazul, Time.cst('2012-09-15 19:00') ],
144
- [6, atlas, [], queretaro, Time.cst('2012-09-15 21:00') ],
145
- [7, puebla, [], monterrey, Time.cst('2012-09-16 12:00') ],
146
- [8, pumas, [], sanluis, Time.cst('2012-09-16 12:00') ],
147
- [9, atlante, [], tijuana, Time.cst('2012-09-16 18:00') ]]
139
+ [ jaguares, [], toluca, Time.cst('2012-09-14 19:30') ],
140
+ [ pachuca, [], monarcas, Time.cst('2012-09-14 19:30') ],
141
+ [ leon, [], chivas, Time.cst('2012-09-14 21:30') ],
142
+ [ america, [], slaguna, Time.cst('2012-09-15 17:00') ],
143
+ [ tigres, [], cruzazul, Time.cst('2012-09-15 19:00') ],
144
+ [ atlas, [], queretaro, Time.cst('2012-09-15 21:00') ],
145
+ [ puebla, [], monterrey, Time.cst('2012-09-16 12:00') ],
146
+ [ pumas, [], sanluis, Time.cst('2012-09-16 12:00') ],
147
+ [ atlante, [], tijuana, Time.cst('2012-09-16 18:00') ]]
148
148
 
149
149
 
150
150
  Game.create_from_ary!( games_j1, j1 )
@@ -157,4 +157,4 @@ Game.create_from_ary!( games_j7, j7 )
157
157
  Game.create_from_ary!( games_j8, j8 )
158
158
 
159
159
 
160
- Prop.create!( :key => 'db.mx.apertura.2012.version', :value => '1' )
160
+ Prop.create!( key: 'db.mx.apertura.2012.version', value: '1' )
data/db/mx/teams.rb CHANGED
@@ -21,6 +21,8 @@ teams = [
21
21
  [ 'pumas', 'Pumas UNAM', 'México' ]
22
22
  ]
23
23
 
24
- Team.create_from_ary!( teams )
24
+ mx = Country.find_by_key!( 'mx' )
25
25
 
26
- Prop.create!( :key => 'db.mx.teams.version', :value => '1' )
26
+ Team.create_from_ary!( teams, club: true, country: mx )
27
+
28
+ Prop.create!( key: 'db.mx.teams.version', value: '1' )
data/db/nhl/teams.rb ADDED
@@ -0,0 +1,50 @@
1
+ # encoding: utf-8
2
+
3
+ ######################################
4
+ ## NHL Teams 2012
5
+
6
+ us = Country.find_by_key!( 'us' )
7
+ ca = Country.find_by_key!( 'ca' )
8
+
9
+
10
+ teams = [
11
+ [ 'newjersey', 'New Jersey Devils', 'East/Atlantic', us ],
12
+ [ 'nyislanders', 'New York Islanders', 'East/Atlantic', us ],
13
+ [ 'nyrangers', 'New York Rangers', 'East/Atlantic', us ],
14
+ [ 'philadelphia', 'Philadelphia Flyers', 'East/Atlantic', us ],
15
+ [ 'pittsburgh', 'Pittsburgh Penguins', 'East/Atlantic', us ],
16
+
17
+ [ 'boston', 'Boston Bruis', 'East/Northeast', us ],
18
+ [ 'buffalo', 'Buffalo Sabres', 'East/Northeast', us ],
19
+ [ 'montreal', 'Montreal Canadiens', 'East/Northeast', ca ],
20
+ [ 'ottawa', 'Ottawa Senators', 'East/Northeast', ca ],
21
+ [ 'toronto', 'Toronto Maple Leafs', 'East/Northeast', ca ],
22
+
23
+ [ 'carolina', 'Carolina Hurricanes', 'East/Southeast', us ],
24
+ [ 'florida', 'Florida Panthers', 'East/Southeast', us ],
25
+ [ 'tampabay', 'Tampa Bay Lightning', 'East/Southeast', us ],
26
+ [ 'washington', 'Washington Capitals', 'East/Southeast', us ],
27
+ [ 'winnipeg', 'Winnipeg Jets', 'East/Southeast', ca ],
28
+
29
+ [ 'chicago', 'Chicago Blackhawks', 'West/Central', us ],
30
+ [ 'columbus', 'Columbus Blue Jackets', 'West/Central', us ],
31
+ [ 'detroit', 'Detroit Red Wings', 'West/Central', us ],
32
+ [ 'nashville', 'Nashville Predators', 'West/Central', us ],
33
+ [ 'stlouis', 'St. Louis Blues', 'West/Central', us ],
34
+
35
+ [ 'calgary', 'Calgary Flames', 'West/Northwest', ca ],
36
+ [ 'colorado', 'Colorado Avalanche', 'West/Northwest', us ],
37
+ [ 'edmonton', 'Edmonton Oilers', 'West/Northwest', ca ],
38
+ [ 'minnesota', 'Minnesota Wild', 'West/Northwest', us ],
39
+ [ 'vancouver', 'Vancouver Canucks', 'West/Northwest', ca ],
40
+
41
+ [ 'anaheim', 'Anaheim Ducks', 'West/Pacific', us ],
42
+ [ 'dallas', 'Dallas Stars', 'West/Pacific', us ],
43
+ [ 'losangeles', 'Los Angeles Kings', 'West/Pacific', us ],
44
+ [ 'phoenix', 'Phoenix Coyotes', ' West/Pacific', us ],
45
+ [ 'sanjose', 'San Jose Sharks', ' West/Pacific', us ]
46
+ ]
47
+
48
+ Team.create_from_ary!( teams, club: true )
49
+
50
+ Prop.create!( key: 'db.nhl.teams.version', value: '1' )
@@ -0,0 +1,134 @@
1
+ # encoding: utf-8
2
+
3
+ # note: timezone for games (play_at) is *always* eet (eastern european time)
4
+
5
+
6
+ ######################################
7
+ ## Romania Liga1 2012/13
8
+ ##
9
+ ## more info => http://liga1.ro
10
+
11
+
12
+ ## todo: check key dinamo or rapid may be already taken!!
13
+
14
+
15
+ l1 = Event.create!( key: 'ro_l1_2012_13',
16
+ title: 'Romania Liga 1 2012/13',
17
+ start_at: Time.eet('2012-07-01 00:00') )
18
+
19
+ astra = Team.find_by_key!( 'astra' )
20
+ ceahlau = Team.find_by_key!( 'ceahlau' )
21
+ cfr = Team.find_by_key!( 'cfr' )
22
+ chiajna = Team.find_by_key!( 'chiajna' )
23
+ iasi = Team.find_by_key!( 'iasi' )
24
+ dinamo = Team.find_by_key!( 'dinamo' )
25
+ fcbrasov = Team.find_by_key!( 'fcbrasov' )
26
+ gazmetan_severin = Team.find_by_key!( 'gazmetan_severin' )
27
+ vaslui = Team.find_by_key!( 'vaslui' )
28
+ gazmetan_medias = Team.find_by_key!( 'gazmetan_medias' )
29
+ gloria_bistrita = Team.find_by_key!( 'gloria_bistrita' )
30
+ otelul = Team.find_by_key!( 'otelul' )
31
+ pandurii = Team.find_by_key!( 'pandurii' )
32
+ petrolul = Team.find_by_key!( 'petrolul' )
33
+ rapid = Team.find_by_key!( 'rapid' )
34
+ steaua = Team.find_by_key!( 'steaua' )
35
+ u_cluj = Team.find_by_key!( 'u_cluj' )
36
+ viitorul_constanta = Team.find_by_key!( 'viitorul_constanta' )
37
+
38
+
39
+ l1.teams << astra
40
+ l1.teams << ceahlau
41
+ l1.teams << cfr
42
+ l1.teams << chiajna
43
+ l1.teams << iasi
44
+ l1.teams << dinamo
45
+ l1.teams << fcbrasov
46
+ l1.teams << gazmetan_severin
47
+ l1.teams << vaslui
48
+ l1.teams << gazmetan_medias
49
+ l1.teams << gloria_bistrita
50
+ l1.teams << otelul
51
+ l1.teams << pandurii
52
+ l1.teams << petrolul
53
+ l1.teams << rapid
54
+ l1.teams << steaua
55
+ l1.teams << u_cluj
56
+ l1.teams << viitorul_constanta
57
+
58
+
59
+ l101 = Round.create!( event: l1, pos: 1, title: '1. Runda', start_at: Time.eet('2012-07-20') )
60
+ l102 = Round.create!( event: l1, pos: 2, title: '2. Runda', start_at: Time.eet('2012-07-28') )
61
+ l103 = Round.create!( event: l1, pos: 3, title: '3. Runda', start_at: Time.eet('2012-08-03') )
62
+ l104 = Round.create!( event: l1, pos: 4, title: '4. Runda', start_at: Time.eet('2012-08-11') )
63
+ l105 = Round.create!( event: l1, pos: 5, title: '5. Runda', start_at: Time.eet('2012-08-18') )
64
+
65
+
66
+ games_l101 = [
67
+ [ pandurii, [], u_cluj, Time.eet('2012-07-20 18:30') ],
68
+ [ gazmetan_medias, [], dinamo, Time.eet('2012-07-20 20:20') ],
69
+ [ petrolul, [], ceahlau, Time.eet('2012-07-21 19:00') ],
70
+ [ cfr, [], gazmetan_severin, Time.eet('2012-07-21 21:30') ],
71
+ [ iasi, [], otelul, Time.eet('2012-07-22 19:00') ],
72
+ [ gloria_bistrita, [], astra, Time.eet('2012-07-22 19:00') ],
73
+ [ rapid, [], vaslui, Time.eet('2012-07-22 21:30') ],
74
+ [ viitorul_constanta, [], fcbrasov, Time.eet('2012-07-23 19:00') ],
75
+ [ steaua, [], chiajna, Time.eet('2012-07-23 21:30') ]
76
+ ]
77
+
78
+ games_l102 = [
79
+ [ chiajna, [], viitorul_constanta, Time.eet('2012-07-28 18:30') ],
80
+ [ fcbrasov, [], gazmetan_severin, Time.eet('2012-07-28 20:20') ],
81
+ [ dinamo, [], iasi, Time.eet('2012-07-29 19:00') ],
82
+ [ otelul, [], rapid, Time.eet('2012-07-29 21:30') ],
83
+ [ ceahlau, [], cfr, Time.eet('2012-07-30 19:00') ],
84
+ [ vaslui, [], petrolul, Time.eet('2012-07-30 19:00') ],
85
+ [ gazmetan_medias, [], pandurii, Time.eet('2012-07-30 21:30') ],
86
+ [ u_cluj, [], gloria_bistrita, Time.eet('2012-07-31 19:00') ],
87
+ [ astra, [], steaua, Time.eet('2012-07-31 21:30') ]
88
+ ]
89
+
90
+ games_l103 = [
91
+ [ steaua, [], u_cluj, Time.eet('2012-08-03 18:30') ],
92
+ [ viitorul_constanta, [], astra, Time.eet('2012-08-03 20:20') ],
93
+ [ gazmetan_severin, [], chiajna, Time.eet('2012-08-04 19:00') ],
94
+ [ petrolul, [], otelul, Time.eet('2012-08-04 21:30') ],
95
+ [ rapid, [], iasi, Time.eet('2012-08-05 19:00') ],
96
+ [ cfr, [], vaslui, Time.eet('2012-08-05 19:00') ],
97
+ [ pandurii, [], vaslui, Time.eet('2012-08-05 21:30') ],
98
+ [ gloria_bistrita, [], gazmetan_medias, Time.eet('2012-08-06 19:00') ],
99
+ [ fcbrasov, [], dinamo, Time.eet('2012-08-06 21:30') ]
100
+ ]
101
+
102
+ games_l104 = [
103
+ [ iasi, [], petrolul, Time.eet('2012-08-11 18:30') ],
104
+ [ chiajna, [], fcbrasov, Time.eet('2012-08-11 20:20') ],
105
+ [ dinamo, [], rapid, Time.eet('2012-08-12 19:00') ],
106
+ [ otelul, [], cfr, Time.eet('2012-08-12 21:30') ],
107
+ [ ceahlau, [], gloria_bistrita, Time.eet('2012-08-13 19:00') ],
108
+ [ vaslui, [], pandurii, Time.eet('2012-08-13 19:00') ],
109
+ [ gazmetan_medias, [], steaua, Time.eet('2012-08-13 21:30') ],
110
+ [ u_cluj, [], viitorul_constanta, Time.eet('2012-08-14 19:00') ],
111
+ [ astra, [], gazmetan_severin, Time.eet('2012-08-14 21:30') ]
112
+ ]
113
+
114
+ games_l105 = [
115
+ [ steaua, [], ceahlau, Time.eet('2012-08-18 18:30') ],
116
+ [ viitorul_constanta, [], gazmetan_medias, Time.eet('2012-08-18 20:20') ],
117
+ [ gazmetan_severin, [], u_cluj, Time.eet('2012-08-19 19:00') ],
118
+ [ petrolul, [], rapid, Time.eet('2012-08-19 21:30') ],
119
+ [ cfr, [], iasi, Time.eet('2012-08-20 19:00') ],
120
+ [ pandurii, [], otelul, Time.eet('2012-08-20 19:00') ],
121
+ [ gloria_bistrita, [], vaslui, Time.eet('2012-08-20 21:30') ],
122
+ [ chiajna, [], dinamo, Time.eet('2012-08-21 19:00') ],
123
+ [ fcbrasov, [], astra, Time.eet('2012-08-21 21:30') ]
124
+ ]
125
+
126
+
127
+ Game.create_from_ary!( games_l101, l101 )
128
+ Game.create_from_ary!( games_l102, l102 )
129
+ Game.create_from_ary!( games_l103, l103 )
130
+ Game.create_from_ary!( games_l104, l104 )
131
+ Game.create_from_ary!( games_l105, l105 )
132
+
133
+
134
+ Prop.create!( key: 'db.ro.l1.2012/13.version', value: '1' )
data/db/ro/teams.rb ADDED
@@ -0,0 +1,31 @@
1
+ # encoding: utf-8
2
+
3
+
4
+ l1 = [
5
+ [ 'astra', 'Astra Ploiesti', 'AFC' ],
6
+ [ 'ceahlau', 'Ceahlaul Piatra Neamt', 'FCC' ],
7
+ [ 'cfr', 'CFR Cluj', 'CFR' ],
8
+ [ 'chiajna', 'Concordia Chiajna', 'CCH' ],
9
+ [ 'iasi', 'CSMS Iasi', 'CSI' ],
10
+ [ 'dinamo', 'Dinamo Bucuresti', 'FCD' ],
11
+ [ 'fcbrasov', 'FC Brasov', 'FCB' ],
12
+ [ 'gazmetan_severin', 'FC Severin', 'FCS' ],
13
+ [ 'vaslui', 'FC Vaslui', 'FCV' ],
14
+ [ 'gazmetan_medias', 'Gaz Metan Medias', 'GMM' ],
15
+ [ 'gloria_bistrita', 'Gloria Bistrita', 'GBS' ],
16
+ [ 'otelul', 'Otelul Galati', 'OTG' ],
17
+ [ 'pandurii', 'Pandurii Tg Jiu', 'PTJ' ],
18
+ [ 'petrolul', 'Petrolul Ploiesti', 'PPL' ],
19
+ ## fix: at/rapid!!!! already taken
20
+ [ 'rapid', 'Rapid Bucuresti', 'RBU' ],
21
+ [ 'steaua', 'Steaua Bucuresti', 'SBU' ],
22
+ [ 'u_cluj', 'U Cluj', 'UCJ' ],
23
+ [ 'viitorul_constanta', 'Viitorul Constanta', 'VCT' ]
24
+ ]
25
+
26
+ ro = Country.find_by_key!( 'ro' )
27
+
28
+ Team.create_from_ary!( l1, club: true, country: ro )
29
+
30
+
31
+ Prop.create!( key: 'db.ro.teams.version', value: '1' )
@@ -2,101 +2,26 @@
2
2
 
3
3
  # note: timezone for games (play_at) is *always* CET (central european time)
4
4
 
5
- #################################
5
+ ##################################
6
6
  ## WM 2014 - Qualification Europe
7
7
 
8
8
 
9
- world = Event.create!( :key => 'wmql',
10
- :title => 'World Cup Quali. Europe 2012/13',
11
- :start_at => Time.cet( '2012-09-07 00:00' ))
9
+ world = Event.create!( key: 'wmq',
10
+ title: 'World Cup Quali. Europe 2012/13',
11
+ start_at: Time.cet( '2012-09-07 00:00' ))
12
12
 
13
- worldc = Group.create!( :event => world, :pos => 1, :title => 'Gruppe C' )
14
13
 
14
+ world1 = Round.create!( event: world, pos: 1, title: 'Quali 1. Spieltag', start_at: Time.cet( '2012-09-07' ), title2: 'Fr. 7. Sep 2012' )
15
+ world2 = Round.create!( event: world, pos: 2, title: 'Quali 2. Spieltag', start_at: Time.cet( '2012-09-11' ), title2: 'Di. 11. Sep 2012' )
16
+ world3 = Round.create!( event: world, pos: 3, title: 'Quali 3. Spieltag', start_at: Time.cet( '2012-10-12' ), title2: 'Fr. 12. Okt 2012' )
17
+ world4 = Round.create!( event: world, pos: 4, title: 'Quali 4. Spieltag', start_at: Time.cet( '2012-10-16' ), title2: 'Di. 16. Okt 2012' )
18
+ world5 = Round.create!( event: world, pos: 5, title: 'Quali 5. Spieltag', start_at: Time.cet( '2013-03-22' ), title2: 'Fr. 22. Mär 2013' )
19
+ world6 = Round.create!( event: world, pos: 6, title: 'Quali 6. Spieltag', start_at: Time.cet( '2013-03-26' ), title2: 'Di. 26. Mär 2013' )
20
+ world7 = Round.create!( event: world, pos: 7, title: 'Quali 7. Spieltag', start_at: Time.cet( '2013-06-07' ), title2: 'Fr. 7. Jun 2013' )
21
+ world8 = Round.create!( event: world, pos: 8, title: 'Quali 8. Spieltag', start_at: Time.cet( '2013-06-11' ), title2: 'Di. 11. Jun 2013' )
22
+ world9 = Round.create!( event: world, pos: 9, title: 'Quali 9. Spieltag', start_at: Time.cet( '2013-09-06' ), title2: 'Fr. 6. Sep 2013' )
23
+ world10 = Round.create!( event: world, pos: 10, title: 'Quali 10. Spieltag', start_at: Time.cet( '2013-09-10' ), title2: 'Di. 10. Sep 2013' )
24
+ world11 = Round.create!( event: world, pos: 11, title: 'Quali 11. Spieltag', start_at: Time.cet( '2013-10-11' ), title2: 'Fr. 11. Okt 2013' )
25
+ world12 = Round.create!( event: world, pos: 12, title: 'Quali 12. Spieltag', start_at: Time.cet( '2013-10-15' ), title2: 'Di. 15. Okt 2013' )
15
26
 
16
- #################################3
17
- # Gruppe C
18
-
19
- # note: for teams see seeds/euro/teams.rb
20
-
21
- ger = Team.find_by_key!( 'ger' )
22
- fro = Team.find_by_key!( 'fro' )
23
- irl = Team.find_by_key!( 'irl' )
24
- kaz = Team.find_by_key!( 'kaz' )
25
- aut = Team.find_by_key!( 'aut' )
26
- swe = Team.find_by_key!( 'swe' )
27
-
28
- worldc.teams << ger
29
- worldc.teams << fro
30
- worldc.teams << irl
31
- worldc.teams << kaz
32
- worldc.teams << aut
33
- worldc.teams << swe
34
-
35
-
36
- world.teams << ger
37
- world.teams << fro
38
- world.teams << irl
39
- world.teams << kaz
40
- world.teams << aut
41
- world.teams << swe
42
-
43
-
44
- world1 = Round.create!( :event => world, :pos => 1, :title => 'Quali - 7.+11. Sep 2012' )
45
- world2 = Round.create!( :event => world, :pos => 2, :title => 'Quali - 12.+16. Okt 2012' )
46
- world3 = Round.create!( :event => world, :pos => 3, :title => 'Quali - 22.+26. Mär 2013' )
47
- world4 = Round.create!( :event => world, :pos => 4, :title => 'Quali - 7.+11. Jun 2013' )
48
- world5 = Round.create!( :event => world, :pos => 5, :title => 'Quali - 6.+10. Sep 2013' )
49
- world6 = Round.create!( :event => world, :pos => 6, :title => 'Quali - 11.+15. Okt 2013' )
50
-
51
- games_world1 = [
52
- [ 1, ger, [3,0], fro, Time.cet( '2012-09-07 00:00' ) ],
53
- [ 2, kaz, [1,2], irl, Time.cet( '2012-09-07 00:00' ) ],
54
- [ 3, aut, [1,2], ger, Time.cet( '2012-09-11 00:00' ) ],
55
- [ 4, swe, [2,0], kaz, Time.cet( '2012-09-11 00:00' ) ]]
56
-
57
- games_world2 = [
58
- [ 5, irl, [], ger, Time.cet( '2012-10-12 00:00' ) ],
59
- [ 6, fro, [], swe, Time.cet( '2012-10-12 00:00' ) ],
60
- [ 7, kaz, [], aut, Time.cet( '2012-10-12 00:00' ) ],
61
- [ 8, ger, [], swe, Time.cet( '2012-10-16 00:00' ) ],
62
- [ 9, fro, [], irl, Time.cet( '2012-10-16 00:00' ) ],
63
- [ 10, aut, [], kaz, Time.cet( '2012-10-16 00:00' ) ]]
64
-
65
- games_world3 = [
66
- [ 11, kaz, [], ger, Time.cet( '2013-03-22 00:00' ) ],
67
- [ 12, aut, [], fro, Time.cet( '2013-03-22 00:00' ) ],
68
- [ 13, swe, [], irl, Time.cet( '2013-03-22 00:00' ) ],
69
- [ 14, ger, [], kaz, Time.cet( '2013-03-26 00:00' ) ],
70
- [ 15, irl, [], aut, Time.cet( '2013-03-26 00:00' ) ]]
71
-
72
- games_world4 = [
73
- [ 16, irl, [], fro, Time.cet( '2013-06-07 00:00' ) ],
74
- [ 17, aut, [], swe, Time.cet( '2013-06-07 00:00' ) ],
75
- [ 18, swe, [], fro, Time.cet( '2013-06-11 00:00' ) ]]
76
-
77
- games_world5 = [
78
- [ 19, ger, [], aut, Time.cet( '2013-09-06 00:00' ) ],
79
- [ 20, kaz, [], fro, Time.cet( '2013-09-06 00:00' ) ],
80
- [ 21, irl, [], swe, Time.cet( '2013-09-06 00:00' ) ],
81
- [ 22, fro, [], ger, Time.cet( '2013-09-10 00:00' ) ],
82
- [ 23, aut, [], irl, Time.cet( '2013-09-10 00:00' ) ],
83
- [ 24, kaz, [], swe, Time.cet( '2013-09-10 00:00' ) ]]
84
-
85
- games_world6 = [
86
- [ 25, ger, [], irl, Time.cet( '2013-10-11 00:00' ) ],
87
- [ 26, fro, [], kaz, Time.cet( '2013-10-11 00:00' ) ],
88
- [ 27, swe, [], aut, Time.cet( '2013-10-11 00:00' ) ],
89
- [ 28, swe, [], ger, Time.cet( '2013-10-15 00:00' ) ],
90
- [ 29, fro, [], aut, Time.cet( '2013-10-15 00:00' ) ],
91
- [ 30, irl, [], kaz, Time.cet( '2013-10-15 00:00' ) ]]
92
-
93
-
94
- Game.create_from_ary!( games_world1, world1 )
95
- Game.create_from_ary!( games_world2, world2 )
96
- Game.create_from_ary!( games_world3, world3 )
97
- Game.create_from_ary!( games_world4, world4 )
98
- Game.create_from_ary!( games_world5, world5 )
99
- Game.create_from_ary!( games_world6, world6 )
100
-
101
-
102
- Prop.create!( :key => 'db.world.quali.2012/13.version', :value => '1' )
27
+ Prop.create!( key: 'db.world.quali.2012/13.version', value: '1' )