Permalink
Browse files

add key constants n auto add prop

  • Loading branch information...
1 parent cd2ae26 commit acecc3e9996378141d57eba43a1ac4da9247b1b4 @geraldb geraldb committed Nov 18, 2012
Showing with 363 additions and 278 deletions.
  1. +2 −1 db/america/2011.rb
  2. +3 −1 db/america/teams.rb
  3. +2 −2 db/at/2011_12/bl.rb
  4. +2 −2 db/at/2011_12/cup.rb
  5. +3 −1 db/at/2012_13/bl.rb
  6. +2 −2 db/at/2012_13/cup.rb
  7. +2 −2 db/at/badges.rb
  8. +2 −1 db/at/teams.rb
  9. +2 −2 db/cl/2011_12/cl.rb
  10. +2 −2 db/cl/2011_12/el.rb
  11. +2 −1 db/cl/2012_13/cl.rb
  12. +2 −2 db/cl/badges.rb
  13. +2 −2 db/cl/teams.rb
  14. +2 −1 db/copa/sud_2012_13.rb
  15. +2 −1 db/copa/teams.rb
  16. +2 −2 db/de/2012_13/bl.rb
  17. +2 −2 db/de/teams.rb
  18. +2 −2 db/en/2012_13/pl.rb
  19. +2 −2 db/en/teams.rb
  20. +2 −1 db/es/teams.rb
  21. +2 −6 db/euro/2008.rb
  22. +2 −2 db/euro/2012.rb
  23. +2 −1 db/euro/teams.rb
  24. +6 −5 db/leagues.rb
  25. +3 −1 db/mx/apertura_2012.rb
  26. +2 −1 db/mx/teams.rb
  27. +2 −1 db/nfl/teams.rb
  28. +2 −1 db/nhl/teams.rb
  29. +2 −1 db/ro/l1_2012_13.rb
  30. +2 −1 db/ro/teams.rb
  31. +2 −1 db/seasons.rb
  32. +3 −2 db/world/2010.rb
  33. +3 −3 db/world/quali_2012_13_america.rb
  34. +3 −2 db/world/quali_2012_13_europe.rb
  35. +3 −3 db/world/quali_2012_13_europe_c.rb
  36. +3 −3 db/world/quali_2012_13_europe_i.rb
  37. +2 −2 db/world/teams.rb
  38. +5 −6 script/db/america/2011.rb
  39. +3 −1 script/db/america/teams.rb
  40. +5 −7 script/db/at/2011_12/bl.rb
  41. +4 −6 script/db/at/2011_12/cup.rb
  42. +6 −6 script/db/at/2012_13/bl.rb
  43. +4 −6 script/db/at/2012_13/cup.rb
  44. +2 −2 script/db/at/badges.rb
  45. +2 −1 script/db/at/teams.rb
  46. +4 −6 script/db/cl/2011_12/cl.rb
  47. +4 −6 script/db/cl/2011_12/el.rb
  48. +4 −5 script/db/cl/2012_13/cl.rb
  49. +2 −2 script/db/cl/badges.rb
  50. +2 −2 script/db/cl/teams.rb
  51. +5 −6 script/db/copa/sud_2012_13.rb
  52. +2 −1 script/db/copa/teams.rb
  53. +5 −7 script/db/de/2012_13/bl.rb
  54. +2 −2 script/db/de/teams.rb
  55. +5 −7 script/db/en/2012_13/pl.rb
  56. +2 −2 script/db/en/teams.rb
  57. +2 −1 script/db/es/teams.rb
  58. +5 −10 script/db/euro/2008.rb
  59. +5 −6 script/db/euro/2012.rb
  60. +2 −1 script/db/euro/teams.rb
  61. +6 −5 script/db/leagues.rb
  62. +6 −6 script/db/mx/apertura_2012.rb
  63. +2 −1 script/db/mx/teams.rb
  64. +2 −1 script/db/nfl/teams.rb
  65. +2 −1 script/db/nhl/teams.rb
  66. +5 −6 script/db/ro/l1_2012_13.rb
  67. +2 −1 script/db/ro/teams.rb
  68. +2 −1 script/db/seasons.rb
  69. +5 −6 script/db/world/2010.rb
  70. +5 −7 script/db/world/quali_2012_13_america.rb
  71. +5 −6 script/db/world/quali_2012_13_europe.rb
  72. +3 −3 script/db/world/quali_2012_13_europe_c.rb
  73. +3 −3 script/db/world/quali_2012_13_europe_i.rb
  74. +2 −2 script/db/world/teams.rb
  75. +68 −48 script/lib/sportdb.rb
  76. +29 −0 script/lib/sportdb/keys.rb
  77. +27 −7 script/lib/sportdb/loader.rb
  78. +17 −4 script/lib/sportdb/models/event.rb
  79. +3 −2 script/lib/sportdb/models/forward.rb
  80. +1 −1 script/lib/sportdb/version.rb
