sportdb 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -56,6 +56,7 @@ db/world/teams.rb
56
56
  lib/sportdb.rb
57
57
  lib/sportdb/cli/opts.rb
58
58
  lib/sportdb/cli/runner.rb
59
+ lib/sportdb/keys.rb
59
60
  lib/sportdb/loader.rb
60
61
  lib/sportdb/models/badge.rb
61
62
  lib/sportdb/models/city.rb
data/db/america/2011.rb CHANGED
@@ -9,11 +9,9 @@
9
9
  # more info -> http://en.wikipedia.org/wiki/2011_Copa_América
10
10
  # -> http://de.wikipedia.org/wiki/Copa_América_2011
11
11
 
12
- copa = Event.create!( key: 'america.2011',
13
- title: 'Copa América 2011',
14
- start_at: Time.cet( '2011-07-01 12:00' ),
15
- league: League.find_by_key!('america'),
16
- season: Season.find_by_key!('2011'))
12
+ copa = Event.create!( league: League.find_by_key!('america'),
13
+ season: Season.find_by_key!('2011'),
14
+ start_at: Time.cet( '2011-07-01 12:00' ) )
17
15
 
18
16
 
19
17
  ##############
@@ -47,4 +45,5 @@ copab.add_teams_from_ary!( ['bra', 'par', 'ven', 'ecu' ] )
47
45
  copac.add_teams_from_ary!( ['uru', 'chi', 'per', 'mex' ] )
48
46
 
49
47
 
50
- Prop.create!( key: 'db.america.2011.version', value: '1' )
48
+ ## The End
49
+ #################
data/db/america/teams.rb CHANGED
@@ -52,4 +52,6 @@ teams = teams_america1 + teams_america2
52
52
 
53
53
  Team.create_from_ary!( teams, national: true )
54
54
 
55
- Prop.create!( key: 'db.america.teams.version', value: '1' )
55
+
56
+ ## The End
57
+ #################
data/db/at/2011_12/bl.rb CHANGED
@@ -8,11 +8,9 @@
8
8
  ##
9
9
  ## more info => http://bundesliga.at
10
10
 
11
- bl = Event.create!( key: 'at.2011/12',
12
- title: 'Österr. Bundesliga 2011/12',
13
- start_at: Time.cet('2012-04-07 00:00'),
14
- league: League.find_by_key!('at'),
15
- season: Season.find_by_key!('2011/12'))
11
+ bl = Event.create!( league: League.find_by_key!('at'),
12
+ season: Season.find_by_key!('2011/12'),
13
+ start_at: Time.cet('2012-04-07 00:00'))
16
14
 
