sportdb-market 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/GEM.HISTORY.md ADDED
@@ -0,0 +1,3 @@
1
+ ### 0.0.1 / 2012-11-13
2
+
3
+ * Everything is new. First release
data/GEM.README.md ADDED
@@ -0,0 +1,23 @@
1
+ # sportdb-market
2
+
3
+ sportdb plugin for market quotes (odds, etc)
4
+
5
+ * [geraldb.github.com/sport.db](http://geraldb.github.com/sport.db)
6
+
7
+
8
+ ## Usage
9
+
10
+ TBD
11
+
12
+
13
+ ## Install
14
+
15
+ Just install the gem:
16
+
17
+ $ gem install sportdb-market
18
+
19
+
20
+ ## License
21
+
22
+ The `sportdb-market` scripts are dedicated to the public domain.
23
+ Use it as you please with no restrictions whatsoever.
data/Manifest.txt ADDED
@@ -0,0 +1,24 @@
1
+ GEM.HISTORY.md
2
+ GEM.README.md
3
+ Manifest.txt
4
+ Rakefile
5
+ db/at/2012_13/bl_quotes.rb
6
+ db/at/2012_13/bl_quotes_betathome.txt
7
+ db/at/2012_13/bl_quotes_tipp3.txt
8
+ db/at/2012_13/cup_quotes.rb
9
+ db/at/2012_13/cup_quotes_betathome.txt
10
+ db/at/2012_13/cup_quotes_tipp3.txt
11
+ db/cl/2012_13/cl_quotes.rb
12
+ db/cl/2012_13/cl_quotes_betathome.txt
13
+ db/cl/2012_13/cl_quotes_tipp3.txt
14
+ db/services.rb
15
+ db/world/quali_quotes_tipp3.txt
16
+ lib/sportdb/market/market.rb
17
+ lib/sportdb/market/models/event_quote.rb
18
+ lib/sportdb/market/models/game.rb
19
+ lib/sportdb/market/models/group_quote.rb
20
+ lib/sportdb/market/models/service.rb
21
+ lib/sportdb/market/reader.rb
22
+ lib/sportdb/market/schema.rb
23
+ lib/sportdb/market/version.rb
24
+ lib/sportdb_plugin.rb
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ require 'hoe'
2
+ require './lib/sportdb/market/version.rb'
3
+
4
+ Hoe.spec 'sportdb-market' do
5
+
6
+ self.version = SportDB::Market::VERSION
7
+
8
+ self.summary = 'sportdb plugin for market quotes (odds, etc)'
9
+ self.description = summary
10
+
11
+ self.urls = ['http://geraldb.github.com/sport.db']
12
+
13
+ self.author = 'Gerald Bauer'
14
+ self.email = 'opensport@googlegroups.com'
15
+
16
+ # switch extension to .markdown for gihub formatting
17
+ self.readme_file = 'GEM.README.md'
18
+ self.history_file = 'GEM.HISTORY.md'
19
+
20
+ ## soft deps (dependencies)
21
+ ## -- sportdb gem must be installed already
22
+
23
+ end
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+
3
+ ####################################################
4
+ ## Oesterreichische Bundesliga 2012/13 Quotes/Odds
5
+
6
+
7
+ bl = Event.find_by_key!( 'at.2012/13' )
8
+
9
+
10
+ salzburg = Team.find_by_key!( 'salzburg' )
11
+ rapid = Team.find_by_key!( 'rapid' )
12
+ admira = Team.find_by_key!( 'admira' )
13
+ austria = Team.find_by_key!( 'austria' )
14
+ sturm = Team.find_by_key!( 'sturm' )
15
+ ried = Team.find_by_key!( 'ried' )
16
+ wacker = Team.find_by_key!( 'wacker' )
17
+ mattersburg = Team.find_by_key!( 'mattersburg' )
18
+ neustadt = Team.find_by_key!( 'neustadt' )
19
+ wac = Team.find_by_key!( 'wac' )
20
+
21
+
22
+
23
+ tipp3 = Service.find_by_key!( 'tipp3' )
24
+ betathome = Service.find_by_key!( 'betathome' )
25
+
26
+
27
+ tipp3_winner_odds = [
28
+ [ salzburg, 1.55 ],
29
+ [ rapid, 4 ],
30
+ [ austria, 4 ],
31
+ [ sturm, 15 ],
32
+ [ admira, 30 ],
33
+ [ ried, 75 ],
34
+ [ mattersburg, 150 ],
35
+ [ wac, 200 ],
36
+ [ neustadt, 700 ],
37
+ [ wacker, 850 ]]
38
+
39
+ betathome_winner_odds = [
40
+ [ salzburg, 1.65 ],
41
+ [ rapid, 3.9 ],
42
+ [ austria, 3.9 ],
43
+ [ sturm, 17 ],
44
+ [ ried, 50 ],
45
+ [ wac, 70 ],
46
+ [ admira, 75 ],
47
+ [ mattersburg, 100 ],
48
+ [ neustadt, 250 ],
49
+ [ wacker, 350 ]]
50
+
51
+
52
+ EventQuote.create_from_ary!( tipp3_winner_odds, tipp3, bl )
53
+ EventQuote.create_from_ary!( betathome_winner_odds, betathome, bl )
54
+
55
+
56
+
57
+ ## todo: use new version constant for app module e.g. Wettpool::VERSION ??
58
+ Prop.create!( key: 'db.at.2012/13.quotes.version', value: '1' )
@@ -0,0 +1,25 @@
1
+ ############################
2
+ # Bet at Home Quotes
3
+ # -> bet-at-home.com
4
+ #
5
+
6
+
7
+ 11. Runde - 6/7 Okt
8
+
9
+ wac ried 2.4 3.25 2.7
10
+ rapid neustadt 1.25 5.5 9
11
+ mattersburg salzburg 3.95 3.35 1.85
12
+ sturm austria 2.5 3.1 2.7
13
+ admira wacker 1.45 4.3 5.9
14
+
15
+
16
+
17
+
18
+
19
+ 13. Runde
20
+
21
+ SV Josko Fenster Ried - SC Wiener Neustadt 27.10.12 16:00 1,55 3,55 6,00
22
+ FC Admira Wacker Mödling - FK Austria Wien 27.10.12 18:30 2,80 3,30 2,30
23
+ SV Mattersburg - FC Wacker Innsbruck 27.10.12 18:30 1,80 3,35 4,20
24
+ Wolfsberger AC - SK Sturm Graz 27.10.12 18:30 2,90 3,30 2,25
25
+ SK Rapid Wien - Red Bull Salzburg 28.10.12 16:00 2,75 3,20 2,40
@@ -0,0 +1,40 @@
1
+ ############################
2
+ # Tipp3 Quotes
3
+ # more info -> tipp3.at
4
+ #
5
+ # 1 X/0 2 // Home=1 / Draw=0,X / Away=2
6
+
7
+
8
+
9
+ ### todo:
10
+ # rename neustadt -> wrneustadt
11
+ # wacker -> innsbruck
12
+
13
+
14
+ 11. Runde - 6/7 Okt || Wettprogramm 40B
15
+
16
+ 06.10. 16:00 Wolfsberger AC SV Josko Ried 2,20 3,00 2,60
17
+ 06.10. 18:30 SV Mattersburg Red Bull Salzburg 4,00 3,30 1,80
18
+ 06.10. 18:30 Admira Wacker Wacker Innsbruck 1,45 3,60 5,20
19
+ 07.10. 16:00 SK Sturm Graz FK Austria Wien 2,40 3,10 2,70
20
+ 07.10. 18:30 SK Rapid Wien SC Wiener Neustadt 1,20 5,00 7,50
21
+
22
+ 12. Runde - 20/21 Okt || Wettprogramm 42B
23
+
24
+ 20.10. 16:00 Red Bull Salzburg Wolfsberger AC 1,30 4,50 8,00
25
+ 20.10. 18:30 Wacker Innsbruck SV Josko Ried 2,60 2,90 2,30
26
+ 20.10. 18:30 SK Sturm Graz SV Mattersburg 1,45 3,50 5,00
27
+ 20.10. 18:30 SC Wiener Neustadt Admira Wacker 3,00 3,00 2,00
28
+ 21.10. 16:00 FK Austria Wien SK Rapid Wien 2,40 3,30 2,80
29
+
30
+
31
+ 13. Runde - 27/28 Okt || Wettprogramm 43B
32
+
33
+ SV Josko Ried SC Wiener Neustadt 1,50 3,40 4,80
34
+ Wolfsberger AC SK Sturm Graz 2,60 3,00 2,20
35
+ Admira Wacker FK Austria Wien 2,70 3,20 2,30
36
+ SV Mattersburg Wacker Innsbruck 1,75 3,20 3,50
37
+ SK Rapid Wien Red Bull Salzburg 2,80 3,30 2,40
38
+
39
+
40
+
@@ -0,0 +1,118 @@
1
+ # encoding: utf-8
2
+
3
+ ##################################
4
+ ### ÖFB Cup 2012/13 Quotes/Odds
5
+
6
+ cup = Event.find_by_key!( 'at_cup_2012_13' )
7
+
8
+
9
+ ## bundesliga teams
10
+
11
+ salzburg = Team.find_by_key!( 'salzburg' )
12
+ rapid = Team.find_by_key!( 'rapid' )
13
+ admira = Team.find_by_key!( 'admira' )
14
+ austria = Team.find_by_key!( 'austria' )
15
+ sturm = Team.find_by_key!( 'sturm' )
16
+ ried = Team.find_by_key!( 'ried' )
17
+ wacker = Team.find_by_key!( 'wacker' )
18
+ mattersburg = Team.find_by_key!( 'mattersburg' )
19
+ neustadt = Team.find_by_key!( 'neustadt' )
20
+ wac = Team.find_by_key!( 'wac' )
21
+
22
+ ## erste liga teams
23
+
24
+ ksv = Team.find_by_key!( 'ksv' )
25
+ altach = Team.find_by_key!( 'altach' )
26
+ austrial = Team.find_by_key!( 'austrial' )
27
+ stpoelten = Team.find_by_key!( 'stpoelten' )
28
+ linz = Team.find_by_key!( 'linz' )
29
+ groedig = Team.find_by_key!( 'groedig' )
30
+ lustenau = Team.find_by_key!( 'lustenau' )
31
+ vienna = Team.find_by_key!( 'vienna' )
32
+ hartberg = Team.find_by_key!( 'hartberg' )
33
+ horn = Team.find_by_key!( 'horn' )
34
+
35
+ ## regionalliga west teams
36
+
37
+ hard = Team.find_by_key!( 'hard' )
38
+ bregenz = Team.find_by_key!( 'bregenz' )
39
+ dornbirn = Team.find_by_key!( 'dornbirn' )
40
+ kufstein = Team.find_by_key!( 'kufstein' )
41
+ wattens = Team.find_by_key!( 'wattens' )
42
+ austrias = Team.find_by_key!( 'austrias')
43
+ pinzgau = Team.find_by_key!( 'pinzgau' )
44
+ stjohann = Team.find_by_key!( 'stjohann' )
45
+
46
+ ## regionalliga mitte teams
47
+
48
+ vsv = Team.find_by_key!( 'vsv' )
49
+ klagenfurt = Team.find_by_key!( 'klagenfurt' )
50
+ austriak = Team.find_by_key!( 'austriak' )
51
+ kalsdorf = Team.find_by_key!( 'kalsdorf' )
52
+ gratkorn = Team.find_by_key!( 'gratkorn' )
53
+ allerheiligen = Team.find_by_key!( 'allerheiligen' )
54
+ leoben = Team.find_by_key!( 'leoben' )
55
+ gak = Team.find_by_key!( 'gak' )
56
+ pasching = Team.find_by_key!( 'pasching' )
57
+ voecklamarkt = Team.find_by_key!( 'voecklamarkt' )
58
+ stflorian = Team.find_by_key!( 'stflorian' )
59
+ wallern = Team.find_by_key!( 'wallern' )
60
+ lask = Team.find_by_key!( 'lask' )
61
+
62
+ ## regionalliga ost teams
63
+
64
+ sollenau = Team.find_by_key!( 'sollenau' )
65
+ amstetten = Team.find_by_key!( 'amstetten' )
66
+ retz = Team.find_by_key!( 'retz' )
67
+ fac = Team.find_by_key!( 'fac' )
68
+ schwechat = Team.find_by_key!( 'schwechat' )
69
+ wienersk = Team.find_by_key!( 'wienersk' )
70
+ ostbahn = Team.find_by_key!( 'ostbahn' )
71
+ oberwart = Team.find_by_key!( 'oberwart' )
72
+ parndorf = Team.find_by_key!( 'parndorf' )
73
+ stegersbach = Team.find_by_key!( 'stegersbach' )
74
+
75
+ ## noch einige teams
76
+
77
+ wolfurt = Team.find_by_key!( 'wolfurt' )
78
+ schwaz = Team.find_by_key!( 'schwaz' )
79
+ reutte = Team.find_by_key!( 'reutte' )
80
+ spittal = Team.find_by_key!( 'spittal' )
81
+ sak = Team.find_by_key!( 'sak' )
82
+ dsc = Team.find_by_key!( 'dsc' )
83
+ micheldorf = Team.find_by_key!( 'micheldorf' )
84
+ badvoeslau = Team.find_by_key!( 'badvoeslau' )
85
+ gaflenz = Team.find_by_key!( 'gaflenz' )
86
+ ardagger = Team.find_by_key!( 'ardagger' )
87
+ rohrendorf = Team.find_by_key!( 'rohrendorf' )
88
+ heiligenkreuz = Team.find_by_key!( 'heiligenkreuz' )
89
+ viktoria = Team.find_by_key!( 'viktoria' )
90
+
91
+
92
+ tipp3 = Service.find_by_key!( 'tipp3' )
93
+ betathome = Service.find_by_key!( 'betathome' )
94
+
95
+
96
+ tipp3_cup_winner_odds = [
97
+ [ salzburg, 3 ],
98
+ [ rapid, 4 ],
99
+ [ austria, 4 ],
100
+ [ sturm, 8 ],
101
+ [ admira, 10 ],
102
+ [ ried, 12 ],
103
+ [ wac, 20 ],
104
+ [ mattersburg, 20 ],
105
+ [ neustadt, 25 ],
106
+ [ wacker, 25 ],
107
+ [ austrial, 25 ],
108
+ [ altach, 30 ],
109
+ [ groedig, 30 ],
110
+ [ ksv, 40 ],
111
+ [ lustenau, 50 ]]
112
+
113
+ EventQuote.create_from_ary!( tipp3_cup_winner_odds, tipp3, cup )
114
+
115
+
116
+
117
+ ## todo: use new version constant for app module e.g. Wettpool::VERSION ??
118
+ Prop.create!( key: 'db.at.cup.2012/13.quotes.version', value: '1' )
@@ -0,0 +1,33 @@
1
+
2
+ 2. Runde / Di+Mi 25.+26. Sep 2012
3
+
4
+
5
+ kalsdorf hartberg 3.1 3.2 2.05
6
+ viktoria ksv 7.5 5.2 1.25
7
+ hard altach 8.5 5.8 1.2
8
+ stegersbach salzburg 13 11 1.05
9
+ pasching austrial 4.3 3.75 1.6
10
+ austriak admira 7 5.5 1.25
11
+ schwechat sturm 13 7.2 1.1
12
+ lask groedig 3.6 3.3 1.85
13
+ stjohann lustenau 4.75 3.75 1.55
14
+ sollenau wacker 9 5.5 1.2
15
+ vsv neustadt 6.5 5 1.3
16
+ dornbirn austria 13 7.2 1.1
17
+ badvoeslau mattersburg 13 7.2 1.1
18
+ stflorian ried 11 6.2 1.15
19
+ allerheiligen rapid 13 11 1.05
20
+ gak wac 7.2 4.5 1.3
21
+
22
+
23
+ 3. Runde / Achtelfinale / Di+Mi 30.+31. Okt 2012
24
+
25
+ SK Sturm Graz - FC Wacker Innsbruck 30.10.12 18:00 1,40 4,25 5,75
26
+ FC Lustenau - Wolfsberger AC 30.10.12 18:30 3,90 3,40 1,75
27
+ FC Pasching - SK Austria Klagenfurt 30.10.12 19:00 1,60 3,55 4,65
28
+ LASK Linz - SV Mattersburg 30.10.12 19:00 3,80 3,30 1,80
29
+ Wiener Viktoria - SV Josko Fenster Ried 30.10.12 20:30 9,50 5,50 1,20
30
+ SC Kalsdorf - Red Bull Salzburg 31.10.12 19:00 12,00 8,00 1,10
31
+ Villacher SV - FK Austria Wien 31.10.12 19:00 8,50 6,00 1,20
32
+ SK Rapid Wien - SCR Altach 31.10.12 19:30 1,15 6,00 12,00
33
+
@@ -0,0 +1,27 @@
1
+
2
+
3
+ 2. Runde / Di+Mi 25.+26. Sep 2012 || Wettprogramm 39A
4
+
5
+ kalsdorf hartberg 2.7 2.9 2.1
6
+ viktoria ksv 6.8 4.5 1.2
7
+ hard altach 6.8 4.5 1.2
8
+ stegersbach salzburg 12 6 1.05
9
+ pasching austrial 3.8 3.4 1.55
10
+ austriak admira 6.8 4.5 1.2
11
+ schwechat sturm 9 5.5 1.1
12
+ lask groedig 3.1 3 1.85
13
+ stjohann lustenau 4.6 3.4 1.45
14
+ sollenau wacker 6.5 4 1.25
15
+ vsv neustadt 5.8 3.8 1.3
16
+ dornbirn austria 9 5.5 1.1
17
+ badvoeslau mattersburg 7.5 5 1.15
18
+ stflorian ried 6.8 4.5 1.2
19
+ allerheiligen rapid 12 6 1.05
20
+ gak wac 5.8 3.8 1.3
21
+
22
+
23
+ 3. Runde / Achtelfinale / Di+Mi 30.+31. Okt 2012
24
+
25
+
26
+ 4. Runde / Viertelfinale / Di+Mi 16.+17. Apr 2013
27
+
@@ -0,0 +1,96 @@
1
+ # encoding: utf-8
2
+
3
+
4
+ ##########################################
5
+ ## Champions League 2012/13 Quotes/Odds
6
+
7
+
8
+ cl = Event.find_by_key!( 'cl.2012/13' )
9
+
10
+
11
+ porto = Team.find_by_key!( 'porto' )
12
+ kiew = Team.find_by_key!( 'kiew' )
13
+ paris = Team.find_by_key!( 'paris' )
14
+ zagreb = Team.find_by_key!( 'zagreb' )
15
+
16
+ arsenal = Team.find_by_key!( 'arsenal' )
17
+ schalke = Team.find_by_key!( 'schalke' )
18
+ olympiacos = Team.find_by_key!( 'olympiacos' )
19
+ montpellier = Team.find_by_key!( 'montpellier' )
20
+
21
+ milan = Team.find_by_key!( 'milan' )
22
+ zenit = Team.find_by_key!( 'zenit' )
23
+ anderlecht = Team.find_by_key!( 'anderlecht' )
24
+ malaga = Team.find_by_key!( 'malaga' )
25
+
26
+ madrid = Team.find_by_key!( 'madrid' )
27
+ mancity = Team.find_by_key!( 'mancity' )
28
+ ajax = Team.find_by_key!( 'ajax' )
29
+ dortmund = Team.find_by_key!( 'dortmund' )
30
+
31
+ chelsea = Team.find_by_key!( 'chelsea' )
32
+ donezk = Team.find_by_key!( 'donezk' )
33
+ juventus = Team.find_by_key!( 'juventus' )
34
+ nordsjalland = Team.find_by_key!( 'nordsjalland' )
35
+
36
+ bayern = Team.find_by_key!( 'bayern' )
37
+ valencia = Team.find_by_key!( 'valencia' )
38
+ lille = Team.find_by_key!( 'lille' )
39
+ borissow = Team.find_by_key!( 'borissow' )
40
+
41
+ barcelona = Team.find_by_key!( 'barcelona' )
42
+ benfica = Team.find_by_key!( 'benfica' )
43
+ spartak = Team.find_by_key!( 'spartak' )
44
+ celtic = Team.find_by_key!( 'celtic' )
45
+
46
+ manunited = Team.find_by_key!( 'manunited' )
47
+ braga = Team.find_by_key!( 'braga' )
48
+ galatasaray = Team.find_by_key!( 'galatasaray' )
49
+ cluj = Team.find_by_key!( 'cluj' )
50
+
51
+
52
+
53
+ tipp3 = Service.find_by_key!( 'tipp3' )
54
+ betathome = Service.find_by_key!( 'betathome' )
55
+
56
+
57
+ betathome_winner_odds = [
58
+ [ barcelona, 3.4 ],
59
+ [ madrid, 4.2 ],
60
+ [ bayern, 8 ],
61
+ [ manunited, 10 ],
62
+ [ mancity, 12 ],
63
+ [ chelsea, 15 ],
64
+ [ paris, 15 ],
65
+ [ juventus, 15 ],
66
+ [ arsenal, 18 ],
67
+ [ dortmund, 20 ],
68
+ [ milan, 50 ],
69
+ [ porto, 80 ],
70
+ [ schalke, 80 ],
71
+ [ zenit, 80 ],
72
+ [ valencia, 100 ],
73
+ [ malaga, 100 ],
74
+ [ donezk, 150 ],
75
+ [ galatasaray, 150 ],
76
+ [ benfica, 200 ],
77
+ [ kiew, 500 ],
78
+ [ celtic, 500 ],
79
+ [ spartak, 500 ],
80
+ [ montpellier, 500 ],
81
+ [ olympiacos, 500 ],
82
+ [ anderlecht, 750 ],
83
+ [ cluj, 750 ],
84
+ [ braga, 750 ],
85
+ [ lille, 750 ],
86
+ [ borissow, 750 ],
87
+ [ ajax, 750 ],
88
+ [ zagreb, 1000 ],
89
+ [ nordsjalland, 1000 ]]
90
+
91
+ EventQuote.create_from_ary!( betathome_winner_odds, betathome, cl )
92
+
93
+
94
+
95
+ ## todo: use new version constant for app module e.g. Wettpool::VERSION ??
96
+ Prop.create!( key: 'db.cl.2012/13.quotes.version', value: '1' )
@@ -0,0 +1,70 @@
1
+
2
+
3
+ 2. Spieltag
4
+
5
+ spartak celtic 1.65 3.5 5.5
6
+ nordsjalland chelsea 8.2 4.75 1.35
7
+ juventus donezk 1.6 3.75 5.5
8
+ borissow bayern 8.5 5.4 1.3
9
+ valencia lille 1.5 3.9 6.6
10
+ benfica barcelona 6.1 3.8 1.55
11
+ cluj manunited 5.5 3.75 1.6
12
+ galatasaray braga 1.85 3.5 4
13
+ zenit milan 2.25 3.3 3.1
14
+ kiew zagreb 1.4 4.15 8.5
15
+ porto paris 2.35 3.1 3.1
16
+ arsenal olympiacos 1.3 4.95 10
17
+ schalke montpellier 1.65 3.75 5
18
+ anderlecht malaga 3.05 3.25 2.3
19
+ ajax madrid 7 4.6 1.4
20
+ mancity dortmund 1.7 3.85 4.45
21
+
22
+
23
+ 3. Spieltag
24
+
25
+ FC Porto - Dynamo Kiev 1,60 3,75 5,50
26
+ NK Dinamo Zagreb - Paris Saint Germain 6,35 4,00 1,50
27
+
28
+ Arsenal FC - FC Schalke 04 1,80 3,60 4,20
29
+ HSC Montpellier - Olympiakos Piraeus 1,85 3,40 4,20
30
+
31
+ FC Zenit St Petersburg - RSC Anderlecht 1,50 4,10 6,20
32
+ CF Malaga - AC Milan 2,05 3,35 3,35
33
+
34
+ Ajax Amsterdam - Manchester City 4,50 3,60 1,75
35
+ Borussia Dortmund - Real Madrid 3,20 3,25 2,20
36
+
37
+
38
+ Shakhtar Donetsk - Chelsea FC 2,35 3,30 2,90
39
+ FC Nordsjaelland - Juventus Turin 9,00 4,50 1,35
40
+
41
+ Bate Borisov - CF Valencia 3,60 3,40 2,00
42
+ OSC Lille - FC Bayern München 6,10 3,80 1,55
43
+
44
+ Spartak Moscow - Benfica Lissabon 2,60 3,40 2,55
45
+ FC Barcelona - Celtic Glasgow 1,08 10 21
46
+
47
+ Manchester United - Sporting Braga 1,30 5,15 9
48
+ Galatasaray - CFR Cluj 1,70 3,5 5
49
+
50
+
51
+ 4. Spieltag
52
+
53
+ Dynamo Kiev - FC Porto 06.11.12 20:45 2,65 3,30 2,55
54
+ Paris Saint Germain - NK Dinamo Zagreb 06.11.12 20:45 1,15 7,00 16,00
55
+ FC Schalke 04 - Arsenal FC 06.11.12 20:45 1,95 3,35 3,80
56
+ Olympiakos Piraeus - HSC Montpellier 06.11.12 20:45 2,00 3,20 3,85
57
+ AC Milan - CF Malaga 06.11.12 20:45 2,15 3,20 3,40
58
+ RSC Anderlecht - FC Zenit St Petersburg 06.11.12 20:45 2,85 3,30 2,40
59
+ Manchester City - Ajax Amsterdam 06.11.12 20:45 1,30 5,50 8,20
60
+ Real Madrid - Borussia Dortmund 06.11.12 20:45 1,40 4,50 7,40
61
+
62
+ Chelsea FC - Shakhtar Donetsk 07.11.12 20:45 1,85 3,55 4,00
63
+ Juventus Turin - FC Nordsjaelland 07.11.12 20:45 1,15 7,00 16,00
64
+ CF Valencia - Bate Borisov 07.11.12 20:45 1,25 6,00 9,25
65
+ FC Bayern München - OSC Lille 07.11.12 20:45 1,20 6,35 12,00
66
+ Benfica Lissabon - Spartak Moscow 07.11.12 20:45 1,60 3,65 5,75
67
+ Celtic Glasgow - FC Barcelona 07.11.12 20:45 7,50 5,00 1,35
68
+ CFR Cluj - Galatasaray 07.11.12 20:45 2,60 3,30 2,60
69
+ Sporting Braga - Manchester United 07.11.12 20:45 3,80 3,35 1,95
70
+
@@ -0,0 +1,75 @@
1
+
2
+ 1. Spieltag - Di./Mi., 18.+19. Sep 2012 || Wettprogramm 38A
3
+
4
+ paris kiew 1.55 3.3 4.5
5
+ zagreb porto 3.2 3 1.8
6
+ milan anderlecht 1.4 3.5 6
7
+ malaga zenit 2.3 3 2.3
8
+ olympiacos schalke 2.4 3 2.4
9
+ montpellier arsenal 2.7 3.1 2.1
10
+ dortmund ajax 1.35 3.8 6
11
+ madrid mancity 1.65 3.4 4.8
12
+
13
+ donezk nordsjalland 1.2 4.5 6.8
14
+ chelsea juventus 1.9 3 3.2
15
+ bayern valencia 1.4 4 7
16
+ lille borissow 1.35 3.5 5.6
17
+ celtic benfica 3 3 2
18
+ barcelona spartak 1.05 6 12
19
+ braga cluj 1.45 3.4 4.6
20
+ manunited galatasaray 1.25 4.5 7.0
21
+
22
+
23
+ 2. Spieltag - Di./Mi., 2.+3. Okt 2012 || Wettprogramm 40A
24
+
25
+ spartak celtic 1.45 3.4 4.6
26
+ nordsjalland chelsea 7 4.5 1.25
27
+ juventus donezk 1.45 3.4 5.5
28
+ borissow bayern 6.6 4 1.3
29
+ valencia lille 1.45 3.4 4.6
30
+ benfica barcelona 6 4 1.45
31
+ cluj manunited 5 3.5 1.45
32
+ galatasaray braga 1.7 3.3 3.6
33
+
34
+ zenit milan 2 3 3
35
+ kiew zagreb 1.3 3.8 5.8
36
+ porto paris 2.1 2.9 2.9
37
+ arsenal olympiacos 1.3 4 6.6
38
+ schalke montpellier 1.45 3.4 5.5
39
+ anderlecht malaga 2.4 2.9 2.3
40
+ ajax madrid 6.6 4 1.3
41
+ mancity dortmund 1.75 3.6 3.9
42
+
43
+
44
+ 3. Spieltag - Di./Mi., 23.+24. Okt 2012 || Wettprogramm 43A
45
+
46
+ 23.10. 18:00 Spartak Moskau RUS Benfica Lis. POR 2,50 3,00 2,30
47
+ 23.10. 20:45 Nordsjaelland DEN Juventus Turin ITA 5,80 3,80 1,30
48
+ 23.10. 20:45 Shakhtar Don. UKR FC Chelsea ENG 2,30 3,00 2,50
49
+ 23.10. 20:45 Bate Borisov BLR FC Valencia ESP 2,80 2,90 2,00
50
+ 23.10. 20:45 Lille OSC FRA Bayern München GER 6,50 3,70 1,45
51
+ 23.10. 20:45 FC Barcelona ESP Celtic Glasgow SCO 1,05 6,50 10,00
52
+ 23.10. 20:45 Galatasaray TUR CFR Cluj ROU 1,50 3,40 4,80
53
+ 23.10. 20:45 Manchester U. ENG Sporting Braga POR 1,30 3,80 5,80
54
+
55
+ 24.10. 18:00 Zenit Petersb. RUS RSC Anderlecht BEL 1,40 3,50 4,90
56
+ 24.10. 20:45 FC Porto POR FC Dynamo Kiew UKR 1,45 3,30 5,00
57
+ 24.10. 20:45 Dinamo Zagreb CRO Paris S.Germai FRA 4,30 3,30 1,50
58
+ 24.10. 20:45 Montpellier FRA Olympiakos P. GRE 1,90 2,90 3,00
59
+ 24.10. 20:45 FC Arsenal ENG FC Schalke 04 GER 1,90 3,00 3,20
60
+ 24.10. 20:45 Malaga CF ESP AC Milan ITA 1,90 3,10 3,10
61
+ 24.10. 20:45 Bor. Dortmund GER Real Madrid ESP 3,30 3,20 2,00
62
+ 24.10. 20:45 Ajax Amsterdam NED Man. City ENG 3,90 3,20 1,65
63
+
64
+
65
+ 4. Spieltag - Di./Mi., 6.+7. Nov 2012 || Wettprogramm
66
+
67
+
68
+ 5. Spieltag - Di./Mi., 20.+21. Nov 2012 || Wettprogramm
69
+
70
+
71
+ 6. Spieltag - Di./Mi., 4.+5. Dez 2012 || Wettprogramm
72
+
73
+
74
+
75
+
data/db/services.rb ADDED
@@ -0,0 +1,7 @@
1
+ # encoding: utf-8
2
+
3
+ Service.create!( key:'tipp3', title:'tipp3' ) # tipp3 classic
4
+ Service.create!( key: 'betathome', title: 'bet-at-home' )
5
+
6
+ ## todo: use new version constant for app module e.g. Wettpool::VERSION ??
7
+ Prop.create!( key: 'db.services.version', value: '1' )
@@ -0,0 +1,31 @@
1
+
2
+ Quali 1. Spieltag - Fr. 7. Sep 2012 || Wettprogramm 36B
3
+
4
+ 07.09. 18:00 Kasachstan Irland 4,00 3,20 1,65
5
+ 07.09. 20:45 Deutschland Färöer Inseln 1,01 15,00 50,00
6
+
7
+
8
+ Quali 2. Spieltag - Di. 11. Sep 2012 || Wettprogramm 37A
9
+
10
+ 11.09. 20:30 Schweden Kasachstan 1,05 6,00 12,00
11
+ 11.09. 20:30 Österreich Deutschland 6,00 4,50 1,45
12
+
13
+
14
+ Quali 3. Spieltag - Fr. 12. Okt 2012 || Wettprogramm 41B
15
+
16
+ 12.10. 18:00 Färöer Inseln Schweden 11,00 6,00 1,10
17
+ 12.10. 18:00 Kasachstan Österreich 5,00 3,50 1,70
18
+ 12.10. 20:45 Irland Deutschland 5,50 4,00 1,35
19
+
20
+
21
+ Quali 4. Spieltag - Di. 16. Okt 2012 || Wettprogramm 42A
22
+
23
+ 16.10. 20:00 Färöer Inseln Irland 6,50 4,00 1,30
24
+ 16.10. 20:30 Österreich Kasachstan 1,20 6,00 12,00
25
+ 16.10. 20:45 Deutschland Schweden 1,20 5,00 8,00
26
+
27
+
28
+ Quali 5. Spieltag - Fr. 22. Mär 2013
29
+
30
+ Quali 6. Spieltag - Di. 26. Mär 2013
31
+
@@ -0,0 +1,20 @@
1
+
2
+ ## NB: do NOT require sportdb (avoid circular loading)
3
+ #### require 'sportdb'
4
+
5
+
6
+ ## todo: how to include 'sportdb/market/version' - does it work? ?
7
+
8
+ require 'sportdb/market/version'
9
+ require 'sportdb/market/schema'
10
+ require 'sportdb/market/models/service'
11
+ require 'sportdb/market/models/group_quote'
12
+ require 'sportdb/market/models/event_quote'
13
+ require 'sportdb/market/models/game'
14
+ require 'sportdb/market/reader'
15
+
16
+
17
+ module SportDB::Market
18
+ puts "hello from sportdb-market, version #{VERSION}"
19
+ end
20
+
@@ -0,0 +1,27 @@
1
+
2
+ ## NB: just use namespace SportDB::Models (not SportDB::Models::Market)
3
+
4
+ module SportDB::Models
5
+
6
+ class EventQuote < ActiveRecord::Base
7
+
8
+ self.table_name = 'event_quotes'
9
+
10
+ belongs_to :service
11
+ belongs_to :event
12
+ belongs_to :team
13
+
14
+ def self.create_from_ary!( teams_with_odds, service, event )
15
+ teams_with_odds.each do |values|
16
+ EventQuote.create!(
17
+ :service => service,
18
+ :event => event,
19
+ :team => values[0],
20
+ :odds => values[1] )
21
+ end # each team
22
+ end
23
+
24
+
25
+ end # class EventQuote
26
+
27
+ end # module SportDB::Models
@@ -0,0 +1,15 @@
1
+
2
+ ## NB: just use namespace SportDB::Models (not SportDB::Models::Market)
3
+
4
+ module SportDB::Models
5
+
6
+ ################################
7
+ ## extend Game w/ quotes etc.
8
+
9
+ class Game
10
+
11
+ has_many :quotes
12
+
13
+ end # class Game
14
+
15
+ end # module SportDB::Models
@@ -0,0 +1,26 @@
1
+
2
+ ## NB: just use namespace SportDB::Models (not SportDB::Models::Market)
3
+
4
+ module SportDB::Models
5
+
6
+ class GroupQuote < ActiveRecord::Base
7
+
8
+ self.table_name = 'group_quotes'
9
+
10
+ belongs_to :service
11
+ belongs_to :group
12
+ belongs_to :team
13
+
14
+ def self.create_from_ary!( teams_with_odds, service, group )
15
+ teams_with_odds.each do |values|
16
+ GroupQuote.create!(
17
+ :service => service,
18
+ :group => group,
19
+ :team => values[0],
20
+ :odds => values[1] )
21
+ end # each team
22
+ end
23
+
24
+ end # class GroupQuote
25
+
26
+ end # module SportDB::Models
@@ -0,0 +1,13 @@
1
+
2
+ ## NB: just use namespace SportDB::Models (not SportDB::Models::Market)
3
+
4
+ module SportDB::Models
5
+
6
+ class Service < ActiveRecord::Base
7
+
8
+ has_many :event_quotes, :order => 'odds' # event_(team_winner)_quotes
9
+ has_many :group_quotes, :order => 'odds' # group_(team_winner)_quotes
10
+
11
+ end # class Service
12
+
13
+ end # module SportDB::Models
@@ -0,0 +1,2 @@
1
+
2
+ # do something here
@@ -0,0 +1,59 @@
1
+
2
+ module SportDB::Market
3
+
4
+
5
+ class CreateDB
6
+
7
+ ## make models available in sportdb module by default with namespace
8
+ # e.g. lets you use Team instead of Models::Team
9
+ include SportDB::Models
10
+
11
+
12
+ def self.up
13
+
14
+ ActiveRecord::Schema.define do
15
+
16
+ create_table :services do |t| # quote service (e.g. tipp3,tipico,etc.)
17
+ t.string :title, :null => false
18
+ t.string :key, :null => false
19
+ t.timestamps
20
+ end
21
+
22
+ create_table :quotes do |t|
23
+ t.references :service, :null => false # quote service (e.g. tipp3,tipico,etc.)
24
+ t.references :game, :null => false
25
+ t.decimal :odds1, :null => false
26
+ t.decimal :oddsx, :null => false
27
+ t.decimal :odds2, :null => false
28
+ t.string :comments
29
+ t.timestamps
30
+ end
31
+
32
+ create_table :event_quotes do |t|
33
+ t.references :service, :null => false # quote service (e.g. tipp3,tipico,etc.)
34
+ t.references :event, :null => false
35
+ t.references :team, :null => false
36
+ t.decimal :odds, :null => false # winner odds (e.g. 3,5 or 90 etc.)
37
+ t.string :comments
38
+ t.timestamps
39
+ end
40
+
41
+ create_table :group_quotes do |t|
42
+ t.references :service, :null => false # quote service (e.g. tipp3,tipico,etc.)
43
+ t.references :group, :null => false
44
+ t.references :team, :null => false
45
+ t.decimal :odds, :null => false # winner odds (e.g. 3,5 or 90 etc.)
46
+ t.string :comments
47
+ t.timestamps
48
+ end
49
+
50
+ end # block Schema.define
51
+
52
+ Prop.create!( key: 'db.schema.sport.market.version', value: SportDB::Market::VERSION )
53
+
54
+ end # method self.up
55
+
56
+ end # class CreateDB
57
+
58
+
59
+ end # module SportDB::Market
@@ -0,0 +1,6 @@
1
+
2
+ module SportDB ; end # forward reference (for hoe require)
3
+
4
+ module SportDB::Market
5
+ VERSION = '0.0.4'
6
+ end
@@ -0,0 +1,18 @@
1
+
2
+
3
+ puts "hello from sportdb_plugin script (sportdb-market)"
4
+
5
+ require 'sportdb/market/market'
6
+
7
+
8
+ #require 'rubygems/command_manager'
9
+ #require 'rubygems/mirror/command'
10
+ #
11
+ #Gem::CommandManager.instance.register_command :mirror
12
+
13
+
14
+
15
+ ## make it work like Rubygems? how?
16
+
17
+
18
+ ### SportDB::PluginMan.register :market
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sportdb-market
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 4
10
+ version: 0.0.4
11
+ platform: ruby
12
+ authors:
13
+ - Gerald Bauer
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-11-13 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rdoc
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 19
29
+ segments:
30
+ - 3
31
+ - 10
32
+ version: "3.10"
33
+ type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ~>
42
+ - !ruby/object:Gem::Version
43
+ hash: 7
44
+ segments:
45
+ - 3
46
+ - 0
47
+ version: "3.0"
48
+ type: :development
49
+ version_requirements: *id002
50
+ description: sportdb plugin for market quotes (odds, etc)
51
+ email: opensport@googlegroups.com
52
+ executables: []
53
+
54
+ extensions: []
55
+
56
+ extra_rdoc_files:
57
+ - Manifest.txt
58
+ - db/at/2012_13/bl_quotes_betathome.txt
59
+ - db/at/2012_13/bl_quotes_tipp3.txt
60
+ - db/at/2012_13/cup_quotes_betathome.txt
61
+ - db/at/2012_13/cup_quotes_tipp3.txt
62
+ - db/cl/2012_13/cl_quotes_betathome.txt
63
+ - db/cl/2012_13/cl_quotes_tipp3.txt
64
+ - db/world/quali_quotes_tipp3.txt
65
+ files:
66
+ - GEM.HISTORY.md
67
+ - GEM.README.md
68
+ - Manifest.txt
69
+ - Rakefile
70
+ - db/at/2012_13/bl_quotes.rb
71
+ - db/at/2012_13/bl_quotes_betathome.txt
72
+ - db/at/2012_13/bl_quotes_tipp3.txt
73
+ - db/at/2012_13/cup_quotes.rb
74
+ - db/at/2012_13/cup_quotes_betathome.txt
75
+ - db/at/2012_13/cup_quotes_tipp3.txt
76
+ - db/cl/2012_13/cl_quotes.rb
77
+ - db/cl/2012_13/cl_quotes_betathome.txt
78
+ - db/cl/2012_13/cl_quotes_tipp3.txt
79
+ - db/services.rb
80
+ - db/world/quali_quotes_tipp3.txt
81
+ - lib/sportdb/market/market.rb
82
+ - lib/sportdb/market/models/event_quote.rb
83
+ - lib/sportdb/market/models/game.rb
84
+ - lib/sportdb/market/models/group_quote.rb
85
+ - lib/sportdb/market/models/service.rb
86
+ - lib/sportdb/market/reader.rb
87
+ - lib/sportdb/market/schema.rb
88
+ - lib/sportdb/market/version.rb
89
+ - lib/sportdb_plugin.rb
90
+ homepage: http://geraldb.github.com/sport.db
91
+ licenses: []
92
+
93
+ post_install_message:
94
+ rdoc_options:
95
+ - --main
96
+ - GEM.README.md
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ hash: 3
105
+ segments:
106
+ - 0
107
+ version: "0"
108
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ hash: 3
114
+ segments:
115
+ - 0
116
+ version: "0"
117
+ requirements: []
118
+
119
+ rubyforge_project: sportdb-market
120
+ rubygems_version: 1.8.24
121
+ signing_key:
122
+ specification_version: 3
123
+ summary: sportdb plugin for market quotes (odds, etc)
124
+ test_files: []
125
+