View
@@ -45,4 +45,5 @@
copac.add_teams_from_ary!( ['uru', 'chi', 'per', 'mex' ] )
-Prop.create!( key: 'db.america.2011.version', value: '1' )
+## The End
+#################
View
@@ -52,4 +52,6 @@
Team.create_from_ary!( teams, national: true )
-Prop.create!( key: 'db.america.teams.version', value: '1' )
+
+## The End
+#################
View
@@ -26,5 +26,5 @@
bl.add_teams_from_ary!( team_keys_bl )
-
-Prop.create!( key: 'db.at.2011/12.version', value: '1' )
+## The End
+#################
View
@@ -62,5 +62,5 @@
Game.create_knockouts_from_ary!( games_ofb4, ofb4 )
Game.create_knockouts_from_ary!( games_ofb1, ofb1 )
-
-Prop.create!( key: 'db.at.cup.2011/12.version', value: '1' )
+## The End
+#################
View
@@ -28,4 +28,6 @@
bl.add_teams_from_ary!( team_keys_bl )
-Prop.create!( key: 'db.at.2012/13.version', value: '1' )
+
+## The End
+#################
View
@@ -107,5 +107,5 @@
team_keys_rlo +
team_keys_misc )
-
-Prop.create!( key: 'db.at.cup.2012/13.version', value: '1' )
+## The End
+#################
View
@@ -18,5 +18,5 @@
league: League.find_by_key!('at'),
season: Season.find_by_key!('2011/12') )
-
-Prop.create!( key: 'db.at.badges.version', value: '1' )
+## The End
+#################
View
@@ -89,4 +89,5 @@
Team.create_from_ary!( bl+ersteliga+rlwest+rlmitte+rlost+misc, club: true, country: at )
-Prop.create!( key: 'db.at.teams.version', value: '1' )
+## The End
+#################
View
@@ -84,5 +84,5 @@
Game.create_knockout_pairs_from_ary!( games_cl4, cl4, cl4_2 )
Game.create_knockouts_from_ary!( games_cl1, cl1 )
-
-Prop.create!( key: 'db.cl.2011/12.version', value: '1' )
+## The End
+#################
View
@@ -61,5 +61,5 @@
Game.create_knockout_pairs_from_ary!( games_el4, el4, el4_2 )
Game.create_knockouts_from_ary!( games_el1, el1 )
-
-Prop.create!( key: 'db.el.2011/12.version', value: '1' )
+## The End
+#################
View
@@ -320,4 +320,5 @@
Game.create_pairs_from_ary_for_group!( games_clh, clh )
-Prop.create!( key: 'db.cl.2012/13.version', value: '1' )
+## The End
+#################
View
@@ -64,5 +64,5 @@
-Prop.create!( key: 'db.cl.badges.version', value: '1' )
-Prop.create!( key: 'db.el.badges.version', value: '1' )
+## The End
+#################
View
@@ -70,5 +70,5 @@
Team.create_from_ary!( teams, club: true )
-
-Prop.create!( key: 'db.cl.teams.version', value: '1' )
+## The End
+#################
View
@@ -34,4 +34,5 @@
sud.add_teams_from_ary!( team_keys_sud )
-Prop.create!( key: 'db.copa.sud.2012/13.version', value: '1' )
+## The End
+#################
View
@@ -47,4 +47,5 @@
Team.create_from_ary!( teams, club: true )
-Prop.create!( key: 'db.copa.teams.version', value: '1' )
+## The End
+#################
View
@@ -34,5 +34,5 @@
bl.add_teams_from_ary!( team_keys_bl )
-
-Prop.create!( key: 'db.de.2012/13.version', value: '1' )
+## The End
+#################
View
@@ -32,5 +32,5 @@
Team.create_from_ary!( teams, club: true, country: de )
-
-Prop.create!( key: 'db.de.teams.version', value: '1' )
+## The End
+#################
View
@@ -35,5 +35,5 @@
pl.add_teams_from_ary!( team_keys_pl )
-
-Prop.create!( key: 'db.en.2012/13.version', value: '1' )
+## The End
+#################
View
@@ -36,5 +36,5 @@
Team.create_from_ary!( teams, club: true, country: en )
-
-Prop.create!( key: 'db.en.teams.version', value: '1' )
+## The End
+#################
View
@@ -14,4 +14,5 @@
Team.create_from_ary!( teams, club: true, country: es )
-Prop.create!( key: 'db.es.teams.version', value: '1' )
+## The End
+#################
View
@@ -51,9 +51,5 @@
eurod.add_teams_from_ary!(['gre', 'swe', 'esp', 'rus'])
-
-Prop.create!( key: 'db.euro.2008.version', value: '1' )
-
-
-
-
+## The End
+#################
View
@@ -162,5 +162,5 @@
Game.create_knockouts_from_ary!( games_euro4, euro4 )
Game.create_knockouts_from_ary!( games_euro1, euro1 )
-
-Prop.create!( key: 'db.euro.2012.version', value: '1' )
+## The End
+#################
View
@@ -74,4 +74,5 @@
Team.create_from_ary!( teams, national: true )
-Prop.create!( key: 'db.euro.teams.version', value: '1' )
+## The End
+#################
View
@@ -29,6 +29,7 @@
[ 'pt', 'SuperLiga', pt ],
[ 'ru', 'Premier Liga', ru ],
[ 'ro', 'Romania Liga 1', ro ],
+ ## todo: make apertura into season?? remove from league? why? why not?
[ 'mx.apertura', 'México Primera División Apertura', mx ],
[ 'br', 'Campeonato Brasileiro Série A', br ]
]
@@ -55,13 +56,13 @@
leagues_intl = [
[ 'euro', 'Euro' ],
[ 'america', 'Copa América' ],
- [ 'wm', 'World Cup' ], ## change key to world??
- [ 'wmq.euro', 'World Cup Quali Europe' ],
- [ 'wmq.america', 'World Cup Quali North/Central America and Caribbean' ]
+ [ 'world', 'World Cup' ], ## change key to world??
+ [ 'world.quali.euro', 'World Cup Quali Europe' ],
+ [ 'world.quali.america', 'World Cup Quali North/Central America and Caribbean' ]
]
League.create_from_ary!( leagues_intl, club: false )
-
-Prop.create!( key: 'db.leagues.version', value: '1' )
+## The End
+#################
View
@@ -30,4 +30,6 @@
mx.add_teams_from_ary!( team_keys_mx )
-Prop.create!( key: 'db.mx.apertura.2012.version', value: '1' )
+
+## The End
+#################
View
@@ -25,4 +25,5 @@
Team.create_from_ary!( teams, club: true, country: mx )
-Prop.create!( key: 'db.mx.teams.version', value: '1' )
+## The End
+#################
View
@@ -54,4 +54,5 @@
Team.create_from_ary!( teams, club: true, country: us )
-Prop.create!( key: 'db.nfl.teams.version', value: '1' )
+## The End
+#################
View
@@ -47,4 +47,5 @@
Team.create_from_ary!( teams, club: true )
-Prop.create!( key: 'db.nhl.teams.version', value: '1' )
+## The End
+#################
View
@@ -133,4 +133,5 @@
Game.create_from_ary!( games_l105, l105 )
-Prop.create!( key: 'db.ro.2012/13.version', value: '1' )
+## The End
+#################
View
@@ -28,4 +28,5 @@
Team.create_from_ary!( l1, club: true, country: ro )
-Prop.create!( key: 'db.ro.teams.version', value: '1' )
+## The End
+#################
View
@@ -18,4 +18,5 @@
Season.create!( key: '2008', title: '2008' )
-Prop.create!( key: 'db.seasons.version', value: '1' )
+## The End
+#################
View
@@ -13,7 +13,7 @@
## 64 games
## 31 days (11 June - 11 July)
-wm = Event.create!( league: League.find_by_key!('wm'),
+wm = Event.create!( league: League.find_by_key!('world'),
season: Season.find_by_key!('2010'),
start_at: Time.cet( '2010-06-11 12:00' ) )
@@ -184,4 +184,5 @@
wmh.add_teams_from_ary!( ['esp', 'sui', 'hon', 'chi'] )
-Prop.create!( key: 'db.world.2010.version', value: '1' )
+## The End
+#################
@@ -8,7 +8,7 @@
## WM 2014 - Qualification North/Central America & Caribbean Islands
-world = Event.create!( league: League.find_by_key!('wmq.america'),
+world = Event.create!( league: League.find_by_key!('world.quali.america'),
season: Season.find_by_key!('2012/13'),
start_at: Time.cet( '2012-09-06 12:00' ) )
@@ -27,5 +27,5 @@
world2.add_teams_from_ary!( team_keys_world2 )
-
-Prop.create!( key: 'db.world.quali.america.2012/13.version', value: '1' )
+## The End
+#################
@@ -6,8 +6,9 @@
## WM 2014 - Qualification Europe
-world = Event.create!( league: League.find_by_key!('wmq.euro'),
+world = Event.create!( league: League.find_by_key!('world.quali.euro'),
season: Season.find_by_key!('2012/13'),
start_at: Time.cet( '2012-09-07 00:00' ) )
-Prop.create!( key: 'db.world.quali.euro.2012/13.version', value: '1' )
+## The End
+#################
@@ -5,7 +5,7 @@
#
# note: for teams see seeds/euro/teams.rb
-world = Event.find_by_key!( 'wmq.euro' )
+world = Event.find_world_quali_euro_2012_13!
team_keys_worldc = [
'ger',
@@ -22,5 +22,5 @@
worldc.add_teams_from_ary!( team_keys_worldc )
-
-Prop.create!( key: 'db.world.quali.euro.2012/13.c.version', value: '1' )
+## The End
+#################
@@ -5,7 +5,7 @@
# note: for teams see seeds/euro/teams.rb
-world = Event.find_by_key!( 'wmq.euro' )
+world = Event.find_world_quali_euro_2012_13!
team_keys_worldi = [
'fra',
@@ -22,5 +22,5 @@
worldi.add_teams_from_ary!( team_keys_worldi )
-
-Prop.create!( key: 'db.world.quali.euro.2012/13.i.version', value: '1' )
+## The End
+#################
View
@@ -48,5 +48,5 @@
Team.create_from_ary!( teams, national: true )
-
-Prop.create!( key: 'db.world.teams.version', value: '1' )
+## The End
+#################
Oops, something went wrong.

0 comments on commit acecc3e

Please sign in to comment.