Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

move fixtures to sport.db

  • Loading branch information...
commit bc90ec336351f71d10e5d36c57921a145c30f369 1 parent 6406b5b
@geraldb geraldb authored
View
12 app/models/team.rb
@@ -27,7 +27,19 @@ def games
Game.where( 'team1_id = ? or team2_id = ?', id, id ).order( 'play_at' ).all
end
+ def self.update_image_from_ary!( teams )
+ teams.each do |values|
+
+ team = Team.find_by_key!( values[0])
+
+ attr = {
+ :img => values[1]
+ }
+ team.update_attributes!( attr )
+
+ end # each team
+ end
def self.create_from_ary!( teams )
teams.each do |values|
View
126 db/seeds/austria/2011_12/bl.rb
@@ -1,125 +1 @@
-# encoding: utf-8
-
-# note: timezone for games (play_at) is *always* CET (central european time)
-
-
-puts "*** loading seed data in seeds/austria/bl_2011_12.rb"
-
-######################################
-## Oesterreichische Bundesliga 2011/12
-##
-## more info => http://bundesliga.at
-
-bl = Event.create!( :key => 'at_bl_2011_12',
- :title => 'Österr. Bundesliga 2011/12',
- :start_at => Time.cet('2012-04-07 00:00') )
-
-salzburg = Team.find_by_key!( 'salzburg' )
-rapid = Team.find_by_key!( 'rapid' )
-admira = Team.find_by_key!( 'admira' )
-austria = Team.find_by_key!( 'austria' )
-sturm = Team.find_by_key!( 'sturm' )
-ried = Team.find_by_key!( 'ried' )
-wacker = Team.find_by_key!( 'wacker' )
-mattersburg = Team.find_by_key!( 'mattersburg' )
-neustadt = Team.find_by_key!( 'neustadt' )
-ksv = Team.find_by_key!( 'ksv' )
-
-bl.teams << salzburg
-bl.teams << rapid
-bl.teams << admira
-bl.teams << austria
-bl.teams << sturm
-bl.teams << ried
-bl.teams << wacker
-bl.teams << mattersburg
-bl.teams << neustadt
-bl.teams << ksv
-
-
-bl29 = Round.create!( :event => bl, :pos => 29, :title => '29. Runde', :title2 => '7.+8. April 2012' )
-bl30 = Round.create!( :event => bl, :pos => 30, :title => '30. Runde', :title2 => '14.+15. April 2012' )
-bl31 = Round.create!( :event => bl, :pos => 31, :title => '31. Runde', :title2 => '21.+22. April 2012' )
-bl32 = Round.create!( :event => bl, :pos => 32, :title => '32. Runde', :title2 => '28.+29. April 2012' )
-bl33 = Round.create!( :event => bl, :pos => 33, :title => '33. Runde', :title2 => '5. Mai 2012' )
-bl34 = Round.create!( :event => bl, :pos => 34, :title => '34. Runde', :title2 => '10. Mai 2012' )
-bl35 = Round.create!( :event => bl, :pos => 35, :title => '35. Runde', :title2 => '13. Mai 2012' )
-bl36 = Round.create!( :event => bl, :pos => 36, :title => '36. Runde', :title2 => '17. Mai 2012' )
-
-
-games_bl29 = [
- [ 1, salzburg, [2, 0], wacker, Time.cet('2012-04-07 16:00') ],
- [ 2, ried, [0, 1], austria, Time.cet('2012-04-07 18:30') ],
- [ 3, ksv, [2, 3], admira, Time.cet('2012-04-07 18:30') ],
- [ 4, rapid, [2, 1], neustadt, Time.cet('2012-04-07 18:30') ],
- [ 5, mattersburg, [0, 2], sturm, Time.cet('2012-04-08 16:00') ]
-]
-
-games_bl30 = [
- [ 1, neustadt, [0, 0], ksv, Time.cet('2012-04-14 16:00') ],
- [ 2, admira, [1, 1], wacker, Time.cet('2012-04-14 18:30') ],
- [ 3, sturm, [2, 2], salzburg, Time.cet('2012-04-14 18:30') ],
- [ 4, ried, [2, 0], mattersburg, Time.cet('2012-04-14 18:30') ],
- [ 5, austria, [0, 0], rapid, Time.cet('2012-04-15 16:00') ]
-]
-
-games_bl31 = [
- [ 1, wacker, [2, 0], neustadt, Time.cet('2012-04-21 16:00') ],
- [ 2, ksv, [1, 0], austria, Time.cet('2012-04-21 18:30') ],
- [ 3, mattersburg, [1, 2], admira, Time.cet('2012-04-21 18:30') ],
- [ 4, salzburg, [2, 0], ried, Time.cet('2012-04-21 18:30') ],
- [ 5, rapid, [1, 1], sturm, Time.cet('2012-04-22 16:00') ]
-]
-
-games_bl32 = [
- [ 1, austria, [3, 0], wacker, Time.cet('2012-04-28 16:00') ],
- [ 2, neustadt, [1, 4], admira, Time.cet('2012-04-28 18:30') ],
- [ 3, mattersburg, [0, 1], salzburg, Time.cet('2012-04-28 18:30') ],
- [ 4, sturm, [2, 1], ksv, Time.cet('2012-04-28 18:30') ],
- [ 5, ried, [2, 3], rapid, Time.cet('2012-04-29 16:00') ]
-]
-
-games_bl33 = [
- [ 1, neustadt, [0, 0], sturm, Time.cet('2012-05-05 16:00') ],
- [ 2, admira, [3, 2], austria, Time.cet('2012-05-05 18:30') ],
- [ 3, ksv, [0, 0], ried, Time.cet('2012-05-05 18:30') ],
- [ 4, wacker, [3, 6], mattersburg, Time.cet('2012-05-05 18:30') ],
- [ 5, rapid, [0, 1], salzburg, Time.cet('2012-05-06 16:00') ]
-]
-
-games_bl34 = [
- [ 1, salzburg, [2, 0], ksv, Time.cet('2012-05-10 18:30') ],
- [ 2, austria, [3, 1], neustadt, Time.cet('2012-05-10 20:30') ],
- [ 3, ried, [1, 1], wacker, Time.cet('2012-05-10 20:30') ],
- [ 4, mattersburg, [0, 1], rapid, Time.cet('2012-05-10 20:30') ],
- [ 5, sturm, [0, 3], admira, Time.cet('2012-05-10 20:30') ]
-]
-
-games_bl35 = [
- [ 1, ksv, [0,2], rapid, Time.cet('2012-05-13 16:00') ],
- [ 2, wacker, [1,1], sturm, Time.cet('2012-05-13 16:00') ],
- [ 3, neustadt, [1,5], salzburg, Time.cet('2012-05-13 16:00') ],
- [ 4, admira, [1,1], ried, Time.cet('2012-05-13 16:00') ],
- [ 5, austria, [1,0], mattersburg, Time.cet('2012-05-13 16:00') ]
-]
-
-games_bl36 = [
- [ 1, rapid, [2,0], wacker, Time.cet('2012-05-17 16:00') ],
- [ 2, ried, [2,2], neustadt, Time.cet('2012-05-17 16:00') ],
- [ 3, mattersburg, [2,0], ksv, Time.cet('2012-05-17 16:00') ],
- [ 4, sturm, [3,1], austria, Time.cet('2012-05-17 16:00') ],
- [ 5, salzburg, [2,0], admira, Time.cet('2012-05-17 16:00') ]
-]
-
-Game.create_from_ary!( games_bl29, bl29 )
-Game.create_from_ary!( games_bl30, bl30 )
-Game.create_from_ary!( games_bl31, bl31 )
-Game.create_from_ary!( games_bl32, bl32 )
-Game.create_from_ary!( games_bl33, bl33 )
-Game.create_from_ary!( games_bl34, bl34 )
-Game.create_from_ary!( games_bl35, bl35 )
-Game.create_from_ary!( games_bl36, bl36 )
-
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.austria.bl.2011/12.version', :value => '1' )
-
+## delete me - nothing here
View
68 db/seeds/austria/2011_12/cup.rb
@@ -1,66 +1,6 @@
-# encoding: utf-8
-# note: timezone for games (play_at) is *always* CET (central european time)
-
-puts "*** loading seed data in seeds/austria/cup_2011_12.rb"
-
-##################################
-### ÖFB Cup 2011/12
-
-ofb = Event.create!( :key => 'at_cup_2011_12', :title => 'ÖFB Cup 2011/12', :team3 => false, :start_at => Time.cet( '2011-10-10 17:00' ) )
-
-
-sturm = Team.find_by_key!( 'sturm' )
-ried = Team.find_by_key!( 'ried' )
-salzburg = Team.find_by_key!( 'salzburg' )
-austria = Team.find_by_key!( 'austria' )
-rapid = Team.find_by_key!( 'rapid' )
-wacker = Team.find_by_key!( 'wacker' )
-neustadt = Team.find_by_key!( 'neustadt')
-ksv = Team.find_by_key!( 'ksv' )
-mattersburg = Team.find_by_key!( 'mattersburg' )
-admira = Team.find_by_key!( 'admira' )
-
-
-hartberg = Team.find_by_key!( 'hartberg' )
-groedig = Team.find_by_key!( 'groedig' )
-juniors = Team.find_by_key!( 'juniors' )
-austrial = Team.find_by_key!( 'austrial' )
-
-ofb.teams << sturm
-ofb.teams << hartberg
-ofb.teams << groedig
-ofb.teams << ried
-ofb.teams << salzburg
-ofb.teams << juniors
-ofb.teams << austrial
-ofb.teams << austria
-
-ofb8 = Round.create!( :event => ofb, :pos => 1, :title => 'Viertelfinale', :title2 => '10.+11. April 2012' )
-ofb4 = Round.create!( :event => ofb, :pos => 2, :title => 'Halbfinale', :title2 => '1.+2. Mai 2012' )
-ofb1 = Round.create!( :event => ofb, :pos => 3, :title => 'Finale', :title2 => '20. Mai 2012' )
-
-games_ofb8 = [
- [ 1, groedig, [2, 3], ried, Time.cet('2012-04-10 18:00') ],
- [ 2, austrial, [1, 2], austria, Time.cet('2012-04-11 18:00') ],
- [ 3, sturm, [2, 2, 2, 4], hartberg, Time.cet('2012-04-11 19:00') ],
- [ 4, salzburg, [4, 1], juniors, Time.cet('2012-04-11 19:00') ]
-]
-
-games_ofb4 = [
- [ 1, hartberg, [0, 1], salzburg, Time.cet('2012-05-01 18:00') ],
- [ 2, ried, [2, 0], austria, Time.cet('2012-05-02 20:30') ]
-]
-
-games_ofb1 = [
- [ 1, salzburg, [3,0], ried, Time.cet('2012-05-20 16:00') ]
-]
-
-Game.create_knockouts_from_ary!( games_ofb8, ofb8 )
-Game.create_knockouts_from_ary!( games_ofb4, ofb4 )
-Game.create_knockouts_from_ary!( games_ofb1, ofb1 )
-
-
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.austria.cup.2011/12.version', :value => '1' )
+### todo:
+## update event
+## add :team3 flag
+## ofb = Event.create!( :key => 'at_cup_2011_12', :title => 'ÖFB Cup 2011/12', :team3 => false, :start_at => Time.cet( '2011-10-10 17:00' ) )
View
250 db/seeds/austria/2012_13/bl.rb
@@ -1,249 +1 @@
-# encoding: utf-8
-
-# note: timezone for games (play_at) is *always* CET (central european time)
-
-
-puts "*** loading seed data in seeds/austria/bl_2012_13.rb"
-
-######################################
-## Oesterreichische Bundesliga 2012/13
-##
-## more info => http://bundesliga.at
-
-
-bl = Event.create!( :key => 'at_bl_2012_13',
- :title => 'Österr. Bundesliga 2012/13',
- :start_at => Time.cet('2012-07-21 00:00') )
-
-salzburg = Team.find_by_key!( 'salzburg' )
-rapid = Team.find_by_key!( 'rapid' )
-admira = Team.find_by_key!( 'admira' )
-austria = Team.find_by_key!( 'austria' )
-sturm = Team.find_by_key!( 'sturm' )
-ried = Team.find_by_key!( 'ried' )
-wacker = Team.find_by_key!( 'wacker' )
-mattersburg = Team.find_by_key!( 'mattersburg' )
-neustadt = Team.find_by_key!( 'neustadt' )
-wac = Team.find_by_key!( 'wac' )
-
-
-bl.teams << salzburg
-bl.teams << rapid
-bl.teams << admira
-bl.teams << austria
-bl.teams << sturm
-bl.teams << ried
-bl.teams << wacker
-bl.teams << mattersburg
-bl.teams << neustadt
-bl.teams << wac
-
-
-bl01 = Round.create!( :event => bl, :pos => 1, :title => '1. Runde', :title2 => '21.+22. Jul 2012' )
-bl02 = Round.create!( :event => bl, :pos => 2, :title => '2. Runde', :title2 => '28.+29. Jul 2012' )
-bl03 = Round.create!( :event => bl, :pos => 3, :title => '3. Runde', :title2 => '4.+5. Aug 2012' )
-bl04 = Round.create!( :event => bl, :pos => 4, :title => '4. Runde', :title2 => '11. Aug 2012' )
-bl05 = Round.create!( :event => bl, :pos => 5, :title => '5. Runde', :title2 => '18. Aug 2012' )
-bl06 = Round.create!( :event => bl, :pos => 6, :title => '6. Runde', :title2 => '25. Aug 2012' )
-bl07 = Round.create!( :event => bl, :pos => 7, :title => '7. Runde', :title2 => '1. Sep 2012' )
-bl08 = Round.create!( :event => bl, :pos => 8, :title => '8. Runde', :title2 => '15. Sep 2012' )
-bl09 = Round.create!( :event => bl, :pos => 9, :title => '9. Runde', :title2 => '22. Sep 2012' )
-bl10 = Round.create!( :event => bl, :pos => 10, :title => '10. Runde', :title2 => '29. Sep 2012' )
-bl11 = Round.create!( :event => bl, :pos => 11, :title => '11. Runde', :title2 => '6. Okt 2012' )
-bl12 = Round.create!( :event => bl, :pos => 12, :title => '12. Runde', :title2 => '20. Okt 2012' )
-bl13 = Round.create!( :event => bl, :pos => 13, :title => '13. Runde', :title2 => '27. Okt 2012' )
-bl14 = Round.create!( :event => bl, :pos => 14, :title => '14. Runde', :title2 => '3. Nov 2012' )
-bl15 = Round.create!( :event => bl, :pos => 15, :title => '15. Runde', :title2 => '10. Nov 2012' )
-bl16 = Round.create!( :event => bl, :pos => 16, :title => '16. Runde', :title2 => '17. Nov 2012' )
-bl17 = Round.create!( :event => bl, :pos => 17, :title => '17. Runde', :title2 => '24. Nov 2012' )
-bl18 = Round.create!( :event => bl, :pos => 18, :title => '18. Runde', :title2 => '1. Dez 2012' )
-bl19 = Round.create!( :event => bl, :pos => 19, :title => '19. Runde', :title2 => '8. Dez 2012' )
-bl20 = Round.create!( :event => bl, :pos => 20, :title => '20. Runde', :title2 => '15. Dez 2012' )
-
-
-games_bl01 = [
- [ 1, sturm, [], salzburg, Time.cet('2012-07-21 16:00') ],
- [ 2, rapid, [], wacker, Time.cet('2012-07-21 18:30') ],
- [ 3, mattersburg, [], neustadt, Time.cet('2012-07-21 18:30') ],
- [ 4, wac, [], austria, Time.cet('2012-07-21 18:30') ],
- [ 5, admira, [], ried, Time.cet('2012-07-22 16:00') ]
-]
-
-games_bl02 = [
- [ 1, neustadt, [], rapid, Time.cet('2012-07-28 18:30') ],
- [ 2, salzburg, [], mattersburg, Time.cet('2012-07-28 18:30') ],
- [ 3, austria, [], sturm, Time.cet('2012-07-28 18:30') ],
- [ 4, wacker, [], admira, Time.cet('2012-07-29 16:00') ],
- [ 5, ried, [], wac, Time.cet('2012-07-29 18:30') ]
-]
-
-games_bl03 = [
- [ 1, ried, [], wacker, Time.cet('2012-08-04 18:30') ],
- [ 2, mattersburg, [], sturm, Time.cet('2012-08-04 18:30') ],
- [ 3, wac, [], salzburg, Time.cet('2012-08-04 18:30') ],
- [ 4, admira, [], neustadt, Time.cet('2012-08-04 18:30') ],
- [ 5, rapid, [], austria, Time.cet('2012-08-05 16:00') ]
-]
-
-games_bl04 = [
- [ 1, neustadt, [], ried, Time.cet('2012-08-11 00:00') ],
- [ 2, sturm, [], wac, Time.cet('2012-08-11 00:00') ],
- [ 3, salzburg, [], rapid, Time.cet('2012-08-11 00:00') ],
- [ 4, austria, [], admira, Time.cet('2012-08-11 00:00') ],
- [ 5, wacker, [], mattersburg, Time.cet('2012-08-11 00:00') ]
-]
-
-games_bl05 = [
- [ 1, ried, [], austria, Time.cet('2012-08-18 00:00') ],
- [ 2, rapid, [], sturm, Time.cet('2012-08-18 00:00') ],
- [ 3, wacker, [], neustadt, Time.cet('2012-08-18 00:00') ],
- [ 4, wac, [], mattersburg, Time.cet('2012-08-18 00:00') ],
- [ 5, admira, [], salzburg, Time.cet('2012-08-18 00:00') ]
-]
-
-games_bl06 = [
- [ 1, sturm, [], admira, Time.cet('2012-08-25 00:00') ],
- [ 2, salzburg, [], neustadt, Time.cet('2012-08-25 00:00') ],
- [ 3, austria, [], wacker, Time.cet('2012-08-25 00:00') ],
- [ 4, mattersburg, [], ried, Time.cet('2012-08-25 00:00') ],
- [ 5, wac, [], rapid, Time.cet('2012-08-25 00:00') ]
-]
-
-games_bl07 = [
- [ 1, ried, [], sturm, Time.cet('2012-09-01 00:00') ],
- [ 2, neustadt,[], austria, Time.cet('2012-09-01 00:00') ],
- [ 3, rapid, [], mattersburg, Time.cet('2012-09-01 00:00') ],
- [ 4, wacker, [], salzburg, Time.cet('2012-09-01 00:00') ],
- [ 5, admira, [], wac, Time.cet('2012-09-01 00:00') ]
-]
-
-games_bl08 = [
- [ 1, sturm, [], wacker, Time.cet('2012-09-15 00:00') ],
- [ 2, salzburg, [], ried, Time.cet('2012-09-15 00:00') ],
- [ 3, rapid, [], admira, Time.cet('2012-09-15 00:00') ],
- [ 4, mattersburg, [], austria, Time.cet('2012-09-15 00:00') ],
- [ 5, wac, [], neustadt, Time.cet('2012-09-15 00:00') ]
-]
-
-games_bl09 = [
- [ 1, ried, [], rapid, Time.cet('2012-09-22 00:00') ],
- [ 2, neustadt,[], sturm, Time.cet('2012-09-22 00:00') ],
- [ 3, austria, [], salzburg, Time.cet('2012-09-22 00:00') ],
- [ 4, wacker, [], wac, Time.cet('2012-09-22 00:00') ],
- [ 5, admira, [], mattersburg, Time.cet('2012-09-22 00:00') ]
-]
-
-games_bl10 = [
- [ 1, salzburg, [], sturm, Time.cet('2012-09-29 00:00') ],
- [ 2, wacker, [], rapid, Time.cet('2012-09-29 00:00') ],
- [ 3, neustadt, [], mattersburg, Time.cet('2012-09-29 00:00') ],
- [ 4, austria, [], wac, Time.cet('2012-09-29 00:00') ],
- [ 5, ried, [], admira, Time.cet('2012-09-29 00:00') ]
-]
-
-games_bl11 = [
- [ 1, wac, [], ried, Time.cet('2012-10-06 00:00') ],
- [ 2, rapid, [], neustadt, Time.cet('2012-10-06 00:00') ],
- [ 3, mattersburg, [], salzburg, Time.cet('2012-10-06 00:00') ],
- [ 4, sturm, [], austria, Time.cet('2012-10-06 00:00') ],
- [ 5, admira, [], wacker, Time.cet('2012-10-06 00:00') ]
-]
-
-games_bl12 = [
- [ 1, wacker, [], ried, Time.cet('2012-10-20 00:00') ],
- [ 2, austria, [], rapid, Time.cet('2012-10-20 00:00') ],
- [ 3, sturm, [], mattersburg, Time.cet('2012-10-20 00:00') ],
- [ 4, salzburg, [], wac, Time.cet('2012-10-20 00:00') ],
- [ 5, neustadt, [], admira, Time.cet('2012-10-20 00:00') ]
-]
-
-games_bl13 = [
- [ 1, ried, [], neustadt, Time.cet('2012-10-27 00:00') ],
- [ 2, wac, [], sturm, Time.cet('2012-10-27 00:00') ],
- [ 3, rapid, [], salzburg, Time.cet('2012-10-27 00:00') ],
- [ 4, admira, [], austria, Time.cet('2012-10-27 00:00') ],
- [ 5, mattersburg, [], wacker, Time.cet('2012-10-27 00:00') ]
-]
-
-games_bl14 = [
- [ 1, austria, [], ried, Time.cet('2012-11-03 00:00') ],
- [ 2, sturm, [], rapid, Time.cet('2012-11-03 00:00') ],
- [ 3, neustadt, [], wacker, Time.cet('2012-11-03 00:00') ],
- [ 4, mattersburg, [], wac, Time.cet('2012-11-03 00:00') ],
- [ 5, salzburg, [], admira, Time.cet('2012-11-03 00:00') ]
-]
-
-games_bl15 = [
- [ 1, admira, [], sturm, Time.cet('2012-11-10 00:00') ],
- [ 2, neustadt, [], salzburg, Time.cet('2012-11-10 00:00') ],
- [ 3, wacker, [], austria, Time.cet('2012-11-10 00:00') ],
- [ 4, ried, [], mattersburg, Time.cet('2012-11-10 00:00') ],
- [ 5, rapid, [], wac, Time.cet('2012-11-10 00:00') ]
-]
-
-games_bl16 = [
- [ 1, sturm, [], ried, Time.cet('2012-11-17 00:00') ],
- [ 2, austria, [], neustadt, Time.cet('2012-11-17 00:00') ],
- [ 3, mattersburg,[], rapid, Time.cet('2012-11-17 00:00') ],
- [ 4, salzburg, [], wacker, Time.cet('2012-11-17 00:00') ],
- [ 5, wac, [], admira, Time.cet('2012-11-17 00:00') ]
-]
-
-games_bl17 = [
- [ 1, wacker, [], sturm, Time.cet('2012-11-24 00:00') ],
- [ 2, ried, [], salzburg, Time.cet('2012-11-24 00:00') ],
- [ 3, admira, [], rapid, Time.cet('2012-11-24 00:00') ],
- [ 4, austria, [], mattersburg, Time.cet('2012-11-24 00:00') ],
- [ 5, neustadt, [], wac, Time.cet('2012-11-24 00:00') ]
-]
-
-games_bl18 = [
- [ 1, rapid, [], ried, Time.cet('2012-12-01 00:00') ],
- [ 2, sturm, [], neustadt, Time.cet('2012-12-01 00:00') ],
- [ 3, salzburg, [], austria, Time.cet('2012-12-01 00:00') ],
- [ 4, wac, [], wacker, Time.cet('2012-12-01 00:00') ],
- [ 5, mattersburg, [], admira, Time.cet('2012-12-01 00:00') ]
-]
-
-games_bl19 = [
- [ 1, sturm, [], salzburg, Time.cet('2012-12-08 00:00') ],
- [ 2, rapid, [], wacker, Time.cet('2012-12-08 00:00') ],
- [ 3, mattersburg, [], neustadt, Time.cet('2012-12-08 00:00') ],
- [ 4, wac, [], austria, Time.cet('2012-12-08 00:00') ],
- [ 5, admira, [], ried, Time.cet('2012-12-08 00:00') ]
-]
-
-games_bl20 = [
- [ 1, ried, [], wac, Time.cet('2012-12-15 00:00') ],
- [ 2, neustadt, [], rapid, Time.cet('2012-12-15 00:00') ],
- [ 3, salzburg, [], mattersburg, Time.cet('2012-12-15 00:00') ],
- [ 4, austria, [], sturm, Time.cet('2012-12-15 00:00') ],
- [ 5, wacker, [], admira, Time.cet('2012-12-15 00:00') ]
-]
-
-
-
-Game.create_from_ary!( games_bl01, bl01 )
-Game.create_from_ary!( games_bl02, bl02 )
-Game.create_from_ary!( games_bl03, bl03 )
-Game.create_from_ary!( games_bl04, bl04 )
-Game.create_from_ary!( games_bl05, bl05 )
-Game.create_from_ary!( games_bl06, bl06 )
-Game.create_from_ary!( games_bl07, bl07 )
-Game.create_from_ary!( games_bl08, bl08 )
-Game.create_from_ary!( games_bl09, bl09 )
-Game.create_from_ary!( games_bl10, bl10 )
-Game.create_from_ary!( games_bl11, bl11 )
-Game.create_from_ary!( games_bl12, bl12 )
-Game.create_from_ary!( games_bl13, bl13 )
-Game.create_from_ary!( games_bl14, bl14 )
-Game.create_from_ary!( games_bl15, bl15 )
-Game.create_from_ary!( games_bl16, bl16 )
-Game.create_from_ary!( games_bl17, bl17 )
-Game.create_from_ary!( games_bl18, bl18 )
-Game.create_from_ary!( games_bl19, bl19 )
-Game.create_from_ary!( games_bl20, bl20 )
-
-
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.austria.bl.2012/13.version', :value => '1' )
+## nothing delete me
View
203 db/seeds/austria/2012_13/cup.rb
@@ -1,201 +1,10 @@
-# encoding: utf-8
-##################################
-### ÖFB Cup 2012/13
-cup = Event.create!( :key => 'at_cup_2012_13',
- :title => 'ÖFB Cup 2012/13',
- :team3 => false,
- :start_at => Time.cet( '2012-07-13 00:00' ) )
+##
+## todo: update team3 flag
-cuprunde1 = Round.create!( :event => cup, :pos => 1, :title => '1. Runde', :title2 => '13.-15. Juli 2012' )
-cuprunde2 = Round.create!( :event => cup, :pos => 2, :title => '2. Runde', :title2 => '25.+26. Sep 2012' )
-cup16 = Round.create!( :event => cup, :pos => 3, :title => 'Achtelfinale', :title2 => '30.+31. Okt 2012' )
-cup8 = Round.create!( :event => cup, :pos => 4, :title => 'Viertelfinale', :title2 => '16.+17. April 2013' )
-cup4 = Round.create!( :event => cup, :pos => 5, :title => 'Halbfinale', :title2 => '7.+8. Mai 2013' )
-cup1 = Round.create!( :event => cup, :pos => 6, :title => 'Finale', :title2 => '30. Mai 2013' )
+## cup = Event.create!( :key => 'at_cup_2012_13',
+# :title => 'ÖFB Cup 2012/13',
+# :team3 => false,
+# :start_at => Time.cet( '2012-07-13 00:00' ) )
-
-## bundesliga teams
-
-salzburg = Team.find_by_key!( 'salzburg' )
-rapid = Team.find_by_key!( 'rapid' )
-admira = Team.find_by_key!( 'admira' )
-austria = Team.find_by_key!( 'austria' )
-sturm = Team.find_by_key!( 'sturm' )
-ried = Team.find_by_key!( 'ried' )
-wacker = Team.find_by_key!( 'wacker' )
-mattersburg = Team.find_by_key!( 'mattersburg' )
-neustadt = Team.find_by_key!( 'neustadt' )
-wac = Team.find_by_key!( 'wac' )
-
-## erste liga teams
-
-ksv = Team.find_by_key!( 'ksv' )
-altach = Team.find_by_key!( 'altach' )
-austrial = Team.find_by_key!( 'austrial' )
-stpoelten = Team.find_by_key!( 'stpoelten' )
-linz = Team.find_by_key!( 'linz' )
-groedig = Team.find_by_key!( 'groedig' )
-lustenau = Team.find_by_key!( 'lustenau' )
-vienna = Team.find_by_key!( 'vienna' )
-hartberg = Team.find_by_key!( 'hartberg' )
-horn = Team.find_by_key!( 'horn' )
-
-## regionalliga west teams
-
-hard = Team.find_by_key!( 'hard' )
-bregenz = Team.find_by_key!( 'bregenz' )
-dornbirn = Team.find_by_key!( 'dornbirn' )
-kufstein = Team.find_by_key!( 'kufstein' )
-wattens = Team.find_by_key!( 'wattens' )
-austrias = Team.find_by_key!( 'austrias')
-pinzgau = Team.find_by_key!( 'pinzgau' )
-stjohann = Team.find_by_key!( 'stjohann' )
-
-## regionalliga mitte teams
-
-vsv = Team.find_by_key!( 'vsv' )
-klagenfurt = Team.find_by_key!( 'klagenfurt' )
-austriak = Team.find_by_key!( 'austriak' )
-kalsdorf = Team.find_by_key!( 'kalsdorf' )
-gratkorn = Team.find_by_key!( 'gratkorn' )
-allerheiligen = Team.find_by_key!( 'allerheiligen' )
-leoben = Team.find_by_key!( 'leoben' )
-gak = Team.find_by_key!( 'gak' )
-pasching = Team.find_by_key!( 'pasching' )
-voecklamarkt = Team.find_by_key!( 'voecklamarkt' )
-stflorian = Team.find_by_key!( 'stflorian' )
-wallern = Team.find_by_key!( 'wallern' )
-lask = Team.find_by_key!( 'lask' )
-
-## regionalliga ost teams
-
-sollenau = Team.find_by_key!( 'sollenau' )
-amstetten = Team.find_by_key!( 'amstetten' )
-retz = Team.find_by_key!( 'retz' )
-fac = Team.find_by_key!( 'fac' )
-schwechat = Team.find_by_key!( 'schwechat' )
-wienersk = Team.find_by_key!( 'wienersk' )
-ostbahn = Team.find_by_key!( 'ostbahn' )
-oberwart = Team.find_by_key!( 'oberwart' )
-parndorf = Team.find_by_key!( 'parndorf' )
-stegersbach = Team.find_by_key!( 'stegersbach' )
-
-## noch einige teams
-
-wolfurt = Team.find_by_key!( 'wolfurt' )
-schwaz = Team.find_by_key!( 'schwaz' )
-reutte = Team.find_by_key!( 'reutte' )
-spittal = Team.find_by_key!( 'spittal' )
-sak = Team.find_by_key!( 'sak' )
-dsc = Team.find_by_key!( 'dsc' )
-micheldorf = Team.find_by_key!( 'micheldorf' )
-badvoeslau = Team.find_by_key!( 'badvoeslau' )
-gaflenz = Team.find_by_key!( 'gaflenz' )
-ardagger = Team.find_by_key!( 'ardagger' )
-rohrendorf = Team.find_by_key!( 'rohrendorf' )
-heiligenkreuz = Team.find_by_key!( 'heiligenkreuz' )
-viktoria = Team.find_by_key!( 'viktoria' )
-
-
-## 10 Bundeliga Teams
-
-cup.teams << salzburg
-cup.teams << rapid
-cup.teams << admira
-cup.teams << austria
-cup.teams << sturm
-cup.teams << ried
-cup.teams << wacker
-cup.teams << mattersburg
-cup.teams << neustadt
-cup.teams << wac
-
-## 10 Erste Liga Teams
-
-cup.teams << ksv
-cup.teams << altach
-cup.teams << austrial
-cup.teams << stpoelten
-cup.teams << linz
-cup.teams << groedig
-cup.teams << lustenau
-cup.teams << vienna
-cup.teams << hartberg
-cup.teams << horn
-
-
-
-games_cuprunde1 = [
- [ 1, fac, [0,1], altach, Time.cet('2012-07-12 19:00') ],
-# [ 2, hard, [1,0], schwaz, Time.cet('2012-07-13 18:30') ],
- [ 3, dsc, [1,2], hartberg, Time.cet('2012-07-13 19:00') ],
- [ 4, gratkorn, [0,0,0,0,4,5], wacker, Time.cet('2012-07-13 19:00') ],
-# [ 5, pasching, [2,1], austrias, Time.cet('2012-07-13 19:00') ],
- [ 6, parndorf, [0,3], admira, Time.cet('2012-07-13 19:00') ],
- [ 7, voecklamarkt, [3,4], lustenau, Time.cet('2012-07-13 19:00') ],
-# [ 8, kalsdorf, [3,1], wallern, Time.cet('2012-07-13 19:00') ],
- [ 9, wattens, [0,1], sturm, Time.cet('2012-07-13 19:00') ],
-# [ 10, vsv, [4,2], rohrendorf, Time.cet('2012-07-13 19:00') ],
- [ 11, pinzgau, [0,4], groedig, Time.cet('2012-07-13 19:15') ],
-# [ 12, amstetten, [0,1], schwechat, Time.cet('2012-07-13 19:30') ],
- [ 13, stflorian, [2,1], linz, Time.cet('2012-07-13 19:30') ],
- [ 14, austriak, [3,2], horn, Time.cet('2012-07-13 19:30') ],
-# [ 15, sak, [0,5], allerheiligen, Time.cet('2012-07-13 19:30') ],
- [ 16, gak, [2,2,3,2], vienna, Time.cet('2012-07-13 20:00') ],
- [ 17, wienersk, [0,2], salzburg, Time.cet('2012-07-13 20:30') ],
-# [ 18, stegersbach, [2,2,3,2], reutte, Time.cet('2012-07-14 17:00') ],
- [ 19, badvoeslau, [1,0], stpoelten, Time.cet('2012-07-14 17:00') ],
-# [ 20, micheldorf, [0,1], viktoria, Time.cet('2012-07-14 17:00') ],
-# [ 21, klagenfurt, [1,2], stjohann, Time.cet('2012-07-14 18:00') ],
-# [ 22, lask, [7,0], spittal, Time.cet('2012-07-14 18:00') ],
- [ 23, ostbahn, [1,8], wac, Time.cet('2012-07-14 18:00') ],
-# [ 24, gaflenz, [1,2], sollenau, Time.cet('2012-07-14 18:00') ],
- [ 25, oberwart, [1,3], austria, Time.cet('2012-07-14 18:00') ],
- [ 26, leoben, [1,3], mattersburg, Time.cet('2012-07-14 18:00') ],
- [ 27, retz, [1,7], austrial, Time.cet('2012-07-14 18:00') ],
- [ 28, bregenz, [1,2], ksv, Time.cet('2012-07-14 18:30') ],
-# [ 29, ardagger, [2,2,2,3], dornbirn, Time.cet('2012-07-14 19:00') ],
- [ 30, kufstein, [1,4], ried, Time.cet('2012-07-14 19:00') ],
- [ 31, wolfurt, [2,2,2,4], neustadt, Time.cet('2012-07-15 10:30') ],
- [ 32, heiligenkreuz,[0,5], rapid, Time.cet('2012-07-15 18:00') ]
-]
-
-games_cuprunde2 = [
- [ 1, kalsdorf, [3,0], hartberg, Time.cet('2012-09-24 19:00') ],
- [ 2, viktoria, [2,2,3,3,7,4], ksv, Time.cet('2012-09-25 16:00') ],
- [ 3, hard, [0,3], altach, Time.cet('2012-09-25 16:30') ],
- [ 4, stegersbach, [1,3], salzburg, Time.cet('2012-09-25 18:00') ],
- [ 5, pasching, [1,1,3,2], austrial, Time.cet('2012-09-25 19:00') ],
- [ 6, austriak, [0,0,2,0], admira, Time.cet('2012-09-25 19:00') ],
- [ 7, schwechat, [0,5], sturm, Time.cet('2012-09-25 19:00') ],
- [ 8, lask, [2,0], groedig, Time.cet('2012-09-25 19:00') ],
- [ 9, stjohann, [0,3], lustenau, Time.cet('2012-09-25 19:00') ],
- [ 10, sollenau, [1,1,1,5], wacker, Time.cet('2012-09-25 19:00') ],
- [ 11, vsv, [3,1], neustadt, Time.cet('2012-09-25 19:00') ],
- [ 12, dornbirn, [2,3], austria, Time.cet('2012-09-25 20:30') ],
- [ 13, badvoeslau, [2,3], mattersburg, Time.cet('2012-09-26 16:00') ],
- [ 14, stflorian, [1,1,1,1,5,6], ried, Time.cet('2012-09-26 19:00') ],
- [ 15, allerheiligen, [1,4], rapid, Time.cet('2012-09-26 19:00') ],
- [ 16, gak, [0,6], wac, Time.cet('2012-09-26 20:20') ]
-]
-
-games_cup16 = [
- [ 1, lask, [], mattersburg, Time.cet('2012-10-30 00:00') ],
- [ 2, rapid, [], altach, Time.cet('2012-10-30 00:00') ],
- [ 3, viktoria, [], ried, Time.cet('2012-10-30 00:00') ],
- [ 4, sturm, [], wacker, Time.cet('2012-10-30 00:00') ],
- [ 5, pasching, [], austriak, Time.cet('2012-10-30 00:00') ],
- [ 6, lustenau, [], wac, Time.cet('2012-10-30 00:00') ],
- [ 7, kalsdorf, [], salzburg, Time.cet('2012-10-30 00:00') ],
- [ 8, vsv, [], austria, Time.cet('2012-10-30 00:00') ]]
-
-
-Game.create_knockouts_from_ary!( games_cuprunde1, cuprunde1 )
-Game.create_knockouts_from_ary!( games_cuprunde2, cuprunde2 )
-Game.create_knockouts_from_ary!( games_cup16, cup16 )
-
-
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.austria.cup.2012/13.version', :value => '1' )
View
108 db/seeds/austria/teams.rb
@@ -1,99 +1,39 @@
# encoding: utf-8
-puts "*** loading seed data in seeds/austria/teams.rb"
+### add/update images to teams
bl = [
- [ 'salzburg', 'FC RB Salzburg', 'RBS', 'at/salzburg.png' ],
- [ 'rapid', 'SK Rapid Wien', 'RAP', 'at/rapid.png' ],
- [ 'admira', 'FC Admira Wacker', 'ADM', 'at/admira.png' ],
- [ 'austria', 'FK Austria Wien', 'FAK', 'at/austria.png' ],
- [ 'sturm', 'SK Sturm Graz', 'STU', 'at/sturm.png' ],
- [ 'ried', 'SV Ried', 'RIE', 'at/ried.png' ],
- [ 'wacker', 'FC Wacker Innsbruck', 'IBK', 'at/wacker.png' ],
- [ 'mattersburg', 'SV Mattersburg', 'SVM', 'at/mattersburg.png' ],
- [ 'neustadt', 'SC Wiener Neustadt', 'WRN', 'at/neustadt.png' ],
- [ 'wac', 'Wolfsberger AC', 'WAC', 'at/wac.png' ]
+ [ 'salzburg', 'at/salzburg.png' ],
+ [ 'rapid', 'at/rapid.png' ],
+ [ 'admira', 'at/admira.png' ],
+ [ 'austria', 'at/austria.png' ],
+ [ 'sturm', 'at/sturm.png' ],
+ [ 'ried', 'at/ried.png' ],
+ [ 'wacker', 'at/wacker.png' ],
+ [ 'mattersburg', 'at/mattersburg.png' ],
+ [ 'neustadt', 'at/neustadt.png' ],
+ [ 'wac', 'at/wac.png' ]
]
ersteliga = [
- [ 'ksv', 'Kapfenberger SV 1919', 'Erste Liga/Stmk.', 'KSV', 'at/ksv.png' ],
- [ 'altach', 'SCR Altach', 'Erste Liga/Vbg.', 'ALT', 'at/altach.png' ],
- [ 'austrial', 'SC Austria Lustenau', 'Erste Liga/Vbg.', 'LUS', 'at/austrial.png' ],
- [ 'stpoelten', 'SKN St. Pölten', 'Erste Liga/NÖ', 'POE', 'at/stpoelten.png' ],
- [ 'linz', 'FC Blau-Weiß Linz', 'Erste Liga/OÖ', 'BWL', 'at/linz.png' ],
- [ 'groedig', 'SV Grödig', 'Erste Liga/Sbg.', 'GRO', 'at/groedig.png' ],
- [ 'lustenau', 'FC Lustenau 1907', 'Erste Liga/Vbg.', 'LUS', 'at/lustenau.png' ],
- [ 'vienna', 'Vienna FC 1894', 'Erste Liga/Wien', 'VIE', 'at/vienna.png' ],
- [ 'hartberg', 'TSV Hartberg', 'Erste Liga/Stmk.', 'HAR', 'at/hartberg.png' ],
- [ 'horn', 'SV Horn', 'Erste Liga/NÖ', 'HOR', 'at/horn.png' ]
+ [ 'ksv', 'at/ksv.png' ],
+ [ 'altach', 'at/altach.png' ],
+ [ 'austrial', 'at/austrial.png' ],
+ [ 'stpoelten', 'at/stpoelten.png' ],
+ [ 'linz', 'at/linz.png' ],
+ [ 'groedig', 'at/groedig.png' ],
+ [ 'lustenau', 'at/lustenau.png' ],
+ [ 'vienna', 'at/vienna.png' ],
+ [ 'hartberg', 'at/hartberg.png' ],
+ [ 'horn', 'at/horn.png' ]
]
-rlwest = [
- [ 'hard', 'FC Hard', 'Regionalliga West/Vbg.', 'HAR' ],
- [ 'bregenz', 'SC Bregenz', 'Regionalliga West/Vbg.', 'BRE' ],
- [ 'dornbirn', 'FC Dornbirn 1913', 'Regionalliga West/Vbg.', 'DOR' ],
- [ 'kufstein', 'FC Kufstein', 'Regionalliga West/Tirol', 'KUF' ],
- [ 'wattens', 'WSG Wattens', 'Regionalliga West/Tirol', 'WAT' ],
- [ 'austrias', 'SV Austria Salzburg', 'Regionalliga West/Sbg.', 'AUS' ],
- [ 'pinzgau', 'FC Pinzgau Saalfelden', 'Regionalliga West/Sbg.', 'PIN' ],
- [ 'stjohann', 'TSV St. Johann', 'Regionalliga West/Sbg.', 'STJ' ]
-]
-
-rlmitte = [
- [ 'vsv' , 'Villacher SV', 'Regionalliga Mitte/Ktn.', 'VSV' ],
- [ 'klagenfurt', 'SAK Celovec/Klagenfurt', 'Regionalliga Mitte/Ktn.', 'CEL' ],
- [ 'austriak', 'SK Austria Klagenfurt', 'Regionalliga Mitte/Ktn.', 'KLA' ],
- [ 'kalsdorf', 'SC Kalsdorf', 'Regionalliga Mitte/Stmk.', 'KAL' ],
- [ 'gratkorn', 'FC Gratkorn', 'Regionalliga Mitte/Stmk.', 'GRA' ],
- [ 'allerheiligen', 'SV Allerheiligen', 'Regionalliga Mitte/Stmk.', 'ALL' ],
- [ 'leoben', 'DSV Leoben', 'Regionalliga Mitte/Stmk.', 'LEO' ],
- [ 'gak', 'Grazer AK', 'Regionalliga Mitte/Stmk.', 'GAK' ],
- [ 'pasching', 'FC Pasching', 'Regionalliga Mitte/OÖ', 'PAS' ],
- [ 'voecklamarkt', 'Vöcklamarkt', 'Regionalliga Mitte/OÖ', 'VOE' ],
- [ 'stflorian', 'St. Florian', 'Regionalliga Mitte/OÖ', 'STF' ],
- [ 'wallern', 'Wallern', 'Regionalliga Mitte/OÖ', 'WAL' ],
- [ 'lask', 'LASK Linz', 'Regionalliga Mitte/OÖ', 'LAS' ]
-]
-
-rlost = [
- [ 'sollenau', '1. SC Sollenau', 'Regionalliga Ost/OÖ', 'SOL' ],
- [ 'amstetten', 'SKU Amstetten', 'Regionalliga Ost/NÖ', 'AMS' ],
- [ 'retz', 'SV Retz', 'Regionalliga Ost/NÖ', 'RET' ],
- [ 'fac' , 'FAC Team für Wien', 'Regionalliga Ost/Wien', 'FAC' ],
- [ 'schwechat', 'SV Schwechat', 'Regionalliga Ost/Wien', 'SCH' ],
- [ 'wienersk', 'Wiener SK', 'Regionalliga Ost/Wien', 'WIE' ],
- [ 'ostbahn', 'SC Ostbahn XI', 'Regionalliga Ost/Wien', 'OST' ],
- [ 'oberwart', 'SV Oberwart', 'Regionalliga Ost/Bgld.', 'OBE' ],
- [ 'parndorf', 'SC/ESV Parndorf 1919', 'Regionalliga Ost/Bgld.', 'PAR' ],
- [ 'stegersbach', 'SV Stegersbach', 'Regionalliga Ost/Bgld.', 'STE' ]
-]
-
-misc = [
- [ 'wolfurt', 'FC Wolfurt', 'Vorarlberg Liga', 'WOL' ],
- [ 'schwaz', 'SC Schwaz', 'Tirol Liga', 'SCH' ],
- [ 'reutte', 'SV Reutte', 'Tirol Liga', 'REU' ],
- [ 'spittal', 'SV Spittal/Drau', 'Kärntner Liga', 'SPI' ],
- [ 'sak', 'SAK 1914', 'Salzburger Liga', 'SAK' ],
- [ 'dsc', 'Deutschlandsberger SC', 'Landesliga/Stmk.', 'DSC' ],
- [ 'micheldorf', 'SV Micheldorf', 'OÖ Liga', 'MIC' ],
- [ 'badvoeslau', 'ASK Bad Vöslau', 'Landesliga/NÖ', 'VOE' ],
- [ 'gaflenz', 'SV Gaflenz', 'Landesliga/NÖ', 'GAF' ],
- [ 'ardagger', 'Ardagger SCU', 'Landesliga/NÖ', 'ARD' ],
- [ 'rohrendorf', 'SC Rohrendorf', '2. Landesliga West/NÖ', 'ROH' ],
- [ 'heiligenkreuz', 'SV Heiligenkreuz', '2. Liga Süd/NÖ', 'HEI' ],
- [ 'viktoria', 'Wiener Viktoria', 'Wiener Stadtliga', 'VIK' ],
- [ 'juniors', 'FC RB Juniors Salzburg' ]
-]
-Team.create_from_ary!( bl )
-Team.create_from_ary!( ersteliga )
-Team.create_from_ary!( rlwest )
-Team.create_from_ary!( rlmitte )
-Team.create_from_ary!( rlost )
-Team.create_from_ary!( misc )
+Team.update_image_from_ary!( bl )
+Team.update_image_from_ary!( ersteliga )
## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.austria.teams.version', :value => '1' )
+Prop.create!( :key => 'db.at.teams.2.version', :value => '1' )
View
88 db/seeds/cl/2011_12/cl.rb
@@ -1,88 +1,14 @@
# encoding: utf-8
-# note: timezone for games (play_at) is *always* CET (central european time)
-
-#################################
-## Champions League 2011/12
## note :team3 => false CL has no 3rd place (only final game)
-cl = Event.create!( :key => 'cl',
- :title => 'Champions League 2011/12',
- :team3 => false,
- :start_at => Time.cet( '2011-10-10 17:00' ) )
-
-inter = Team.find_by_key!( 'inter' )
-marseille = Team.find_by_key!( 'marseille' )
-bayern = Team.find_by_key!( 'bayern' )
-basel = Team.find_by_key!( 'basel' )
-
-chelsea = Team.find_by_key!( 'chelsea' )
-napoli = Team.find_by_key!( 'napoli' )
-madrid = Team.find_by_key!( 'madrid' )
-moskva = Team.find_by_key!( 'moskva' )
-
-milan = Team.find_by_key!( 'milan' )
-benfica = Team.find_by_key!( 'benfica' )
-barcelona = Team.find_by_key!( 'barcelona' )
-apoel = Team.find_by_key!( 'apoel' )
-
-cl.teams << milan
-cl.teams << benfica
-cl.teams << barcelona
-cl.teams << apoel
-
-cl.teams << chelsea
-cl.teams << madrid
-cl.teams << marseille
-cl.teams << bayern
-
-
-cl16 = Round.create!( :event => cl, :pos => 1, :title => 'Achtelfinale' )
-cl16_2 = Round.create!( :event => cl, :pos => 2, :title => 'Achtelfinale Rückspiele' )
-cl8 = Round.create!( :event => cl, :pos => 3, :title => 'Viertelfinale', :title2 => '27.+28. März 2012' )
-cl8_2 = Round.create!( :event => cl, :pos => 4, :title => 'Viertelfinale Rückspiele', :title2 => '3.+4. April 2012' )
-cl4 = Round.create!( :event => cl, :pos => 5, :title => 'Halbfinale', :title2 => '17.+18. April 2012' )
-cl4_2 = Round.create!( :event => cl, :pos => 6, :title => 'Halbfinale Rückspiele', :title2 => '24.+25. April 2012' )
-cl1 = Round.create!( :event => cl, :pos => 7, :title => 'Finale', :title2 => '19. Mai 2012' )
-
-
-games_cl16 = [
- [[ 1, napoli, [3, 1], chelsea, Time.cet('2012-02-21 20:45') ],
- [ 3, chelsea, [3, 1, 4, 1], napoli, Time.cet('2012-03-14 20:45') ]],
- [[ 2, moskva, [1, 1], madrid, Time.cet('2012-02-21 20:45') ],
- [ 4, madrid, [4, 1], moskva, Time.cet('2012-03-14 20:45') ]],
- [[ 3, marseille, [1, 0], inter, Time.cet('2012-02-22 20:45') ],
- [ 1, inter, [2, 1], marseille, Time.cet('2012-03-13 20:45') ]],
- [[ 4, basel, [1, 0], bayern, Time.cet('2012-02-22 20:45') ],
- [ 2, bayern, [7, 0], basel, Time.cet('2012-03-13 20:45') ]]
-]
-
-games_cl8 = [
- [[ 1, apoel, [0, 3], madrid, Time.cet('2012-03-27 20:45') ],
- [ 4, madrid, [5, 2], apoel, Time.cet('2012-04-04 20:45') ]],
- [[ 2, benfica, [0, 1], chelsea, Time.cet('2012-03-27 20:45') ],
- [ 3, chelsea, [2, 1], benfica, Time.cet('2012-04-04 20:45') ]],
- [[ 3, marseille, [0, 2], bayern, Time.cet('2012-03-28 20:45') ],
- [ 2, bayern, [2, 0], marseille, Time.cet('2012-04-03 20:45') ]],
- [[ 4, milan, [0, 0], barcelona, Time.cet('2012-03-28 20:45') ],
- [ 1, barcelona, [3, 1], milan, Time.cet('2012-04-03 20:45') ]]
-]
-
-games_cl4 = [
- [[ 1, bayern, [2, 1], madrid, Time.cet('2012-04-17 20:45') ],
- [ 2, madrid, [2, 1, 2, 1, 3, 4], bayern, Time.cet('2012-04-25 20:45') ]],
- [[ 2, chelsea, [1, 0], barcelona, Time.cet('2012-04-18 20:45') ],
- [ 1, barcelona , [2, 2], chelsea, Time.cet('2012-04-24 20:45') ]]
-]
-
-games_cl1 = [
- [ 1, bayern, [1,1,1,1,3,4], chelsea, Time.cet('2012-05-19 20:45') ]]
+##
+## fix: team3 => false
+# cl = Event.create!( :key => 'cl',
+# :title => 'Champions League 2011/12',
+# :team3 => false,
+# :start_at => Time.cet( '2011-10-10 17:00' ) )
-Game.create_knockout_pairs_from_ary!( games_cl16, cl16, cl16_2 )
-Game.create_knockout_pairs_from_ary!( games_cl8, cl8, cl8_2 )
-Game.create_knockout_pairs_from_ary!( games_cl4, cl4, cl4_2 )
-Game.create_knockouts_from_ary!( games_cl1, cl1 )
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.cl.2011/12.version', :value => '1' )
+Prop.create!( :key => 'db.cl.2011/12.2.version', :value => '1' )
View
72 db/seeds/cl/2011_12/el.rb
@@ -1,65 +1,11 @@
# encoding: utf-8
-# note: timezone for games (play_at) is *always* CET (central european time)
-
-#################################
-## Europa League 2012
-
-el = Event.create!( :key => 'el',
- :title => 'Europa League 2011/12',
- :team3 => false,
- :start_at => Time.cet( '2011-10-10 17:00' ))
-
-az = Team.find_by_key!( 'az' )
-valencia = Team.find_by_key!( 'valencia' )
-schalke = Team.find_by_key!( 'schalke' )
-athletic = Team.find_by_key!( 'athletic' )
-sporting = Team.find_by_key!( 'sporting' )
-metalist = Team.find_by_key!( 'metalist' )
-atletico = Team.find_by_key!( 'atletico' )
-hannover = Team.find_by_key!( 'hannover' )
-
-el.teams << az
-el.teams << valencia
-el.teams << schalke
-el.teams << athletic
-el.teams << sporting
-el.teams << metalist
-el.teams << atletico
-el.teams << hannover
-
-el8 = Round.create!( :event => el, :pos => 1, :title => 'Viertelfinale', :title2 => '29. März 2012' )
-el8_2 = Round.create!( :event => el, :pos => 2, :title => 'Viertelfinale Rückspiele', :title2 => '5. April 2012' )
-el4 = Round.create!( :event => el, :pos => 3, :title => 'Halbfinale', :title2 => '19. April 2012' )
-el4_2 = Round.create!( :event => el, :pos => 4, :title => 'Halbfinale Rückspiele', :title2 => '26. April 2012' )
-el1 = Round.create!( :event => el, :pos => 5, :title => 'Finale', :title2 => '9. Mai 2012' )
-
-
-games_el8 = [
- [[ 1, az, [2, 1], valencia, Time.cet('2012-03-29 21:05') ],
- [ 1, valencia, [4, 0], az, Time.cet('2012-04-05 21:05') ]],
- [[ 2, schalke, [2, 4], athletic, Time.cet('2012-03-29 21:05') ],
- [ 2, athletic, [2, 2], schalke, Time.cet('2012-04-05 21:05') ]],
- [[ 3, sporting, [2, 1], metalist, Time.cet('2012-03-29 21:05') ],
- [ 3, metalist, [1, 1], sporting, Time.cet('2012-04-05 21:05') ]],
- [[ 4, atletico, [2, 1], hannover, Time.cet('2012-03-29 21:05') ],
- [ 4, hannover, [1, 2], atletico, Time.cet('2012-04-05 21:05') ]]
-]
-
-games_el4 = [
- [[ 1, atletico, [4, 2], valencia, Time.cet('2012-04-19 21:05') ],
- [ 1, valencia, [0, 1], atletico, Time.cet('2012-04-26 21:05') ]],
- [[ 2, sporting, [2, 1], athletic, Time.cet('2012-04-19 21:05') ],
- [ 2, athletic, [3, 1], sporting, Time.cet('2012-04-26 21:05') ]]
-]
-
-games_el1 = [
- [ 1, atletico, [3, 0], athletic, Time.cet('2012-05-09 20:45') ]]
-
-
-Game.create_knockout_pairs_from_ary!( games_el8, el8, el8_2 )
-Game.create_knockout_pairs_from_ary!( games_el4, el4, el4_2 )
-Game.create_knockouts_from_ary!( games_el1, el1 )
-
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.el.2011/12.version', :value => '1' )
+##
+## fix: team3 => false
+#
+#el = Event.create!( :key => 'el',
+# :title => 'Europa League 2011/12',
+# :team3 => false,
+# :start_at => Time.cet( '2011-10-10 17:00' ))
+
+Prop.create!( :key => 'db.el.2011/12.2.version', :value => '1' )
View
323 db/seeds/cl/2012_13/cl.rb
@@ -1,325 +1,14 @@
# encoding: utf-8
-# note: timezone for games (play_at) is *always* CET (central european time)
-#################################
-## Champions League 2012/13
+# todo/fix: team3 => false
## note :team3 => false CL has no 3rd place (only final game)
-cl = Event.create!( :key => 'cl.2012/13',
- :title => 'Champions League 2012/13',
- :team3 => false,
- :start_at => Time.cet( '2012-09-18 18:30' ) )
+#cl = Event.create!( :key => 'cl.2012/13',
+# :title => 'Champions League 2012/13',
+# :team3 => false,
+# :start_at => Time.cet( '2012-09-18 18:30' ) )
-porto = Team.find_by_key!( 'porto' )
-kiew = Team.find_by_key!( 'kiew' )
-paris = Team.find_by_key!( 'paris' )
-zagreb = Team.find_by_key!( 'zagreb' )
-arsenal = Team.find_by_key!( 'arsenal' )
-schalke = Team.find_by_key!( 'schalke' )
-olympiacos = Team.find_by_key!( 'olympiacos' )
-montpellier = Team.find_by_key!( 'montpellier' )
-milan = Team.find_by_key!( 'milan' )
-zenit = Team.find_by_key!( 'zenit' )
-anderlecht = Team.find_by_key!( 'anderlecht' )
-malaga = Team.find_by_key!( 'malaga' )
-
-madrid = Team.find_by_key!( 'madrid' )
-mancity = Team.find_by_key!( 'mancity' )
-ajax = Team.find_by_key!( 'ajax' )
-dortmund = Team.find_by_key!( 'dortmund' )
-
-chelsea = Team.find_by_key!( 'chelsea' )
-donezk = Team.find_by_key!( 'donezk' )
-juventus = Team.find_by_key!( 'juventus' )
-nordsjalland = Team.find_by_key!( 'nordsjalland' )
-
-bayern = Team.find_by_key!( 'bayern' )
-valencia = Team.find_by_key!( 'valencia' )
-lille = Team.find_by_key!( 'lille' )
-borissow = Team.find_by_key!( 'borissow' )
-
-barcelona = Team.find_by_key!( 'barcelona' )
-benfica = Team.find_by_key!( 'benfica' )
-spartak = Team.find_by_key!( 'spartak' )
-celtic = Team.find_by_key!( 'celtic' )
-
-manunited = Team.find_by_key!( 'manunited' )
-braga = Team.find_by_key!( 'braga' )
-galatasaray = Team.find_by_key!( 'galatasaray' )
-cluj = Team.find_by_key!( 'cluj' )
-
-
-
-cl.teams << porto
-cl.teams << kiew
-cl.teams << paris
-cl.teams << zagreb
-
-cl.teams << arsenal
-cl.teams << schalke
-cl.teams << olympiacos
-cl.teams << montpellier
-
-cl.teams << milan
-cl.teams << zenit
-cl.teams << anderlecht
-cl.teams << malaga
-
-cl.teams << madrid
-cl.teams << mancity
-cl.teams << ajax
-cl.teams << dortmund
-
-cl.teams << chelsea
-cl.teams << donezk
-cl.teams << juventus
-cl.teams << nordsjalland
-
-cl.teams << bayern
-cl.teams << valencia
-cl.teams << lille
-cl.teams << borissow
-
-cl.teams << barcelona
-cl.teams << benfica
-cl.teams << spartak
-cl.teams << celtic
-
-cl.teams << manunited
-cl.teams << braga
-cl.teams << galatasaray
-cl.teams << cluj
-
-
-cla = Group.create!( :event => cl, :pos => 1, :title => 'Gruppe A' )
-clb = Group.create!( :event => cl, :pos => 2, :title => 'Gruppe B' )
-clc = Group.create!( :event => cl, :pos => 3, :title => 'Gruppe C' )
-cld = Group.create!( :event => cl, :pos => 4, :title => 'Gruppe D' )
-cle = Group.create!( :event => cl, :pos => 5, :title => 'Gruppe E' )
-clf = Group.create!( :event => cl, :pos => 6, :title => 'Gruppe F' )
-clg = Group.create!( :event => cl, :pos => 7, :title => 'Gruppe G' )
-clh = Group.create!( :event => cl, :pos => 8, :title => 'Gruppe H' )
-
-#################################
-# Gruppe A
-
-cla.teams << porto
-cla.teams << kiew
-cla.teams << paris
-cla.teams << zagreb
-
-
-#################################
-# Gruppe B
-
-clb.teams << arsenal
-clb.teams << schalke
-clb.teams << olympiacos
-clb.teams << montpellier
-
-
-#################################
-# Gruppe C
-
-clc.teams << milan
-clc.teams << zenit
-clc.teams << anderlecht
-clc.teams << malaga
-
-#################################
-# Gruppe D
-
-cld.teams << madrid
-cld.teams << mancity
-cld.teams << ajax
-cld.teams << dortmund
-
-
-#################################
-# Gruppe E
-
-cle.teams << chelsea
-cle.teams << donezk
-cle.teams << juventus
-cle.teams << nordsjalland
-
-
-#################################
-# Gruppe F
-
-clf.teams << bayern
-clf.teams << valencia
-clf.teams << lille
-clf.teams << borissow
-
-
-#################################
-# Gruppe G
-
-clg.teams << barcelona
-clg.teams << benfica
-clg.teams << spartak
-clg.teams << celtic
-
-
-#################################
-# Gruppe H
-
-clh.teams << manunited
-clh.teams << braga
-clh.teams << galatasaray
-clh.teams << cluj
-
-
-clr1 = Round.create!( :event => cl, :pos => 1, :title => 'Spieltag 1', :title2 => 'Di./Mi., 18.+19. Sep 2012' )
-clr2 = Round.create!( :event => cl, :pos => 2, :title => 'Spieltag 2', :title2 => 'Di./Mi., 2.+3. Okt 2012' )
-clr3 = Round.create!( :event => cl, :pos => 3, :title => 'Spieltag 3', :title2 => 'Di./Mi., 23.+24. Okt 2012' )
-clr4 = Round.create!( :event => cl, :pos => 4, :title => 'Spieltag 4', :title2 => 'Di./Mi., 6.+7. Nov 2012' )
-clr5 = Round.create!( :event => cl, :pos => 5, :title => 'Spieltag 5', :title2 => 'Di./Mi., 20.+21. Nov 2012' )
-clr6 = Round.create!( :event => cl, :pos => 6, :title => 'Spieltag 6', :title2 => 'Di./Mi., 4.+5. Dez 2012' )
-
-cl16 = Round.create!( :event => cl, :pos => 7, :title => 'Achtelfinale', :title2 => 'Di./Mi., 12.+13./19.+20. Feb 2013' )
-cl16_2 = Round.create!( :event => cl, :pos => 8, :title => 'Achtelfinale Rückspiele', :title2 => 'Di./Mi., 5.+6./12.+13. Mär 2013' )
-cl8 = Round.create!( :event => cl, :pos => 9, :title => 'Viertelfinale', :title2 => 'Di./Mi., 2.+3. Apr 2013' )
-cl8_2 = Round.create!( :event => cl, :pos => 10, :title => 'Viertelfinale Rückspiele', :title2 => 'Di./Mi., 9.+10. Apr 2013' )
-cl4 = Round.create!( :event => cl, :pos => 11, :title => 'Halbfinale', :title2 => 'Di./Mi., 23.+24. Apr 2013' )
-cl4_2 = Round.create!( :event => cl, :pos => 12, :title => 'Halbfinale Rückspiele', :title2 => 'Di./Mi., 30. Apr/1. Mai 2013' )
-cl1 = Round.create!( :event => cl, :pos => 13, :title => 'Finale', :title2 => 'Sa. 25. Mai 2013' )
-
-
-games_cla = [
- [[ 1, zagreb, [0,2], porto, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 2, porto, [], zagreb, Time.cet('2012-11-21 20:45'), clr5 ]],
- [[ 2, paris, [4,1], kiew, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 1, kiew, [], paris, Time.cet('2012-11-21 20:45'), clr5 ]],
- [[ 1, kiew, [2,0], zagreb, Time.cet('2012-10-03 20:45'), clr2 ],
- [ 2, zagreb, [], kiew, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 2, porto, [1,0], paris, Time.cet('2012-10-03 20:45'), clr2 ],
- [ 1, paris, [], porto, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 1, porto, [], kiew, Time.cet('2012-10-24 20:45'), clr3 ],
- [ 1, kiew, [], porto, Time.cet('2012-11-06 20:45'), clr4 ]],
- [[ 2, zagreb, [], paris, Time.cet('2012-10-24 20:45'), clr3 ],
- [ 2, paris, [], zagreb, Time.cet('2012-11-06 20:45'), clr4 ]]
-]
-
-games_clb = [
- [[ 3, montpellier, [1,2], arsenal, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 4, arsenal, [], montpellier, Time.cet('2012-11-21 20:45'), clr5 ]],
- [[ 4, olympiacos, [1,2], schalke, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 3, schalke, [], olympiacos, Time.cet('2012-11-21 20:45'), clr5 ]],
- [[ 3, arsenal, [3,1], olympiacos, Time.cet('2012-10-03 20:45'), clr2 ],
- [ 3, olympiacos, [], arsenal, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 4, schalke, [2,2], montpellier, Time.cet('2012-10-03 20:45'), clr2 ],
- [ 4, montpellier, [], schalke, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 3, arsenal, [], schalke, Time.cet('2012-10-24 20:45'), clr3 ],
- [ 3, schalke, [], arsenal, Time.cet('2012-11-06 20:45'), clr4 ]],
- [[ 4, montpellier, [], olympiacos, Time.cet('2012-10-24 20:45'), clr3 ],
- [ 4, olympiacos, [], montpellier, Time.cet('2012-11-06 20:45'), clr4 ]]
-]
-
-games_clc = [
- [[ 5, malaga, [3,0], zenit, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 5, zenit, [], malaga, Time.cet('2012-11-21 18:00'), clr5 ]],
- [[ 6, milan, [0,0], anderlecht, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 6, anderlecht, [], milan, Time.cet('2012-11-21 20:45'), clr5 ]],
- [[ 5, zenit, [2,3], milan, Time.cet('2012-10-03 18:00'), clr2 ],
- [ 5, milan, [], zenit, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 6, anderlecht, [0,3], malaga, Time.cet('2012-10-03 20:45'), clr2 ],
- [ 6, malaga, [], anderlecht, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 5, zenit, [], anderlecht, Time.cet('2012-10-24 18:00'), clr3 ],
- [ 5, anderlecht, [], zenit, Time.cet('2012-11-06 20:45'), clr4 ]],
- [[ 6, malaga, [], milan, Time.cet('2012-10-24 20:45'), clr3 ],
- [ 6, milan, [], malaga, Time.cet('2012-11-06 20:45'), clr4 ]]
-]
-
-games_cld = [
- [[ 7, madrid, [3,2], mancity, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 7, mancity, [], madrid, Time.cet('2012-11-21 20:45'), clr5 ]],
- [[ 8, dortmund, [1,0], ajax, Time.cet('2012-09-18 20:45'), clr1 ],
- [ 8, ajax, [], dortmund, Time.cet('2012-11-21 20:45'), clr5 ]],
- [[ 7, ajax, [1,4], madrid, Time.cet('2012-10-03 20:45'), clr2 ],
- [ 8, madrid, [], ajax, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 8, mancity, [1,1], dortmund, Time.cet('2012-10-03 20:45'), clr2 ],
- [ 7, dortmund, [], mancity, Time.cet('2012-12-04 20:45'), clr6 ]],
- [[ 7, dortmund, [], madrid, Time.cet('2012-10-24 20:45'), clr3 ],
- [ 8, madrid, [], dortmund, Time.cet('2012-11-06 20:45'), clr4 ]],
- [[ 8, ajax, [], mancity, Time.cet('2012-10-24 20:45'), clr3 ],
- [ 7, mancity, [], ajax, Time.cet('2012-11-06 20:45'), clr4 ]]
-]
-
-
-games_cle = [
- [[ 9, chelsea, [2,2], juventus, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 9, juventus, [], chelsea, Time.cet('2012-11-20 20:45'), clr5 ]],
- [[ 10, donezk, [2,0], nordsjalland, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 10, nordsjalland, [], donezk, Time.cet('2012-11-20 20:45'), clr5 ]],
- [[ 9, nordsjalland, [0,4], chelsea, Time.cet('2012-10-02 20:45'), clr2 ],
- [ 9, chelsea, [], nordsjalland, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 10, juventus, [1,1], donezk, Time.cet('2012-10-02 20:45'), clr2 ],
- [ 10, donezk, [], juventus, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 9, donezk, [], chelsea, Time.cet('2012-10-23 20:45'), clr3 ],
- [ 9, chelsea, [], donezk, Time.cet('2012-11-07 20:45'), clr4 ]],
- [[ 10, nordsjalland, [], juventus, Time.cet('2012-10-23 20:45'), clr3 ],
- [ 10, juventus, [], nordsjalland, Time.cet('2012-11-07 20:45'), clr4 ]]
-]
-
-games_clf = [
- [[ 11, bayern, [2,1], valencia, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 11, valencia, [], bayern, Time.cet('2012-11-20 20:45'), clr5 ]],
- [[ 12, lille, [1,3], borissow, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 12, borissow, [], lille, Time.cet('2012-11-20 20:45'), clr5 ]],
- [[ 11, borissow, [3,1], bayern, Time.cet('2012-10-02 20:45'), clr2 ],
- [ 12, bayern, [], borissow, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 12, valencia, [2,0], lille, Time.cet('2012-10-02 20:45'), clr2 ],
- [ 11, lille, [], valencia, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 11, lille, [], bayern, Time.cet('2012-10-23 20:45'), clr3 ],
- [ 11, bayern, [], lille, Time.cet('2012-11-07 20:45'), clr4 ]],
- [[ 12, borissow, [], valencia, Time.cet('2012-10-23 20:45'), clr3 ],
- [ 12, valencia, [], borissow, Time.cet('2012-11-07 20:45'), clr4 ]]
-]
-
-games_clg = [
- [[ 13, celtic, [0,0], benfica, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 14, benfica, [], celtic, Time.cet('2012-11-20 20:45'), clr5 ]],
- [[ 14, barcelona, [3,2], spartak, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 13, spartak, [], barcelona, Time.cet('2012-11-20 18:00'), clr5 ]],
- [[ 13, spartak, [2,3], celtic, Time.cet('2012-10-02 18:00'), clr2 ],
- [ 14, celtic, [], spartak, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 14, benfica, [0,2], barcelona, Time.cet('2012-10-02 20:45'), clr2 ],
- [ 13, barcelona, [], benfica, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 13, spartak, [], benfica, Time.cet('2012-10-23 18:00'), clr3 ],
- [ 14, benfica, [], spartak, Time.cet('2012-11-07 20:45'), clr4 ]],
- [[ 14, barcelona, [], celtic, Time.cet('2012-10-23 20:45'), clr3 ],
- [ 13, celtic, [], barcelona, Time.cet('2012-11-07 20:45'), clr4 ]]
-]
-
-games_clh = [
- [[ 15, manunited, [1,0], galatasaray, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 15, galatasaray, [], manunited, Time.cet('2012-11-20 20:45'), clr5 ]],
- [[ 16, braga, [0,2], cluj, Time.cet('2012-09-19 20:45'), clr1 ],
- [ 16, cluj, [], braga, Time.cet('2012-11-20 20:45'), clr5 ]],
- [[ 15, cluj, [1,2], manunited, Time.cet('2012-10-02 20:45'), clr2 ],
- [ 16, manunited, [], cluj, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 16, galatasaray, [0,2], braga, Time.cet('2012-10-02 20:45'), clr2 ],
- [ 15, braga, [], galatasaray, Time.cet('2012-12-05 20:45'), clr6 ]],
- [[ 15, manunited, [], braga, Time.cet('2012-10-23 20:45'), clr3 ],
- [ 15, braga, [], manunited, Time.cet('2012-11-07 20:45'), clr4 ]],
- [[ 16, galatasaray, [], cluj, Time.cet('2012-10-23 20:45'), clr3 ],
- [ 16, cluj, [], galatasaray, Time.cet('2012-11-07 20:45'), clr4 ]]
-]
-
-Game.create_pairs_from_ary_for_group!( games_cla, cla )
-Game.create_pairs_from_ary_for_group!( games_clb, clb )
-Game.create_pairs_from_ary_for_group!( games_clc, clc )
-Game.create_pairs_from_ary_for_group!( games_cld, cld )
-Game.create_pairs_from_ary_for_group!( games_cle, cle )
-Game.create_pairs_from_ary_for_group!( games_clf, clf )
-Game.create_pairs_from_ary_for_group!( games_clg, clg )
-Game.create_pairs_from_ary_for_group!( games_clh, clh )
-
-
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.cl.2012/13.version', :value => '1' )
+Prop.create!( :key => 'db.cl.2012/13.2.version', :value => '1' )
View
95 db/seeds/cl/teams.rb
@@ -2,67 +2,66 @@
teams = [
- [ 'porto', 'FC Porto', 'cl/porto.png' ],
- [ 'kiew', 'Dynamo Kiew', 'cl/kiew.png' ],
- [ 'paris', 'Paris St. Germain', 'cl/paris.png' ],
- [ 'zagreb', 'Dinamo Zagreb', 'cl/zagreb.png' ],
+ [ 'porto' 'cl/porto.png' ],
+ [ 'kiew', 'cl/kiew.png' ],
+ [ 'paris', 'cl/paris.png' ],
+ [ 'zagreb', 'cl/zagreb.png' ],
- [ 'arsenal', 'FC Arsenal', 'cl/arsenal.png' ],
- [ 'schalke', 'FC Schalke 04', 'cl/schalke.png' ],
- [ 'olympiacos', 'Olympiakos Piräus', 'cl/olympiacos.png' ],
- [ 'montpellier', 'HSC Montpellier', 'cl/montpellier.png' ],
+ [ 'arsenal', 'cl/arsenal.png' ],
+ [ 'schalke', 'cl/schalke.png' ],
+ [ 'olympiacos', 'cl/olympiacos.png' ],
+ [ 'montpellier', 'cl/montpellier.png' ],
- [ 'milan', 'AC Mailand', 'cl/milan.png' ],
- [ 'zenit', 'Zenit St. Petersburg', 'cl/zenit.png' ],
- [ 'anderlecht', 'RSC Anderlecht', 'cl/anderlecht.png' ],
- [ 'malaga', 'FC Málaga', 'cl/malaga.png' ],
+ [ 'milan', 'cl/milan.png' ],
+ [ 'zenit', 'cl/zenit.png' ],
+ [ 'anderlecht', 'cl/anderlecht.png' ],
+ [ 'malaga', 'cl/malaga.png' ],
- [ 'madrid', 'Real Madrid', 'cl/madrid.png' ],
- [ 'mancity', 'Manchester City', 'cl/mancity.png' ],
- [ 'ajax', 'Ajax Amsterdam', 'cl/ajax.png' ],
- [ 'dortmund', 'Borussia Dortmund', 'cl/dortmund.png' ],
+ [ 'madrid', 'cl/madrid.png' ],
+ [ 'mancity', 'cl/mancity.png' ],
+ [ 'ajax', 'cl/ajax.png' ],
+ [ 'dortmund', 'cl/dortmund.png' ],
- [ 'chelsea', 'FC Chelsea', 'cl/chelsea.png' ],
- [ 'donezk', 'Schachtjor Donezk', 'cl/donezk.png' ],
- [ 'juventus', 'Juventus Turin', 'cl/juventus.png' ],
- [ 'nordsjalland', 'FC Nordsjælland', 'cl/nordsjalland.png' ],
+ [ 'chelsea', 'cl/chelsea.png' ],
+ [ 'donezk', 'cl/donezk.png' ],
+ [ 'juventus', 'cl/juventus.png' ],
+ [ 'nordsjalland', 'cl/nordsjalland.png' ],
- [ 'bayern', 'Bayern München', 'cl/bayern.png' ],
- [ 'valencia', 'FC Valencia', 'cl/valencia.png' ],
- [ 'lille', 'OSC Lille', 'cl/lille.png' ],
- [ 'borissow', 'BATE Borissow', 'cl/borissow.png' ],
+ [ 'bayern', 'cl/bayern.png' ],
+ [ 'valencia', 'cl/valencia.png' ],
+ [ 'lille', 'cl/lille.png' ],
+ [ 'borissow', 'cl/borissow.png' ],
- [ 'barcelona', 'FC Barcelona', 'cl/barcelona.png' ],
- [ 'benfica', 'Benfica Lissabon', 'cl/benfica.png' ],
- [ 'spartak', 'Spartak Moskau', 'cl/spartak.png' ],
- [ 'celtic', 'Celtic Glasgow', 'cl/celtic.png' ],
+ [ 'barcelona', 'cl/barcelona.png' ],
+ [ 'benfica', 'cl/benfica.png' ],
+ [ 'spartak', 'cl/spartak.png' ],
+ [ 'celtic', 'cl/celtic.png' ],
- [ 'manunited', 'Manchester United', 'cl/manunited.png' ],
- [ 'braga', 'Sporting Braga', 'cl/braga.png' ],
- [ 'galatasaray', 'Galatasaray', 'cl/galatasaray.png' ],
- [ 'cluj', 'CFR Cluj', 'cl/cluj.png' ],
+ [ 'manunited', 'cl/manunited.png' ],
+ [ 'braga', 'cl/braga.png' ],
+ [ 'galatasaray', 'cl/galatasaray.png' ],
+ [ 'cluj', 'cl/cluj.png' ],
###################
# more teams from cl/el 2011-12
#
- [ 'inter', 'FC Internazionale Milano', 'cl/internazionale.png' ],
- [ 'marseille', 'Olympique Marseille', 'cl/marseille.png' ],
- [ 'basel', 'FC Basel 1893', 'cl/basel.png' ],
- [ 'napoli', 'SSC Napoli', 'cl/napoli.png' ],
- [ 'moskva', 'PFC CSKA Moskva', 'cl/moskva.png' ],
- [ 'apoel', 'APOEL Nikosia', 'cl/apoel.png' ],
+ [ 'inter', 'cl/internazionale.png' ],
+ [ 'marseille', 'cl/marseille.png' ],
+ [ 'basel', 'cl/basel.png' ],
+ [ 'napoli', 'cl/napoli.png' ],
+ [ 'moskva', 'cl/moskva.png' ],
+ [ 'apoel', 'cl/apoel.png' ],
- [ 'az', 'AZ Alkmaar', 'cl/az.png' ],
- [ 'athletic', 'Athletic Bilbao', 'cl/athletic.png' ],
- [ 'sporting', 'Sporting Lisboa', 'cl/sporting.png' ],
- [ 'metalist', 'FC Metalist Kharkiv', 'cl/metalist.png' ],
- [ 'atletico', 'Atlético Madrid', 'cl/atletico.png' ],
- [ 'hannover', 'Hannover 96', 'cl/hannover.png' ]
+ [ 'az', 'cl/az.png' ],
+ [ 'athletic', 'cl/athletic.png' ],
+ [ 'sporting', 'cl/sporting.png' ],
+ [ 'metalist', 'cl/metalist.png' ],
+ [ 'atletico', 'cl/atletico.png' ],
+ [ 'hannover', 'cl/hannover.png' ]
]
-Team.create_from_ary!( teams )
+Team.update_image_from_ary!( teams )
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.cl.teams.version', :value => '1' )
-Prop.create!( :key => 'db.seeds.el.teams.version', :value => '1' )
+Prop.create!( :key => 'db.cl.teams.2.version', :value => '1' )
+Prop.create!( :key => 'db.el.teams.2.version', :value => '1' )
View
171 db/seeds/euro/2012.rb
@@ -1,176 +1,31 @@
# encoding: utf-8
-# note: timezone for games (play_at) is *always* CET (central european time)
+### fix/todo:
+## team3 => false
-puts "*** loading seed data in seeds/euro/2012.rb"
+#euro = Event.create!( :key => 'euro',
+# :title => 'Euro 2012',
+# :team3 => false,
+# :start_at => Time.cet( '2012-06-07 17:00' ))
-#################################
-## Euro 2012
-
-# see http://en.wikipedia.org/wiki/UEFA_Euro_2012
-# or http://de.wikipedia.org/wiki/Fu%C3%9Fball-Europameisterschaft_2012
-
-
-euro = Event.create!( :key => 'euro',
- :title => 'Euro 2012',
- :team3 => false,
- :start_at => Time.cet( '2012-06-07 17:00' ))
-
-pol = Team.find_by_key!( 'pol' )
-gre = Team.find_by_key!( 'gre' )
-rus = Team.find_by_key!( 'rus' )
-cze = Team.find_by_key!( 'cze' )
-
-ned = Team.find_by_key!( 'ned' )
-den = Team.find_by_key!( 'den' )
-ger = Team.find_by_key!( 'ger' )
-por = Team.find_by_key!( 'por' )
-
-esp = Team.find_by_key!( 'esp' )
-ita = Team.find_by_key!( 'ita' )
-irl = Team.find_by_key!( 'irl' )
-cro = Team.find_by_key!( 'cro' )
-
-ukr = Team.find_by_key!( 'ukr' )
-swe = Team.find_by_key!( 'swe' )
-fra = Team.find_by_key!( 'fra' )
-eng = Team.find_by_key!( 'eng' )
-
-
-euro.teams << pol
-euro.teams << gre
-euro.teams << rus
-euro.teams << cze
-euro.teams << ned
-euro.teams << den
-euro.teams << ger
-euro.teams << por
-euro.teams << esp
-euro.teams << ita
-euro.teams << irl
-euro.teams << cro
-euro.teams << ukr
-euro.teams << swe
-euro.teams << fra
-euro.teams << eng
-
-
-
-euroa = Group.create!( :event => euro, :pos => 1, :title => 'Gruppe A' )
-eurob = Group.create!( :event => euro, :pos => 2, :title => 'Gruppe B' )
-euroc = Group.create!( :event => euro, :pos => 3, :title => 'Gruppe C' )
-eurod = Group.create!( :event => euro, :pos => 4, :title => 'Gruppe D' )
-
-#################################
-# Gruppe A
-
-euroa.teams << pol
-euroa.teams << gre
-euroa.teams << rus
-euroa.teams << cze
-
-
-#################################
-# Gruppe B
-
-eurob.teams << ned
-eurob.teams << den
-eurob.teams << ger
-eurob.teams << por
-
-
-#################################3
-# Gruppe C
-
-euroc.teams << esp
-euroc.teams << ita
-euroc.teams << irl
-euroc.teams << cro
-
-#################################3
-# Gruppe D
-
-eurod.teams << ukr
-eurod.teams << swe
-eurod.teams << fra
-eurod.teams << eng
-
-
-euro_round1 = Round.create!( :event => euro, :pos => 1, :title => 'Vorrunde 1. Spieltag', :title2 => '8.-11. Juni' )
-euro_round2 = Round.create!( :event => euro, :pos => 2, :title => 'Vorrunde 2. Spieltag', :title2 => '12.-15. Juni' )
-euro_round3 = Round.create!( :event => euro, :pos => 3, :title => 'Vorrunde 3. Spieltag', :title2 => '16.-19. Juni' )
-
-
-games_euro_round1 = [
- [ 1, pol, [1,1], gre, Time.cet('2012-06-08 18:00'), euroa ],
- [ 2, rus, [4,1], cze, Time.cet('2012-06-08 20:45'), euroa ],
- [ 3, ned, [0,1], den, Time.cet('2012-06-09 18:00'), eurob ],
- [ 4, ger, [1,0], por, Time.cet('2012-06-09 20:45'), eurob ],
- [ 5, esp, [1,1], ita, Time.cet('2012-06-10 18:00'), euroc ],
- [ 6, irl, [1,3], cro, Time.cet('2012-06-10 20:45'), euroc ],
- [ 7, fra, [1,1], eng, Time.cet('2012-06-11 18:00'), eurod ],
- [ 8, ukr, [2,1], swe, Time.cet('2012-06-11 20:45'), eurod ]
-]
-
-games_euro_round2 = [
- [ 9, gre, [1,2], cze, Time.cet('2012-06-12 18:00'), euroa ],
- [ 10, pol, [1,1], rus, Time.cet('2012-06-12 20:45'), euroa ],
- [ 11, den, [2,3], por, Time.cet('2012-06-13 18:00'), eurob ],
- [ 12, ned, [1,2], ger, Time.cet('2012-06-13 20:45'), eurob ],
- [ 13, ita, [1,1], cro, Time.cet('2012-06-14 18:00'), euroc ],
- [ 14, esp, [4,0], irl, Time.cet('2012-06-14 20:45'), euroc ],
- [ 15, swe, [2,3], eng, Time.cet('2012-06-15 20:45'), eurod ],
- [ 16, ukr, [0,2], fra, Time.cet('2012-06-15 18:00'), eurod ]
-]
-
-games_euro_round3 = [
- [ 17, cze, [1,0], pol, Time.cet('2012-06-16 20:45'), euroa ],
- [ 18, gre, [1,0], rus, Time.cet('2012-06-16 20:45'), euroa ],
- [ 19, por, [2,1], ned, Time.cet('2012-06-17 20:45'), eurob ],
- [ 20, den, [1,2], ger, Time.cet('2012-06-17 20:45'), eurob ],
- [ 21, cro, [0,1], esp, Time.cet('2012-06-18 20:45'), euroc ],
- [ 22, ita, [2,0], irl, Time.cet('2012-06-18 20:45'), euroc ],
- [ 23, eng, [1,0], ukr, Time.cet('2012-06-19 20:45'), eurod ],
- [ 24, swe, [2,0], fra, Time.cet('2012-06-19 20:45'), eurod ]
-]
-
-Game.create_from_ary!( games_euro_round1, euro_round1 )
-Game.create_from_ary!( games_euro_round2, euro_round2 )
-Game.create_from_ary!( games_euro_round3, euro_round3 )
##############################################
## Flex Only Rounds for **Flex** Style Pool
-euro8 = Round.create!( :event => euro, :pos => 4, :title => 'Viertelfinale', :fix => false )
-euro4 = Round.create!( :event => euro, :pos => 5, :title => 'Halbfinale', :fix => false )
-euro1 = Round.create!( :event => euro, :pos => 6, :title => 'Finale', :fix => false )
-
-
-games_euro8 = [
- [ 25, cze, [0,1], por, Time.cet('2012-06-21 20:45') ],
- [ 26, ger, [4,2], gre, Time.cet('2012-06-22 20:45') ],
- [ 27, esp, [2,0], fra, Time.cet('2012-06-23 20:45') ],
- [ 28, eng, [0,0,0,0,2,4], ita, Time.cet('2012-06-24 20:45') ]]
+## fix/todo: update fix flag
-Game.create_knockouts_from_ary!( games_euro8, euro8 )
-
-games_euro4 = [
- [ 29, por, [0,0,0,0,2,4], esp, Time.cet('2012-06-27 20:45') ],
- [ 30, ger, [1,2], ita, Time.cet('2012-06-28 20:45') ]]
-
-Game.create_knockouts_from_ary!( games_euro4, euro4 )
-
-games_euro1 = [
- [ 31, esp, [4,0], ita, Time.cet('2012-07-01 20:45') ]]
-
-Game.create_knockouts_from_ary!( games_euro1, euro1 )
+# euro8 = Round.create!( :event => euro, :pos => 4, :title => 'Viertelfinale', :fix => false )
+# euro4 = Round.create!( :event => euro, :pos => 5, :title => 'Halbfinale', :fix => false )
+# euro1 = Round.create!( :event => euro, :pos => 6, :title => 'Finale', :fix => false )
## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.euro.2012.version', :value => '1' )
+Prop.create!( :key => 'db.euro.2012.2.version', :value => '1' )
+
+### todo: split into its own file _quotes or _tipp3 etc.
########################
#
View
2  db/seeds/euro/2012_calc.rb
@@ -2,8 +2,6 @@
# note: timezone for games (play_at) is *always* CET (central european time)
-puts "*** loading seed data in seeds/euro/2012_calc.rb"
-
euro = Event.find_by_key!( 'euro' )
View
46 db/seeds/euro/teams.rb
@@ -1,34 +1,30 @@
# encoding: utf-8
-puts "*** loading seed data in seeds/euro/teams.rb"
-
-
teams = [
- [ 'pol', 'Polen', 'POL', 'euro/poland2.png' ],
- [ 'gre', 'Griechenland', 'GRE', 'euro/greece2.png' ],
- [ 'rus', 'Russland', 'RUS', 'euro/russia2.png' ],
- [ 'cze', 'Tschechien', 'CZE', 'euro/czech_republic2.png' ],
- [ 'ned', 'Niederlande', 'NED', 'euro/netherlands2.png' ],
- [ 'den', 'Dänemark', 'DEN', 'euro/denmark2.png' ],
- [ 'ger', 'Deutschland', 'GER', 'euro/germany2.png' ],
- [ 'por', 'Portugal', 'POR', 'euro/portugal2.png' ],
- [ 'esp', 'Spanien', 'ESP', 'euro/spain2.png' ],
- [ 'ita', 'Italien', 'ITA', 'euro/italy2.png' ],
- [ 'irl', 'Irland', 'IRL', 'euro/ireland2.png' ],
- [ 'cro', 'Kroatien', 'CRO', 'euro/croatia2.png' ],
- [ 'ukr', 'Ukraine', 'UKR', 'euro/ukraine2.png' ],
- [ 'swe', 'Schweden', 'SWE', 'euro/sweden2.png' ],
- [ 'fra', 'Frankreich', 'FRA', 'euro/france2.png' ],
- [ 'eng', 'England', 'ENG', 'euro/england2.png' ],
- [ 'fro', 'Färöer', 'FRO', 'euro/faroer2.png' ],
- [ 'kaz', 'Kasachstan', 'KAZ', 'euro/kaz2.png' ],
- [ 'aut', 'Österreich', 'AUT', 'euro/austria2.png' ]
+ [ 'pol', 'euro/poland2.png' ],
+ [ 'gre', 'euro/greece2.png' ],
+ [ 'rus', 'euro/russia2.png' ],
+ [ 'cze', 'euro/czech_republic2.png' ],
+ [ 'ned', 'euro/netherlands2.png' ],
+ [ 'den', 'euro/denmark2.png' ],
+ [ 'ger', 'euro/germany2.png' ],
+ [ 'por', 'euro/portugal2.png' ],
+ [ 'esp', 'euro/spain2.png' ],
+ [ 'ita', 'euro/italy2.png' ],
+ [ 'irl', 'euro/ireland2.png' ],
+ [ 'cro', 'euro/croatia2.png' ],
+ [ 'ukr', 'euro/ukraine2.png' ],
+ [ 'swe', 'euro/sweden2.png' ],
+ [ 'fra', 'euro/france2.png' ],
+ [ 'eng', 'euro/england2.png' ],
+ [ 'fro', 'euro/faroer2.png' ],
+ [ 'kaz', 'euro/kaz2.png' ],
+ [ 'aut', 'euro/austria2.png' ]
]
-Team.create_from_ary!( teams )
+Team.update_image_from_ary!( teams )
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.euro.teams.version', :value => '1' )
+Prop.create!( :key => 'db.euro.teams.2.version', :value => '1' )
View
163 db/seeds/mexico/apertura_2012.rb
@@ -1,163 +1,2 @@
-# encoding: utf-8
-# note: timezone for games (play_at) is *always* CST (central standard time / -6 hours ??)
-
-
-puts "*** loading seed data in seeds/mexico/apertura_2012.rb"
-
-
-mx = Event.create!( :key => 'mx_ap_2012',
- :title => 'México Primera División Apertura 2012',
- :start_at => Time.cst('2012-07-20 00:00') )
-
-
-america = Team.find_by_key!( 'america' )
-atlante = Team.find_by_key!( 'atlante' )
-atlas = Team.find_by_key!( 'atlas' )
-chivas = Team.find_by_key!( 'chivas' )
-cruzazul = Team.find_by_key!( 'cruzazul' )
-jaguares = Team.find_by_key!( 'jaguares' )
-leon = Team.find_by_key!( 'leon' )
-monarcas = Team.find_by_key!( 'monarcas' )
-monterrey = Team.find_by_key!( 'monterrey' )
-pachuca = Team.find_by_key!( 'pachuca' )
-puebla = Team.find_by_key!( 'puebla' )
-queretaro = Team.find_by_key!( 'queretaro' )
-sanluis = Team.find_by_key!( 'sanluis' )
-slaguna = Team.find_by_key!( 'slaguna' )
-tijuana = Team.find_by_key!( 'tijuana' )
-toluca = Team.find_by_key!( 'toluca' )
-tigres = Team.find_by_key!( 'tigres' )
-pumas = Team.find_by_key!( 'pumas' )
-
-
-mx.teams << america
-mx.teams << atlante
-mx.teams << atlas
-mx.teams << chivas
-mx.teams << cruzazul
-mx.teams << jaguares
-mx.teams << leon
-mx.teams << monarcas
-mx.teams << monterrey
-mx.teams << pachuca
-mx.teams << puebla
-mx.teams << queretaro
-mx.teams << sanluis
-mx.teams << slaguna
-mx.teams << tijuana
-mx.teams << toluca
-mx.teams << tigres
-mx.teams << pumas
-
-j1 = Round.create!( :event => mx, :pos => 1, :title => 'Jornada 1', :title2 => '20, 21 y 22 de julio' )
-j2 = Round.create!( :event => mx, :pos => 2, :title => 'Jornada 2', :title2 => '27, 28 y 29 de julio' )
-j3 = Round.create!( :event => mx, :pos => 3, :title => 'Jornada 3', :title2 => '3, 4, y 5 de agosto' )
-j4 = Round.create!( :event => mx, :pos => 4, :title => 'Jornada 4', :title2 => '10, 11 y 12 de agosto' )
-j5 = Round.create!( :event => mx, :pos => 5, :title => 'Jornada 5', :title2 => '17, 18 y 19 de agosto' )
-j6 = Round.create!( :event => mx, :pos => 6, :title => 'Jornada 6', :title2 => '24, 25 y 26 de agosto' )
-j7 = Round.create!( :event => mx, :pos => 7, :title => 'Jornada 7', :title2 => '31 de agosto, 1 y 2 de septiembre' )
-j8 = Round.create!( :event => mx, :pos => 8, :title => 'Jornada 8', :title2 => '14, 15 y 16 de septiembre' )
-
-
-games_j1 = [
- [1, jaguares, [], tigres, Time.cst('2012-07-20 19:30') ],
- [2, tijuana, [], puebla, Time.cst('2012-07-20 21:30') ],
- [3, cruzazul, [], monarcas, Time.cst('2012-07-21 17:00') ],
- [4, queretaro, [], leon, Time.cst('2012-07-21 17:00') ],
- [5, slaguna, [], sanluis, Time.cst('2012-07-21 19:00') ],
- [6, monterrey, [], america, Time.cst('2012-07-21 19:00') ],
- [7, atlas, [], pumas, Time.cst('2012-07-21 21:00') ],
- [8, toluca, [], chivas, Time.cst('2012-07-22 12:00') ],
- [9, atlante, [], pachuca, Time.cst('2012-07-22 18:00') ]]
-
-
-games_j2 = [
- [1, monarcas, [], monterrey, Time.cst('2012-07-27 19:30') ],
- [2, leon, [], tijuana, Time.cst('2012-07-27 21:30') ],
- [3, america, [], jaguares, Time.cst('2012-07-28 17:00') ],
- [4, pachuca, [], atlas, Time.cst('2012-07-28 19:00') ],
- [5, tigres, [], atlante, Time.cst('2012-07-28 19:00') ],
- [6, sanluis, [], cruzazul, Time.cst('2012-07-28 21:00') ],
- [7, puebla, [], toluca, Time.cst('2012-07-29 12:00') ],
- [8, pumas, [], queretaro, Time.cst('2012-07-29 12:00') ],
- [9, chivas, [], slaguna, Time.cst('2012-07-29 17:00')]]
-
-games_j3 = [
- [1, slaguna, [], puebla, Time.cst('2012-08-03 19:00') ],
- [2, tijuana, [], pumas, Time.cst('2012-08-03 19:30') ],
- [3, monarcas, [], sanluis, Time.cst('2012-08-03 21:30') ],
- [4, cruzazul, [], chivas, Time.cst('2012-08-04 17:00') ],
- [5, queretaro, [], pachuca, Time.cst('2012-08-04 17:00') ],
- [6, monterrey, [], jaguares, Time.cst('2012-08-04 19:00') ],
- [7, atlas, [], tigres, Time.cst('2012-08-04 21:00') ],
- [8, toluca, [], leon, Time.cst('2012-08-05 12:00') ],
- [9, atlante, [], america, Time.cst('2012-08-05 18:00') ]]
-
-games_j4 = [
- [1, jaguares, [], atlante, Time.cst('2012-08-10 19:30') ],
- [2, leon, [], slaguna, Time.cst('2012-08-10 21:30') ],
- [3, america, [], atlas, Time.cst('2012-08-11 17:00') ],
- [4, pachuca, [], tijuana, Time.cst('2012-08-11 19:00') ],
- [5, tigres, [], queretaro, Time.cst('2012-08-11 19:00') ],
- [6, sanluis, [], monterrey, Time.cst('2012-08-11 21:00') ],
- [7, puebla, [], cruzazul, Time.cst('2012-08-12 12:00') ],
- [8, pumas, [], toluca, Time.cst('2012-08-12 12:00') ],
- [9, chivas, [], monarcas, Time.cst('2012-08-12 17:00') ]]
-
-games_j5 = [
- [1, tijuana, [], tigres, Time.cst('2012-08-17 19:30') ],
- [2, monarcas, [], puebla, Time.cst('2012-08-17 21:30') ],
- [3, cruzazul, [], leon, Time.cst('2012-08-17 21:30') ],
- [4, queretaro, [], america, Time.cst('2012-08-18 17:00') ],
- [5, slaguna, [], pumas, Time.cst('2012-08-18 19:00') ],
- [6, monterrey, [], atlante, Time.cst('2012-08-18 19:00') ],
- [7, sanluis, [], chivas, Time.cst('2012-08-18 21:00') ],
- [8, atlas, [], jaguares, Time.cst('2012-08-18 21:00') ],
- [9, toluca, [], pachuca, Time.cst('2012-08-19 12:00') ]]
-
-games_j6 = [
- [1, jaguares, [], queretaro, Time.cst('2012-08-24 19:30') ],
- [2, leon, [], monarcas, Time.cst('2012-08-24 21:30') ],
- [3, america, [], tijuana, Time.cst('2012-08-25 17:00') ],
- [4, pachuca, [], slaguna, Time.cst('2012-08-25 19:00') ],
- [5, tigres, [], toluca, Time.cst('2012-08-25 19:00') ],
- [6, puebla, [], sanluis, Time.cst('2012-08-26 12:00') ],
- [7, pumas, [], cruzazul, Time.cst('2012-08-26 12:00') ],
- [8, chivas, [], monterrey, Time.cst('2012-08-26 17:00') ],
- [9, atlante, [], atlas, Time.cst('2012-08-26 18:00') ]]
-
-games_j7 = [
- [1, tijuana, [], jaguares, Time.cst('2012-08-31 19:30') ],
- [2, monarcas, [], pumas, Time.cst('2012-08-31 21:30') ],
- [3, cruzazul, [], pachuca, Time.cst('2012-09-01 17:00') ],
- [4, queretaro, [], atlante, Time.cst('2012-09-01 17:00') ],
- [5, slaguna, [], tigres, Time.cst('2012-09-01 19:00') ],
- [6, monterrey, [], atlas, Time.cst('2012-09-01 19:00') ],
- [7, sanluis, [], leon, Time.cst('2012-09-01 21:00') ],
- [8, toluca, [], america, Time.cst('2012-09-02 12:00') ],
- [9, chivas, [], puebla, Time.cst('2012-09-02 17:00') ]]
-
-games_j8 = [
- [1, jaguares, [], toluca, Time.cst('2012-09-14 19:30') ],
- [2, pachuca, [], monarcas, Time.cst('2012-09-14 19:30') ],
- [3, leon, [], chivas, Time.cst('2012-09-14 21:30') ],
- [4, america, [], slaguna, Time.cst('2012-09-15 17:00') ],
- [5, tigres, [], cruzazul, Time.cst('2012-09-15 19:00') ],
- [6, atlas, [], queretaro, Time.cst('2012-09-15 21:00') ],
- [7, puebla, [], monterrey, Time.cst('2012-09-16 12:00') ],
- [8, pumas, [], sanluis, Time.cst('2012-09-16 12:00') ],
- [9, atlante, [], tijuana, Time.cst('2012-09-16 18:00') ]]
-
-
-Game.create_from_ary!( games_j1, j1 )
-Game.create_from_ary!( games_j2, j2 )
-Game.create_from_ary!( games_j3, j3 )
-Game.create_from_ary!( games_j4, j4 )
-Game.create_from_ary!( games_j5, j5 )
-Game.create_from_ary!( games_j6, j6 )
-Game.create_from_ary!( games_j7, j7 )
-Game.create_from_ary!( games_j8, j8 )
-
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.mexico.apertura.2012.version', :value => '1' )
+## nothing; delete me
View
42 db/seeds/mexico/teams.rb
@@ -1,32 +1,30 @@
# encoding: utf-8
-puts "*** loading seed data in seeds/mexico/teams.rb"
## todo: add image for Club León
teams = [
- [ 'america', 'Club América', 'México', 'mx/america.png' ],
- [ 'atlante', 'Atlante', 'Cancún', 'mx/atlante.png' ],
- [ 'atlas', 'Atlas', 'Guadalajara', 'mx/atlas.png' ],
- [ 'chivas', 'Guadalajara Chivas', 'Guadalajara', 'mx/chivas.png' ],
- [ 'cruzazul', 'Cruz Azul', 'México', 'mx/cruzazul.png' ],
- [ 'jaguares', 'Jaguares de Chiapas', 'Tuxtla Gutiérrez', 'mx/jaguares.png' ],
- [ 'leon', 'Club León', 'León' ],
- [ 'monarcas', 'Monarcas Morelia', 'Morelia', 'mx/monarcas.png' ],
- [ 'monterrey', 'Monterrey', 'Monterrey', 'mx/monterrey.png' ],
- [ 'pachuca', 'Pachuca', 'Pachuca', 'mx/pachuca.png' ],
- [ 'puebla', 'Puebla F.C. ', 'Puebla', 'mx/puebla.png' ],
- [ 'queretaro', 'Querétaro F.C.', 'Querétaro', 'mx/queretaro.png' ],
- [ 'sanluis', 'Club San Luis', 'San Luis Potosì', 'mx/sanluis.png' ],
- [ 'slaguna', 'Santos Laguna', 'Torreón', 'mx/slaguna.png' ],
- [ 'tijuana', 'Club Tijuana', 'Tijuana', 'mx/tijuana.png' ],
- [ 'toluca', 'Toluca', 'Toluca', 'mx/toluca.png' ],
- [ 'tigres', 'Tigres UANL', 'San Nicolás de los Garza', 'mx/tigres.jpg' ],
- [ 'pumas', 'Pumas UNAM', 'México', 'mx/pumas.png' ]
+ [ 'america', 'mx/america.png' ],
+ [ 'atlante', 'mx/atlante.png' ],
+ [ 'atlas', 'mx/atlas.png' ],
+ [ 'chivas', 'mx/chivas.png' ],
+ [ 'cruzazul', 'mx/cruzazul.png' ],
+ [ 'jaguares', 'mx/jaguares.png' ],
+# [ 'leon', 'xxx' ],
+ [ 'monarcas', 'mx/monarcas.png' ],
+ [ 'monterrey', 'mx/monterrey.png' ],
+ [ 'pachuca', 'mx/pachuca.png' ],
+ [ 'puebla', 'mx/puebla.png' ],
+ [ 'queretaro', 'mx/queretaro.png' ],
+ [ 'sanluis', 'mx/sanluis.png' ],
+ [ 'slaguna', 'mx/slaguna.png' ],
+ [ 'tijuana', 'mx/tijuana.png' ],
+ [ 'toluca', 'mx/toluca.png' ],
+ [ 'tigres', 'mx/tigres.jpg' ],
+ [ 'pumas', 'mx/pumas.png' ]
]
-Team.create_from_ary!( teams )
+Team.update_image_from_ary!( teams )
-## todo: use new version constant for app module e.g. Wettpool::VERSION ??
-Prop.create!( :key => 'db.seeds.mexico.teams.version', :value => '1' )
+Prop.create!( :key => 'db.mx.teams.2.version', :value => '1' )
View
77 db/seeds/nhl/teams.rb
@@ -1,49 +1,46 @@
# encoding: utf-8
-puts "*** loading seed data in seeds/nhl/teams.rb"
-
######################################
## NHL Teams 2012
teams = [
- [ 'newjersey', 'New Jersey Devils', 'East/Atlantic', 'nhl/devils.png' ],
- [ 'nyislanders', 'New York Islanders', 'East/Atlantic', 'nhl/islanders.png' ],
- [ 'nyrangers', 'New York Rangers', 'East/Atlantic', 'nhl/rangers.png' ],
- [ 'philadelphia', 'Philadelphia Flyers', 'East/Atlantic', 'nhl/flyers.png' ],
- [ 'pittsburgh', 'Pittsburgh Penguins', 'East/Atlantic', 'nhl/penguins.png' ],
-
- [ 'boston', 'Boston Bruis', 'East/Northeast', 'nhl/bruins.png' ],
- [ 'buffalo', 'Buffalo Sabres', 'East/Northeast', 'nhl/sabres.png' ],
- [ 'montreal', 'Montreal Canadiens', 'East/Northeast', 'nhl/canadiens.png' ],
- [ 'ottawa', 'Ottawa Senators', 'East/Northeast', 'nhl/senators.png' ],
- [ 'toronto', 'Toronto Maple Leafs', 'East/Northeast', 'nhl/mapleleafs.png' ],
-
- [ 'carolina', 'Carolina Hurricanes', 'East/Southeast', 'nhl/hurricanes.png' ],
- [ 'florida', 'Florida Panthers', 'East/Southeast', 'nhl/panthers.png' ],
- [ 'tampabay', 'Tampa Bay Lightning', 'East/Southeast', 'nhl/lightning.png' ],
- [ 'washington', 'Washington Capitals', 'East/Southeast', 'nhl/capitals.png' ],
- [ 'winnipeg', 'Winnipeg Jets', 'East/Southeast', 'nhl/jets.png' ],
-
- [ 'chicago', 'Chicago Blackhawks', 'West/Central', 'nhl/blackhawks.png' ],
- [ 'columbus', 'Columbus Blue Jackets', 'West/Central', 'nhl/bluejackets.png' ],
- [ 'detroit', 'Detroit Red Wings', 'West/Central', 'nhl/redwings.png' ],
- [ 'nashville', 'Nashville Predators', 'West/Central', 'nhl/predators.png' ],
- [ 'stlouis', 'St. Louis Blues', 'West/Central', 'nhl/blues.png' ],
-
- [ 'calgary', 'Calgary Flames', 'West/Northwest', 'nhl/flames.png' ],
- [ 'colorado', 'Colorado Avalanche', 'West/Northwest', 'nhl/avalanche.png' ],
- [ 'edmonton', 'Edmonton Oilers', 'West/Northwest', 'nhl/oilers.png' ],
- [ 'minnesota', 'Minnesota Wild', 'West/Northwest', 'nhl/wild.png' ],
- [ 'vancouver', 'Vancouver Canucks', 'West/Northwest', 'nhl/canucks.png' ],
-
- [ 'anaheim', 'Anaheim Ducks', 'West/Pacific', 'nhl/ducks.png' ],
- [ 'dallas', 'Dallas Stars', 'West/Pacific', 'nhl/stars.png' ],
- [ 'losangeles', 'Los Angeles Kings', 'West/Pacific', 'nhl/kings.png' ],
- [ 'phoenix', 'Phoenix Coyotes', ' West/Pacific', 'nhl/coyotes.png' ],
- [ 'sanjose', 'San Jose Sharks', ' West/Pacific', 'nhl/sharks.png' ]
+ [ 'newjersey', 'nhl/devils.png' ],
+ [ 'nyislanders', 'nhl/islanders.png' ],
+ [ 'nyrangers', 'nhl/rangers.png' ],
+ [ 'philadelphia', 'nhl/flyers.png' ],
+ [ 'pittsburgh', 'nhl/penguins.png' ],
+
+ [ 'boston', 'nhl/bruins.png' ],
+ [ 'buffalo', 'nhl/sabres.png' ],
+ [ 'montreal', 'nhl/canadiens.png' ],
+ [ 'ottawa', 'nhl/senators.png' ],
+ [ 'toronto', 'nhl/mapleleafs.png' ],
+
+ [ 'carolina', 'nhl/hurricanes.png' ],
+ [ 'florida', 'nhl/panthers.png' ],
+ [ 'tampabay', 'nhl/lightning.png' ],
+ [ 'washington', 'nhl/capitals.png' ],
+ [ 'winnipeg', 'nhl/jets.png' ],
+
+ [ 'chicago', 'nhl/blackhawks.png' ],
+ [ 'columbus', 'nhl/bluejackets.png' ],
+ [ 'detroit', 'nhl/redwings.png' ],
+ [ 'nashville', 'nhl/predators.png' ],
+ [ 'stlouis', 'nhl/blues.png' ],
+
+ [ 'calgary', 'nhl/flames.png' ],
+ [ 'colorado', 'nhl/avalanche.png' ],
+ [ 'edmonton', 'nhl/oilers.png' ],
+ [ 'minnesota', 'nhl/wild.png' ],
+ [ 'vancouver', 'nhl/canucks.png' ],
+
+ [ 'anaheim', 'nhl/ducks.png' ],