17
15
  team_keys_bl = [
18
16
  'salzburg',
@@ -28,5 +26,5 @@ team_keys_bl = [
28
26
 
29
27
  bl.add_teams_from_ary!( team_keys_bl )
30
28
 
31
-
32
- Prop.create!( key: 'db.at.2011/12.version', value: '1' )
29
+ ## The End
30
+ #################
data/db/at/2011_12/cup.rb CHANGED
@@ -6,11 +6,9 @@
6
6
  ##################################
7
7
  ### ÖFB Cup 2011/12
8
8
 
9
- ofb = Event.create!( key: 'at.cup.2011/12',
10
- title: 'ÖFB Cup 2011/12',
11
- start_at: Time.cet( '2011-10-10 17:00' ),
12
- league: League.find_by_key!('at.cup'),
9
+ ofb = Event.create!( league: League.find_by_key!('at.cup'),
13
10
  season: Season.find_by_key!('2011/12'),
11
+ start_at: Time.cet( '2011-10-10 17:00' ),
14
12
  team3: false ) # no game for 3rd/4th place
15
13
 
16
14
 
@@ -64,5 +62,5 @@ Game.create_knockouts_from_ary!( games_ofb8, ofb8 )
64
62
  Game.create_knockouts_from_ary!( games_ofb4, ofb4 )
65
63
  Game.create_knockouts_from_ary!( games_ofb1, ofb1 )
66
64
 
67
-
68
- Prop.create!( key: 'db.at.cup.2011/12.version', value: '1' )
65
+ ## The End
66
+ #################
data/db/at/2012_13/bl.rb CHANGED
@@ -8,11 +8,9 @@
8
8
  ## more info => http://bundesliga.at
9
9
 
10
10
 
11
- bl = Event.create!( key: 'at.2012/13',
12
- title: 'Österr. Bundesliga 2012/13',
13
- start_at: Time.cet('2012-07-21 00:00'),
14
- league: League.find_by_key!('at'),
15
- season: Season.find_by_key!('2012/13'))
11
+ bl = Event.create!( league: League.find_by_key!('at'),
12
+ season: Season.find_by_key!('2012/13'),
13
+ start_at: Time.cet('2012-07-21 00:00'))
16
14
 
17
15
  ## 10 Bundeliga Teams
18
16
 
@@ -30,4 +28,6 @@ team_keys_bl = [
30
28
 
31
29
  bl.add_teams_from_ary!( team_keys_bl )
32
30
 
33
- Prop.create!( key: 'db.at.2012/13.version', value: '1' )
31
+
32
+ ## The End
33
+ #################
data/db/at/2012_13/cup.rb CHANGED
@@ -3,11 +3,9 @@
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' ),
9
- league: League.find_by_key!('at.cup'),
6
+ cup = Event.create!( league: League.find_by_key!('at.cup'),
10
7
  season: Season.find_by_key!('2012/13'),
8
+ start_at: Time.cet( '2012-07-13 00:00' ),
11
9
  team3: false ) # no game for 3rd/4th place)
12
10
 
13
11
 
@@ -109,5 +107,5 @@ cup.add_teams_from_ary!(
109
107
  team_keys_rlo +
110
108
  team_keys_misc )
111
109
 
112
-
113
- Prop.create!( key: 'db.at.cup.2012/13.version', value: '1' )
110
+ ## The End
111
+ #################
data/db/at/badges.rb CHANGED
@@ -18,5 +18,5 @@ Badge.create!( team: wac,
18
18
  league: League.find_by_key!('at'),
19
19
  season: Season.find_by_key!('2011/12') )
20
20
 
21
-
22
- Prop.create!( key: 'db.at.badges.version', value: '1' )
21
+ ## The End
22
+ #################
data/db/at/teams.rb CHANGED
@@ -89,4 +89,5 @@ at = Country.find_by_key!( 'at' )
89
89
 
90
90
  Team.create_from_ary!( bl+ersteliga+rlwest+rlmitte+rlost+misc, club: true, country: at )
91
91
 
92
- Prop.create!( key: 'db.at.teams.version', value: '1' )
92
+ ## The End
93
+ #################
data/db/cl/2011_12/cl.rb CHANGED
@@ -5,11 +5,9 @@
5
5
  #################################
6
6
  ## Champions League 2011/12
7
7
 
8
- cl = Event.create!( key: 'cl.2011/12',
9
- title: 'Champions League 2011/12',
10
- start_at: Time.cet( '2011-10-10 17:00' ),
11
- league: League.find_by_key!('cl'),
8
+ cl = Event.create!( league: League.find_by_key!('cl'),
12
9
  season: Season.find_by_key!('2011/12'),
10
+ start_at: Time.cet( '2011-10-10 17:00' ),
13
11
  team3: false )
14
12
 
15
13
 
@@ -86,5 +84,5 @@ Game.create_knockout_pairs_from_ary!( games_cl8, cl8, cl8_2 )
86
84
  Game.create_knockout_pairs_from_ary!( games_cl4, cl4, cl4_2 )
87
85
  Game.create_knockouts_from_ary!( games_cl1, cl1 )
88
86
 
89
-
90
- Prop.create!( key: 'db.cl.2011/12.version', value: '1' )
87
+ ## The End
88
+ #################
data/db/cl/2011_12/el.rb CHANGED
@@ -5,11 +5,9 @@
5
5
  #################################
6
6
  ## Europa League 2012
7
7
 
8
- el = Event.create!( key: 'el.2011/12',
9
- title: 'Europa League 2011/12',
10
- start_at: Time.cet( '2011-10-10 17:00' ),
11
- league: League.find_by_key!('el'),
8
+ el = Event.create!( league: League.find_by_key!('el'),
12
9
  season: Season.find_by_key!('2011/12'),
10
+ start_at: Time.cet( '2011-10-10 17:00' ),
13
11
  team3: false )
14
12
 
15
13
  az = Team.find_by_key!( 'az' )
@@ -63,5 +61,5 @@ Game.create_knockout_pairs_from_ary!( games_el8, el8, el8_2 )
63
61
  Game.create_knockout_pairs_from_ary!( games_el4, el4, el4_2 )
64
62
  Game.create_knockouts_from_ary!( games_el1, el1 )
65
63
 
66
-
67
- Prop.create!( key: 'db.el.2011/12.version', value: '1' )
64
+ ## The End
65
+ #################
data/db/cl/2012_13/cl.rb CHANGED
@@ -5,11 +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' ),
11
- league: League.find_by_key!('cl'),
8
+ cl = Event.create!( league: League.find_by_key!('cl'),
12
9
  season: Season.find_by_key!('2012/13'),
10
+ start_at: Time.cet( '2012-09-18 18:30' ),
13
11
  team3: false )
14
12
 
15
13
  porto = Team.find_by_key!( 'porto' )
@@ -322,4 +320,5 @@ Game.create_pairs_from_ary_for_group!( games_clg, clg )
322
320
  Game.create_pairs_from_ary_for_group!( games_clh, clh )
323
321
 
324
322
 
325
- Prop.create!( key: 'db.cl.2012/13.version', value: '1' )
323
+ ## The End
324
+ #################
data/db/cl/badges.rb CHANGED
@@ -64,5 +64,5 @@ Badge.create!( team: zenit,
64
64
 
65
65
 
66
66
 
67
- Prop.create!( key: 'db.cl.badges.version', value: '1' )
68
- Prop.create!( key: 'db.el.badges.version', value: '1' )
67
+ ## The End
68
+ #################
data/db/cl/teams.rb CHANGED
@@ -70,5 +70,5 @@ teams = [
70
70
 
71
71
  Team.create_from_ary!( teams, club: true )
72
72
 
73
-
74
- Prop.create!( key: 'db.cl.teams.version', value: '1' )
73
+ ## The End
74
+ #################
@@ -7,11 +7,9 @@
7
7
  ## fix: time zone and times??
8
8
 
9
9
 
10
- sud = Event.create!( key: 'copa.sud.2012/13',
11
- title: 'Copa Sudamericana',
12
- start_at: Time.cet( '2012-08-03 12:00' ),
13
- league: League.find_by_key!('copa.sud'),
14
- season: Season.find_by_key!('2012/13'))
10
+ sud = Event.create!( league: League.find_by_key!('copa.sud'),
11
+ season: Season.find_by_key!('2012/13'),
12
+ start_at: Time.cet( '2012-08-03 12:00' ))
15
13
 
16
14
 
17
15
  team_keys_sud = [
@@ -36,4 +34,5 @@ team_keys_sud = [
36
34
 
37
35
  sud.add_teams_from_ary!( team_keys_sud )
38
36
 
39
- Prop.create!( key: 'db.copa.sud.2012/13.version', value: '1' )
37
+ ## The End
38
+ #################
data/db/copa/teams.rb CHANGED
@@ -47,4 +47,5 @@ teams = [
47
47
 
48
48
  Team.create_from_ary!( teams, club: true )
49
49
 
50
- Prop.create!( key: 'db.copa.teams.version', value: '1' )
50
+ ## The End
51
+ #################
data/db/de/2012_13/bl.rb CHANGED
@@ -8,11 +8,9 @@
8
8
  ## more info => http://bundesliga.de
9
9
 
10
10
 
11
- bl = Event.create!( key: 'de.2012/13',
12
- title: 'Deutsche Bundesliga 2012/13',
13
- start_at: Time.cet('2012-07-21 00:00'),
14
- league: League.find_by_key!('de'),
15
- season: Season.find_by_key!('2012/13') )
11
+ bl = Event.create!( league: League.find_by_key!('de'),
12
+ season: Season.find_by_key!('2012/13'),
13
+ start_at: Time.cet('2012-07-21 00:00'))
16
14
 
17
15
  team_keys_bl = [
18
16
  'bayern',
@@ -36,5 +34,5 @@ team_keys_bl = [
36
34
 
37
35
  bl.add_teams_from_ary!( team_keys_bl )
38
36
 
39
-
40
- Prop.create!( key: 'db.de.2012/13.version', value: '1' )
37
+ ## The End
38
+ #################
data/db/de/teams.rb CHANGED
@@ -32,5 +32,5 @@ de = Country.find_by_key!( 'de' )
32
32
 
33
33
  Team.create_from_ary!( teams, club: true, country: de )
34
34
 
35
-
36
- Prop.create!( key: 'db.de.teams.version', value: '1' )
35
+ ## The End
36
+ #################
data/db/en/2012_13/pl.rb CHANGED
@@ -7,11 +7,9 @@
7
7
 
8
8
 
9
9
 
10
- pl = Event.create!( key: 'en.2012/13',
11
- title: 'Premier League 2012/13',
12
- start_at: Time.utc('2012-08-18 12:00'),
13
- league: League.find_by_key!('en'),
14
- season: Season.find_by_key!('2012/13'))
10
+ pl = Event.create!( league: League.find_by_key!('en'),
11
+ season: Season.find_by_key!('2012/13'),
12
+ start_at: Time.utc('2012-08-18 12:00'))
15
13
 
16
14
  team_keys_pl = [
17
15
  'chelsea',
@@ -37,5 +35,5 @@ team_keys_pl = [
37
35
 
38
36
  pl.add_teams_from_ary!( team_keys_pl )
39
37
 
40
-
41
- Prop.create!( key: 'db.en.2012/13.version', value: '1' )
38
+ ## The End
39
+ #################
data/db/en/teams.rb CHANGED
@@ -36,5 +36,5 @@ en = Country.find_by_key!( 'en' )
36
36
 
37
37
  Team.create_from_ary!( teams, club: true, country: en )
38
38
 
39
-
40
- Prop.create!( key: 'db.en.teams.version', value: '1' )
39
+ ## The End
40
+ #################
data/db/es/teams.rb CHANGED
@@ -14,4 +14,5 @@ es = Country.find_by_key!( 'es' )
14
14
 
15
15
  Team.create_from_ary!( teams, club: true, country: es )
16
16
 
17
- Prop.create!( key: 'db.es.teams.version', value: '1' )
17
+ ## The End
18
+ #################
data/db/euro/2008.rb CHANGED
@@ -13,11 +13,10 @@
13
13
  ## 31 games
14
14
  ## 22 days
15
15
 
16
- euro = Event.create!( key: 'euro.2008',
17
- title: 'Euro 2008',
16
+ euro = Event.create!( league: League.find_by_key!('euro'),
17
+ season: Season.find_by_key!('2008'),
18
18
  start_at: Time.cet( '2008-06-07 18:00' ),
19
- league: League.find_by_key!('euro'),
20
- season: Season.find_by_key!('2008'))
19
+ team3: false )
21
20
 
22
21
 
23
22
  euro.add_teams_from_ary!([
@@ -52,9 +51,5 @@ euroc.add_teams_from_ary!(['ned', 'ita', 'rou', 'fra'])
52
51
 
53
52
  eurod.add_teams_from_ary!(['gre', 'swe', 'esp', 'rus'])
54
53
 
55
-
56
- Prop.create!( key: 'db.euro.2008.version', value: '1' )
57
-
58
-
59
-
60
-
54
+ ## The End
55
+ #################
data/db/euro/2012.rb CHANGED
@@ -9,11 +9,10 @@
9
9
  # or http://de.wikipedia.org/wiki/Fu%C3%9Fball-Europameisterschaft_2012
10
10
 
11
11
 
12
- euro = Event.create!( key: 'euro.2012',
13
- title: 'Euro 2012',
12
+ euro = Event.create!( league: League.find_by_key!('euro'),
13
+ season: Season.find_by_key!('2012'),
14
14
  start_at: Time.cet( '2012-06-07 17:00' ),
15
- league: League.find_by_key!('euro'),
16
- season: Season.find_by_key!('2012'))
15
+ team3: false )
17
16
 
18
17
  pol = Team.find_by_key!( 'pol' )
19
18
  gre = Team.find_by_key!( 'gre' )
@@ -163,5 +162,5 @@ Game.create_knockouts_from_ary!( games_euro8, euro8 )
163
162
  Game.create_knockouts_from_ary!( games_euro4, euro4 )
164
163
  Game.create_knockouts_from_ary!( games_euro1, euro1 )
165
164
 
166
-
167
- Prop.create!( key: 'db.euro.2012.version', value: '1' )
165
+ ## The End
166
+ #################
data/db/euro/teams.rb CHANGED
@@ -74,4 +74,5 @@ teams = [
74
74
  Team.create_from_ary!( teams, national: true )
75
75
 
76
76
 
77
- Prop.create!( key: 'db.euro.teams.version', value: '1' )
77
+ ## The End
78
+ #################
data/db/leagues.rb CHANGED
@@ -29,6 +29,7 @@ leagues_club = [
29
29
  [ 'pt', 'SuperLiga', pt ],
30
30
  [ 'ru', 'Premier Liga', ru ],
31
31
  [ 'ro', 'Romania Liga 1', ro ],
32
+ ## todo: make apertura into season?? remove from league? why? why not?
32
33
  [ 'mx.apertura', 'México Primera División Apertura', mx ],
33
34
  [ 'br', 'Campeonato Brasileiro Série A', br ]
34
35
  ]
@@ -55,13 +56,13 @@ League.create_from_ary!( leagues_club_intl, club: true )
55
56
  leagues_intl = [
56
57
  [ 'euro', 'Euro' ],
57
58
  [ 'america', 'Copa América' ],
58
- [ 'wm', 'World Cup' ], ## change key to world??
59
- [ 'wmq.euro', 'World Cup Quali Europe' ],
60
- [ 'wmq.america', 'World Cup Quali North/Central America and Caribbean' ]
59
+ [ 'world', 'World Cup' ], ## change key to world??
60
+ [ 'world.quali.euro', 'World Cup Quali Europe' ],
61
+ [ 'world.quali.america', 'World Cup Quali North/Central America and Caribbean' ]
61
62
  ]
62
63
 
63
64
  League.create_from_ary!( leagues_intl, club: false )
64
65
 
65
66
 
66
-
67
- Prop.create!( key: 'db.leagues.version', value: '1' )
67
+ ## The End
68
+ #################
@@ -3,11 +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.apertura.2012',
7
- title: 'México Primera División Apertura 2012',
8
- start_at: Time.cst('2012-07-20 00:00'),
9
- league: League.find_by_key!( 'mx.apertura'),
10
- season: Season.find_by_key!( '2012'))
6
+ mx = Event.create!( league: League.find_by_key!( 'mx.apertura' ),
7
+ season: Season.find_by_key!( '2012'),
8
+ start_at: Time.cst('2012-07-20 00:00') )
11
9
 
12
10
  team_keys_mx = [
13
11
  'america',
@@ -32,4 +30,6 @@ team_keys_mx = [
32
30
 
33
31
  mx.add_teams_from_ary!( team_keys_mx )
34
32
 
35
- Prop.create!( key: 'db.mx.apertura.2012.version', value: '1' )
33
+
34
+ ## The End
35
+ #################
data/db/mx/teams.rb CHANGED
@@ -25,4 +25,5 @@ mx = Country.find_by_key!( 'mx' )
25
25
 
26
26
  Team.create_from_ary!( teams, club: true, country: mx )
27
27
 
28
- Prop.create!( key: 'db.mx.teams.version', value: '1' )
28
+ ## The End
29
+ #################
data/db/nfl/teams.rb CHANGED
@@ -54,4 +54,5 @@ us = Country.find_by_key!( 'us' )
54
54
 
55
55
  Team.create_from_ary!( teams, club: true, country: us )
56
56
 
57
- Prop.create!( key: 'db.nfl.teams.version', value: '1' )
57
+ ## The End
58
+ #################
data/db/nhl/teams.rb CHANGED
@@ -47,4 +47,5 @@ teams = [
47
47
 
48
48
  Team.create_from_ary!( teams, club: true )
49
49
 
50
- Prop.create!( key: 'db.nhl.teams.version', value: '1' )
50
+ ## The End
51
+ #################
data/db/ro/l1_2012_13.rb CHANGED
@@ -12,11 +12,9 @@
12
12
  ## todo: check key dinamo or rapid may be already taken!!
13
13
 
14
14
 
15
- l1 = Event.create!( key: 'ro.2012/13',
16
- title: 'Romania Liga 1 2012/13',
17
- start_at: Time.eet('2012-07-01 00:00'),
18
- league: League.find_by_key!('ro'),
19
- season: Season.find_by_key!('2012/13') )
15
+ l1 = Event.create!( league: League.find_by_key!('ro'),
16
+ season: Season.find_by_key!('2012/13'),
17
+ start_at: Time.eet('2012-07-01 00:00') )
20
18
 
21
19
  astra = Team.find_by_key!( 'astra' )
22
20
  ceahlau = Team.find_by_key!( 'ceahlau' )
@@ -135,4 +133,5 @@ Game.create_from_ary!( games_l104, l104 )
135
133
  Game.create_from_ary!( games_l105, l105 )
136
134
 
137
135
 
138
- Prop.create!( key: 'db.ro.2012/13.version', value: '1' )
136
+ ## The End
137
+ #################
data/db/ro/teams.rb CHANGED
@@ -28,4 +28,5 @@ ro = Country.find_by_key!( 'ro' )
28
28
  Team.create_from_ary!( l1, club: true, country: ro )
29
29
 
30
30
 
31
- Prop.create!( key: 'db.ro.teams.version', value: '1' )
31
+ ## The End
32
+ #################
data/db/seasons.rb CHANGED
@@ -18,4 +18,5 @@ Season.create!( key: '2009', title: '2009' )
18
18
  Season.create!( key: '2008', title: '2008' )
19
19
 
20
20
 
21
- Prop.create!( key: 'db.seasons.version', value: '1' )
21
+ ## The End
22
+ #################
data/db/world/2010.rb CHANGED
@@ -13,11 +13,9 @@
13
13
  ## 64 games
14
14
  ## 31 days (11 June - 11 July)
15
15
 
16
- wm = Event.create!( key: 'wm.2010',
17
- title: 'World Cup 2010',
18
- start_at: Time.cet( '2010-06-11 12:00' ),
19
- league: League.find_by_key!('wm'),
20
- season: Season.find_by_key!('2010'))
16
+ wm = Event.create!( league: League.find_by_key!('world'),
17
+ season: Season.find_by_key!('2010'),
18
+ start_at: Time.cet( '2010-06-11 12:00' ) )
21
19
 
22
20
  ##############
23
21
  # 13 aus Europa
@@ -186,4 +184,5 @@ wmg.add_teams_from_ary!( ['bra', 'prk', 'civ', 'por'] )
186
184
  wmh.add_teams_from_ary!( ['esp', 'sui', 'hon', 'chi'] )
187
185
 
188
186
 
189
- Prop.create!( key: 'db.world.2010.version', value: '1' )
187
+ ## The End
188
+ #################
@@ -8,11 +8,9 @@
8
8
  ## WM 2014 - Qualification North/Central America & Caribbean Islands
9
9
 
10
10
 
11
- world = Event.create!( key: 'wmq.america',
12
- title: 'World Cup Quali. North/Central America & Caribbean',
13
- start_at: Time.cet( '2012-09-06 12:00' ),
14
- league: League.find_by_key!('wmq.america'),
15
- season: Season.find_by_key!('2012/13'))
11
+ world = Event.create!( league: League.find_by_key!('world.quali.america'),
12
+ season: Season.find_by_key!('2012/13'),
13
+ start_at: Time.cet( '2012-09-06 12:00' ) )
16
14
 
17
15
  team_keys_world2 = [
18
16
  'mex',
@@ -29,5 +27,5 @@ world2 = Group.create!( event: world, pos: 2, title: 'Gruppe 2' )
29
27
  world2.add_teams_from_ary!( team_keys_world2 )
30
28
 
31
29
 
32
-
33
- Prop.create!( key: 'db.world.quali.america.2012/13.version', value: '1' )
30
+ ## The End
31
+ #################
@@ -6,10 +6,9 @@
6
6
  ## WM 2014 - Qualification Europe
7
7
 
8
8
 
9
- world = Event.create!( key: 'wmq.euro',
10
- title: 'World Cup Quali. Europe',
11
- start_at: Time.cet( '2012-09-07 00:00' ),
12
- league: League.find_by_key!('wmq.euro'),
13
- season: Season.find_by_key!('2012/13'))
9
+ world = Event.create!( league: League.find_by_key!('world.quali.euro'),
10
+ season: Season.find_by_key!('2012/13'),
11
+ start_at: Time.cet( '2012-09-07 00:00' ) )
14
12
 
15
- Prop.create!( key: 'db.world.quali.euro.2012/13.version', value: '1' )
13
+ ## The End
14
+ #################
@@ -5,7 +5,7 @@
5
5
  #
6
6
  # note: for teams see seeds/euro/teams.rb
7
7
 
8
- world = Event.find_by_key!( 'wmq.euro' )
8
+ world = Event.find_world_quali_euro_2012_13!
9
9
 
10
10
  team_keys_worldc = [
11
11
  'ger',
@@ -22,5 +22,5 @@ worldc = Group.create!( event: world, pos: 3, title: 'Gruppe C' )
22
22
 
23
23
  worldc.add_teams_from_ary!( team_keys_worldc )
24
24
 
25
-
26
- Prop.create!( key: 'db.world.quali.euro.2012/13.c.version', value: '1' )
25
+ ## The End
26
+ #################
@@ -5,7 +5,7 @@
5
5
 
6
6
  # note: for teams see seeds/euro/teams.rb
7
7
 
8
- world = Event.find_by_key!( 'wmq.euro' )
8
+ world = Event.find_world_quali_euro_2012_13!
9
9
 
10
10
  team_keys_worldi = [
11
11
  'fra',
@@ -22,5 +22,5 @@ worldi = Group.create!( event: world, pos: 9, title: 'Gruppe I' )
22
22
  worldi.add_teams_from_ary!( team_keys_worldi )
23
23
 
24
24
 
25
-
26
- Prop.create!( key: 'db.world.quali.euro.2012/13.i.version', value: '1' )
25
+ ## The End
26
+ #################
data/db/world/teams.rb CHANGED
@@ -48,5 +48,5 @@ teams = teams_africa + teams_asia + teams_oceania
48
48
 
49
49
  Team.create_from_ary!( teams, national: true )
50
50
 
51
-
52
- Prop.create!( key: 'db.world.teams.version', value: '1' )
51
+ ## The End
52
+ #################
data/lib/sportdb.rb CHANGED
@@ -20,6 +20,7 @@ require 'worlddb'
20
20
 
21
21
  # our own code
22
22
 
23
+ require 'sportdb/keys' # let keys go first; just string constants (get included in models)
23
24
  require 'sportdb/models/forward'
24
25
  require 'sportdb/models/badge'
25
26
  require 'sportdb/models/city'
@@ -44,6 +45,7 @@ require 'sportdb/version'
44
45
  require 'sportdb/cli/opts'
45
46
  require 'sportdb/cli/runner'
46
47
 
48
+
47
49
  module SportDB
48
50
 
49
51
  def self.banner
@@ -62,61 +64,102 @@ module SportDB
62
64
  CreateDB.up
63
65
  end
64
66
 
67
+ class Fixtures
68
+ ## todo: move into its own file???
69
+
70
+ ## make constants in Keys availabe (get include in Models) - do NOT pollute/include in SportDB
71
+ ## make models available in sportdb module by default with namespace
72
+ # e.g. lets you use Team instead of Models::Team
73
+ include SportDB::Models
74
+
75
+ def self.fixtures_rb_test
76
+ ['leagues',
77
+ 'seasons',
78
+ 'at/teams',
79
+ # 'at/2011_12/bl',
80
+ # 'at/2011_12/cup',
81
+ 'at/2012_13/bl',
82
+ # 'at/2012_13/cup',
83
+ 'copa/teams',
84
+ 'copa/sud_2012_13'
85
+ ]
86
+ end
87
+
88
+ def self.fixtures_txt_test
89
+ [
90
+ # [ AT_2011_12, 'at/2011_12/bl'],
91
+ [ AT_2012_13, 'at/2012_13/bl'],
92
+ # [ AT_CUP_2012_13, 'at/2012_13/cup'],
93
+ ['copa.sud.2012/13', 'copa/sud_2012_13']
94
+ ]
95
+ end
96
+
97
+
98
+ def self.fixtures_rb # all builtin ruby fixtures; helper for covenience
99
+ ['leagues',
100
+ 'seasons',
101
+ 'at/teams',
102
+ 'at/badges',
103
+ 'at/2011_12/bl',
104
+ 'at/2011_12/cup',
105
+ 'at/2012_13/bl',
106
+ 'at/2012_13/cup',
107
+ 'de/teams',
108
+ 'en/teams',
109
+ 'es/teams',
110
+ 'cl/teams',
111
+ 'cl/badges',
112
+ 'cl/2011_12/cl',
113
+ 'cl/2011_12/el',
114
+ 'cl/2012_13/cl',
115
+ 'de/2012_13/bl',
116
+ 'en/2012_13/pl',
117
+ 'euro/teams',
118
+ 'euro/2008',
119
+ 'euro/2012',
120
+ 'america/teams',
121
+ 'america/2011',
122
+ 'copa/teams',
123
+ 'copa/sud_2012_13',
124
+ 'mx/teams',
125
+ 'mx/apertura_2012',
126
+ 'world/teams',
127
+ 'world/2010',
128
+ 'world/quali_2012_13_europe',
129
+ 'world/quali_2012_13_europe_c',
130
+ 'world/quali_2012_13_europe_i',
131
+ 'world/quali_2012_13_america',
132
+ 'nhl/teams']
133
+ end
134
+
135
+ def self.fixtures_txt
136
+ [[ AT_2011_12, 'at/2011_12/bl'],
137
+ [ AT_2012_13, 'at/2012_13/bl'],
138
+ [ AT_CUP_2012_13, 'at/2012_13/cup'],
139
+ ['de.2012/13', 'de/2012_13/bl'],
140
+ ['en.2012/13', 'en/2012_13/pl'],
141
+ ['america.2011', 'america/2011'],
142
+ ['mx.apertura.2012', 'mx/apertura_2012'],
143
+ ['copa.sud.2012/13', 'copa/sud_2012_13'],
144
+ [ EURO_2008, 'euro/2008'],
145
+ [ WORLD_2010, 'world/2010'],
146
+ [ WORLD_QUALI_EURO_2012_13, 'world/quali_2012_13_europe_c'],
147
+ [ WORLD_QUALI_AMERICA_2012_13, 'world/quali_2012_13_america']]
148
+ end
149
+ end # class Fixtures
150
+
65
151
  def self.fixtures_rb # all builtin ruby fixtures; helper for covenience
66
- ['leagues',
67
- 'seasons',
68
- 'at/teams',
69
- 'at/badges',
70
- 'at/2011_12/bl',
71
- 'at/2011_12/cup',
72
- 'at/2012_13/bl',
73
- 'at/2012_13/cup',
74
- 'de/teams',
75
- 'en/teams',
76
- 'es/teams',
77
- 'cl/teams',
78
- 'cl/badges',
79
- 'cl/2011_12/cl',
80
- 'cl/2011_12/el',
81
- 'cl/2012_13/cl',
82
- 'de/2012_13/bl',
83
- 'en/2012_13/pl',
84
- 'euro/teams',
85
- 'euro/2008',
86
- 'euro/2012',
87
- 'america/teams',
88
- 'america/2011',
89
- 'copa/teams',
90
- 'copa/sud_2012_13',
91
- 'mx/teams',
92
- 'mx/apertura_2012',
93
- 'world/teams',
94
- 'world/2010',
95
- 'world/quali_2012_13_europe',
96
- 'world/quali_2012_13_europe_c',
97
- 'world/quali_2012_13_europe_i',
98
- 'world/quali_2012_13_america',
99
- 'nhl/teams']
152
+ Fixtures.fixtures_rb
153
+ end
154
+
155
+ def self.fixtures_txt
156
+ Fixtures.fixtures_txt
100
157
  end
101
158
 
102
159
  def self.load_all
103
160
  load( fixtures_rb )
104
161
  end
105
162
 
106
- def self.fixtures_txt
107
- [['at.2011/12', 'at/2011_12/bl'],
108
- ['at.2012/13', 'at/2012_13/bl'],
109
- ['at.cup.2012/13', 'at/2012_13/cup'],
110
- ['de.2012/13', 'de/2012_13/bl'],
111
- ['en.2012/13', 'en/2012_13/pl'],
112
- ['america.2011', 'america/2011'],
113
- ['mx.apertura.2012', 'mx/apertura_2012'],
114
- ['copa.sud.2012/13', 'copa/sud_2012_13'],
115
- ['euro.2008', 'euro/2008'],
116
- ['wm.2010', 'world/2010'],
117
- ['wmq.euro', 'world/quali_2012_13_europe_c'],
118
- ['wmq.america', 'world/quali_2012_13_america']]
119
- end
120
163
 
121
164
  def self.read_all
122
165
  read( fixtures_txt )
@@ -252,4 +295,10 @@ end # module SportDB
252
295
 
253
296
  ## SportDB::load_plugins
254
297
 
255
- SportDB.main if __FILE__ == $0
298
+
299
+ if __FILE__ == $0
300
+ SportDB.main
301
+ else
302
+ ## say hello
303
+ puts SportDB.banner
304
+ end
@@ -0,0 +1,29 @@
1
+
2
+ module SportDB
3
+ module Keys
4
+
5
+ module EventKeys
6
+ # use constants for known keys; lets us define aliases (if things change)
7
+
8
+ AT_2011_12 = 'at.2011/12'
9
+ AT_2012_13 = 'at.2012/13'
10
+ AT_CUP_2012_13 = 'at.cup.2012/13'
11
+
12
+ CL_2012_13 = 'cl.2012/13'
13
+
14
+ EURO_2008 = 'euro.2008'
15
+ EURO_2012 = 'euro.2012'
16
+
17
+ WORLD_2010 = 'world.2010'
18
+
19
+ WORLD_QUALI_EURO_2012_13 = 'world.quali.euro.2012/13'
20
+ WORLD_QUALI_AMERICA_2012_13 = 'world.quali.america.2012/13'
21
+
22
+ ############################
23
+ ## NB: see db/leagues.rb for keys in use
24
+ end
25
+
26
+ include SportDB::Keys::EventKeys
27
+
28
+ end # module Keys
29
+ end # module SportDB
@@ -42,6 +42,11 @@ class Loader
42
42
  code = File.read( path )
43
43
 
44
44
  load_fixtures_worker( code )
45
+
46
+ ### fix:
47
+ ## for loaded from fs use filestat? for version - why? why not?
48
+
49
+ Prop.create!( key: "db.#{fixture_name_to_prop_key(name)}.version", value: "rb.1" )
45
50
  end
46
51
 
47
52
  def load_fixtures_builtin( name ) # load from gem (built-in)
@@ -52,10 +57,32 @@ class Loader
52
57
  code = File.read( path )
53
58
 
54
59
  load_fixtures_worker( code )
60
+
61
+ ## for builtin fixtures use VERSION of gem
62
+
63
+ Prop.create!( key: "db.#{fixture_name_to_prop_key(name)}.version", value: "sport.rb.#{SportDB::VERSION}" )
55
64
  end
56
65
 
57
66
 
58
67
  private
68
+
69
+ ##
70
+ # fix/todo: share helper w/ other readers
71
+
72
+ # helper
73
+ # change at/2012_13/bl to at.2012/13.bl
74
+ # or quali_2012_13_europe_c to quali.2012/13.europe.c
75
+
76
+ def fixture_name_to_prop_key( name )
77
+ prop_key = name.gsub( '/', '.' )
78
+ prop_key = prop_key.gsub( /(\d{4})_(\d{2})/, '\1/\2' ) # 2012_13 => 2012/13
79
+ prop_key = prop_key.gsub( '_', '.' )
80
+ prop_key
81
+ end
82
+
83
+
84
+
85
+
59
86
  def load_fixtures_worker( code )
60
87
 
61
88
  self.class_eval( code )
@@ -66,13 +93,6 @@ private
66
93
  # include SportDB::Models
67
94
  # <code here>
68
95
  # end
69
-
70
-
71
- # require path
72
- # require "#{Dir.pwd}/db/#{seed}.rb"
73
-
74
- # Prop.create!( :key => "db.#{name}.version", :value => SportDB::VERSION )
75
-
76
96
  end
77
97
 
78
98
  end # class Loader
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module SportDB::Models
2
4
 
3
5
  class Event < ActiveRecord::Base
@@ -13,32 +15,134 @@ class Event < ActiveRecord::Base
13
15
  has_many :event_teams, :class_name => 'EventTeam'
14
16
  has_many :teams, :through => :event_teams
15
17
 
18
+ before_save :on_before_save
19
+
16
20
  def add_teams_from_ary!( team_keys )
17
21
  team_keys.each do |team_key|
18
22
  team = Team.find_by_key!( team_key )
19
23
  self.teams << team
20
24
  end
21
25
  end
26
+
27
+ def on_before_save
28
+ # event key is composite of league + season (e.g. at.2012/13) etc.
29
+ self.key = "#{league.key}.#{season.key}"
30
+ end
31
+
32
+ def title
33
+ league.title
34
+ end
35
+
36
+ def full_title # includes season (e.g. year)
37
+ "#{league.title} #{season.title}"
38
+ end
39
+
40
+ #####################
41
+ ## convenience helper for text parser/reader
42
+
43
+ ############
44
+ ### fix/todo: share helper for all text readers/parsers- where to put it?
45
+ ###
46
+
47
+ def title_esc_regex( title )
48
+ ## todo: how to mark value as regex?
49
+ ## for now escape regex special chars e.g. . to \.
50
+ title_for_regex = title.gsub( '.', '\.' ) # e.g. Benfica Lis.
51
+ title_for_regex = title_for_regex.gsub( '(', '\(' ) # e.g. Club Atlético Colón (Santa Fe)
52
+ title_for_regex = title_for_regex.gsub( ')', '\)' )
53
+
54
+ ## fix: todo: match accented char with or without accents
55
+ ## add (ü|ue) etc.
56
+ ## also make - optional change to (-| ) e.g. Blau-Weiss == Blau Weiss
57
+ ## reuse for all readers!
58
+ title_for_regex = title_for_regex.gsub( '-', '(-| )' )
59
+ title_for_regex = title_for_regex.gsub( 'ß', '(ß|ss)' )
60
+ title_for_regex = title_for_regex.gsub( 'æ', '(æ|ae)' )
61
+ title_for_regex = title_for_regex.gsub( 'á', '(á|a)' ) ## e.g. Bogotá
62
+ title_for_regex = title_for_regex.gsub( 'ã', '(ã|a)' ) ## e.g São Paulo
63
+ title_for_regex = title_for_regex.gsub( 'ä', '(ä|ae)' ) ## add a ?
64
+ title_for_regex = title_for_regex.gsub( 'ö', '(ö|oe)' ) ## add o ?
65
+ title_for_regex = title_for_regex.gsub( 'ó', '(ó|o)' ) ## e.g. Colón
66
+ title_for_regex = title_for_regex.gsub( 'ü', '(ü|ue)' ) ## add u ?
67
+ title_for_regex = title_for_regex.gsub( 'é', '(é|e)' ) ## e.g. Vélez
68
+ title_for_regex = title_for_regex.gsub( 'ê', '(ê|e)' ) ## e.g. Grêmio
69
+ title_for_regex = title_for_regex.gsub( 'ñ', '(ñ|n)' ) ## e.g. Porteño
70
+ title_for_regex = title_for_regex.gsub( 'ú', '(ú|u)' ) ## e.g. Fútbol
71
+
72
+ ## todo: add some more; use array for config?
73
+ ## see http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references for more
74
+
75
+ title_for_regex
76
+ end
77
+
78
+
79
+
80
+ def known_teams_table
81
+
82
+ ## build known teams table w/ synonyms e.g.
83
+ #
84
+ # [[ 'wolfsbrug', [ 'VfL Wolfsburg' ]],
85
+ # [ 'augsburg', [ 'FC Augsburg', 'Augi2', 'Augi3' ]],
86
+ # [ 'stuttgart', [ 'VfB Stuttgart' ]] ]
87
+
88
+ known_teams = []
89
+
90
+ teams.each_with_index do |team,index|
91
+
92
+ titles = []
93
+ titles << team.title
94
+ titles += team.synonyms.split('|') if team.synonyms.present?
95
+
96
+ ## NB: sort here by length (largest goes first - best match)
97
+ # exclude code and key (key should always go last)
98
+ titles = titles.sort { |left,right| right.length <=> left.length }
99
+
100
+ ## escape for regex plus allow subs for special chars/accents
101
+ titles = titles.map { |title| title_esc_regex( title ) }
102
+
103
+ titles << team.code if team.code.present?
104
+ titles << team.key
105
+
106
+ known_teams << [ team.key, titles ]
107
+
108
+ puts " Team[#{index+1}] #{team.key} >#{titles.join('|')}<"
109
+ end
110
+
111
+ known_teams
112
+ end # method known_teams_table
22
113
 
23
114
  ###########################
24
115
  ## convenience helpers
25
116
 
117
+ include SportDB::Keys::EventKeys
118
+
26
119
  def self.find_at_2012_13!
27
- self.find_by_key!( 'at.2012/13' )
120
+ self.find_by_key!( AT_2012_13 )
28
121
  end
29
122
 
30
123
  def self.find_at_cup_2012_13!
31
- self.find_by_key!( 'at.cup.2012/13' )
124
+ self.find_by_key!( AT_CUP_2012_13 )
32
125
  end
33
126
 
34
127
  def self.find_cl_2012_13!
35
- self.find_by_key!( 'cl.2012/13' )
128
+ self.find_by_key!( CL_2012_13 )
36
129
  end
37
130
 
38
131
  def self.find_euro_2012!
39
- self.find_by_key!( 'euro.2012')
132
+ self.find_by_key!( EURO_2012 )
133
+ end
134
+
135
+ def self.find_world_2010!
136
+ self.find_by_key!( WORLD_2010 )
40
137
  end
41
138
 
139
+ def self.find_world_quali_euro_2012_13!
140
+ self.find_by_key!( WORLD_QUALI_EURO_2012_13 )
141
+ end
142
+
143
+ def self.find_world_quali_america_2012_13!
144
+ self.find_by_key!( WORLD_QUALI_AMERICA_2012_13 )
145
+ end
42
146
 
43
147
 
44
148
  end # class Event
@@ -2,8 +2,6 @@
2
2
  ### forward references
3
3
  ## require first to resolve circular references
4
4
 
5
- module SportDB ; end
6
-
7
5
  module SportDB::Models
8
6
 
9
7
  ## todo: why? why not use include WorldDB::Models here???
@@ -18,6 +16,9 @@ module SportDB::Models
18
16
 
19
17
  class Team < ActiveRecord::Base ; end
20
18
  class League < ActiveRecord::Base ; end
19
+
20
+ #### make constanst such as AT_2012_13, WORLD_2010, etc. available
21
+ include SportDB::Keys
21
22
 
22
23
  end
23
24
 
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module SportDB
2
4
 
3
5
  class Reader
@@ -41,6 +43,11 @@ class Reader
41
43
  code = File.read( path )
42
44
 
43
45
  load_fixtures_worker( event_key, code )
46
+
47
+ ### fix:
48
+ ## for loaded from fs use filestat? for version - why? why not?
49
+
50
+ Prop.create!( key: "db.#{fixture_name_to_prop_key(name)}.version", value: "txt.1" )
44
51
  end
45
52
 
46
53
  def load_fixtures_builtin( event_key, name ) # load from gem (built-in)
@@ -51,10 +58,27 @@ class Reader
51
58
  code = File.read( path )
52
59
 
53
60
  load_fixtures_worker( event_key, code )
61
+
62
+ Prop.create!( key: "db.#{fixture_name_to_prop_key(name)}.version", value: "sport.txt.#{SportDB::VERSION}" )
54
63
  end
55
64
 
56
65
 
57
66
  private
67
+
68
+ ##
69
+ # fix/todo: share helper w/ other readers
70
+
71
+ # helper
72
+ # change at/2012_13/bl to at.2012/13.bl
73
+ # or quali_2012_13_europe_c to quali.2012/13.europe.c
74
+
75
+ def fixture_name_to_prop_key( name )
76
+ prop_key = name.gsub( '/', '.' )
77
+ prop_key = prop_key.gsub( /(\d{4})_(\d{2})/, '\1/\2' ) # 2012_13 => 2012/13
78
+ prop_key = prop_key.gsub( '_', '.' )
79
+ prop_key
80
+ end
81
+
58
82
  def load_fixtures_worker( event_key, data )
59
83
 
60
84
  ## assume active activerecord connection
@@ -63,37 +87,9 @@ private
63
87
  @event = Event.find_by_key!( event_key )
64
88
 
65
89
  puts "Event #{@event.key} >#{@event.title}<"
66
-
67
-
68
- ## build known teams table w/ synonyms e.g.
69
- #
70
- # nb: synonyms can be a regex not just a literal string
71
- # [[ 'wolfsbrug', [ 'VfL Wolfsburg' ]],
72
- # [ 'augsburg', [ 'FC Augsburg', 'Augi2', 'Augi3' ]],
73
- # [ 'stuttgart', [ 'VfB Stuttgart' ]] ]
74
90
 
75
- @known_teams = []
91
+ @known_teams = @event.known_teams_table
76
92
 
77
- ## todo/fix: move calc known_teams to model!!! (for reuse)
78
-
79
- @event.teams.each_with_index do |team,index|
80
-
81
- titles = []
82
- titles << team.title
83
- titles += team.synonyms.split('|') if team.synonyms.present?
84
-
85
- ## NB: sort here by length (largest goes first - best match)
86
- # exclude code and key (key should always go last)
87
- titles = titles.sort { |left,right| right.length <=> left.length }
88
-
89
- titles << team.code if team.code.present?
90
- titles << team.key
91
-
92
- @known_teams << [ team.key, titles ]
93
-
94
- puts " Team[#{index+1}] #{team.key} >#{titles.join('|')}<"
95
- end
96
-
97
93
  parse_fixtures( data )
98
94
 
99
95
  end # method load_fixtures
@@ -253,15 +249,19 @@ private
253
249
  def find_team2!( line )
254
250
  find_team_worker!( line, 2 )
255
251
  end
256
-
257
-
252
+
253
+
258
254
  def match_team_worker!( line, key, values )
259
255
  values.each do |value|
260
- regex = Regexp.new( "\\b#{value}\\b" ) # wrap with world boundry (e.g. match only whole words e.g. not wac in wacker)
256
+ ## nb: \b does NOT include space or newline for word boundry (only alphanums e.g. a-z0-9)
257
+ ## (thus add it, allows match for Benfica Lis. for example - note . at the end)
258
+
259
+ ## check add $ e.g. (\b| |\t|$) does this work? - check w/ Benfica Lis.$
260
+ regex = /\b#{value}(\b| |\t)/ # wrap with world boundry (e.g. match only whole words e.g. not wac in wacker)
261
261
  if line =~ regex
262
262
  puts " match for team >#{key}< >#{value}<"
263
263
  # make sure @@oo{key}oo@@ doesn't match itself with other key e.g. wacker, wac, etc.
264
- line.sub!( regex, "@@oo#{key}oo@@" )
264
+ line.sub!( regex, "@@oo#{key}oo@@ " ) # NB: add one space char at end
265
265
  return true # break out after first match (do NOT continue)
266
266
  end
267
267
  end
@@ -31,7 +31,6 @@ add_index :teams, :key, :unique => true
31
31
 
32
32
 
33
33
  create_table :events do |t|
34
- t.string :title, :null => false
35
34
  t.string :key, :null => false # import/export key
36
35
  t.references :league, :null => false
37
36
  t.references :season, :null => false
@@ -1,4 +1,4 @@
1
1
 
2
2
  module SportDB
3
- VERSION = '0.8.1'
3
+ VERSION = '0.9.0'
4
4
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sportdb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 8
9
- - 1
10
- version: 0.8.1
8
+ - 9
9
+ - 0
10
+ version: 0.9.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gerald Bauer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-11-17 00:00:00 Z
18
+ date: 2012-11-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activerecord
@@ -158,6 +158,7 @@ files:
158
158
  - lib/sportdb.rb
159
159
  - lib/sportdb/cli/opts.rb
160
160
  - lib/sportdb/cli/runner.rb
161
+ - lib/sportdb/keys.rb
161
162
  - lib/sportdb/loader.rb
162
163
  - lib/sportdb/models/badge.rb
163
164
  - lib/sportdb/models/city.rb