sportdb-config 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/HISTORY.md +3 -0
  3. data/Manifest.txt +65 -0
  4. data/README.md +27 -0
  5. data/Rakefile +26 -0
  6. data/config/geos/eng.txt +162 -0
  7. data/config/leagues/eng.txt +40 -0
  8. data/config/leagues/fr.txt +9 -0
  9. data/config/leagues/gr.txt +7 -0
  10. data/config/leagues/sco.txt +19 -0
  11. data/config/teams/al.txt +6 -0
  12. data/config/teams/at.txt +26 -0
  13. data/config/teams/be.txt +58 -0
  14. data/config/teams/bg.txt +6 -0
  15. data/config/teams/by.txt +5 -0
  16. data/config/teams/ca.txt +4 -0
  17. data/config/teams/ch.txt +10 -0
  18. data/config/teams/cy.txt +7 -0
  19. data/config/teams/cz.txt +6 -0
  20. data/config/teams/de.txt +129 -0
  21. data/config/teams/dk.txt +6 -0
  22. data/config/teams/eng.txt +294 -0
  23. data/config/teams/es.txt +148 -0
  24. data/config/teams/fi.txt +6 -0
  25. data/config/teams/fr.txt +98 -0
  26. data/config/teams/ga.txt +5 -0
  27. data/config/teams/gr.txt +87 -0
  28. data/config/teams/hr.txt +9 -0
  29. data/config/teams/hu.txt +5 -0
  30. data/config/teams/ie.txt +5 -0
  31. data/config/teams/is.txt +6 -0
  32. data/config/teams/it.txt +99 -0
  33. data/config/teams/lu.txt +6 -0
  34. data/config/teams/mc.txt +4 -0
  35. data/config/teams/md.txt +4 -0
  36. data/config/teams/mt.txt +6 -0
  37. data/config/teams/mx.txt +30 -0
  38. data/config/teams/nir.txt +6 -0
  39. data/config/teams/nl.txt +45 -0
  40. data/config/teams/no.txt +7 -0
  41. data/config/teams/pl.txt +6 -0
  42. data/config/teams/pt.txt +53 -0
  43. data/config/teams/ro.txt +5 -0
  44. data/config/teams/rs.txt +6 -0
  45. data/config/teams/ru.txt +5 -0
  46. data/config/teams/sco.txt +73 -0
  47. data/config/teams/se.txt +6 -0
  48. data/config/teams/si.txt +5 -0
  49. data/config/teams/sk.txt +5 -0
  50. data/config/teams/tr.txt +39 -0
  51. data/config/teams/ua.txt +5 -0
  52. data/config/teams/us.txt +44 -0
  53. data/config/teams/wal.txt +16 -0
  54. data/lib/sportdb/config.rb +26 -0
  55. data/lib/sportdb/config/config.rb +77 -0
  56. data/lib/sportdb/config/league.rb +118 -0
  57. data/lib/sportdb/config/league_reader.rb +65 -0
  58. data/lib/sportdb/config/structs/team.rb +45 -0
  59. data/lib/sportdb/config/team_reader.rb +108 -0
  60. data/lib/sportdb/config/utils/league_utils.rb +24 -0
  61. data/lib/sportdb/config/utils/season_utils.rb +116 -0
  62. data/lib/sportdb/config/version.rb +35 -0
  63. data/test/helper.rb +10 -0
  64. data/test/test_config.rb +19 -0
  65. data/test/test_league_utils.rb +90 -0
  66. data/test/test_season_utils.rb +29 -0
  67. metadata +189 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 27b20a5a1fa77fd2a05a765c83888c6d2970f88e
4
+ data.tar.gz: 12b455a4372513971389fb5e5ed358ce03a5012f
5
+ SHA512:
6
+ metadata.gz: 7f7d4a18697e93cf61f53c2f241c67d9b6493cdaa73085e5598d64c73a13ce6951a14b864e082b6c3d2fafd47565dff336dfb9ccb23b2f994733aad9e5ea9bd4
7
+ data.tar.gz: df93600e8fe40205ce58da59796bae64a27b96372e556a4f9a64d042501ef32328a90a21dc7b7005487e34498c0a50b75aa1b1e5983554e75cac745d8b827458
@@ -0,0 +1,3 @@
1
+ ### 0.0.1 / 2019-06-29
2
+
3
+ * Everything is new. First release.
@@ -0,0 +1,65 @@
1
+ HISTORY.md
2
+ Manifest.txt
3
+ README.md
4
+ Rakefile
5
+ config/geos/eng.txt
6
+ config/leagues/eng.txt
7
+ config/leagues/fr.txt
8
+ config/leagues/gr.txt
9
+ config/leagues/sco.txt
10
+ config/teams/al.txt
11
+ config/teams/at.txt
12
+ config/teams/be.txt
13
+ config/teams/bg.txt
14
+ config/teams/by.txt
15
+ config/teams/ca.txt
16
+ config/teams/ch.txt
17
+ config/teams/cy.txt
18
+ config/teams/cz.txt
19
+ config/teams/de.txt
20
+ config/teams/dk.txt
21
+ config/teams/eng.txt
22
+ config/teams/es.txt
23
+ config/teams/fi.txt
24
+ config/teams/fr.txt
25
+ config/teams/ga.txt
26
+ config/teams/gr.txt
27
+ config/teams/hr.txt
28
+ config/teams/hu.txt
29
+ config/teams/ie.txt
30
+ config/teams/is.txt
31
+ config/teams/it.txt
32
+ config/teams/lu.txt
33
+ config/teams/mc.txt
34
+ config/teams/md.txt
35
+ config/teams/mt.txt
36
+ config/teams/mx.txt
37
+ config/teams/nir.txt
38
+ config/teams/nl.txt
39
+ config/teams/no.txt
40
+ config/teams/pl.txt
41
+ config/teams/pt.txt
42
+ config/teams/ro.txt
43
+ config/teams/rs.txt
44
+ config/teams/ru.txt
45
+ config/teams/sco.txt
46
+ config/teams/se.txt
47
+ config/teams/si.txt
48
+ config/teams/sk.txt
49
+ config/teams/tr.txt
50
+ config/teams/ua.txt
51
+ config/teams/us.txt
52
+ config/teams/wal.txt
53
+ lib/sportdb/config.rb
54
+ lib/sportdb/config/config.rb
55
+ lib/sportdb/config/league.rb
56
+ lib/sportdb/config/league_reader.rb
57
+ lib/sportdb/config/structs/team.rb
58
+ lib/sportdb/config/team_reader.rb
59
+ lib/sportdb/config/utils/league_utils.rb
60
+ lib/sportdb/config/utils/season_utils.rb
61
+ lib/sportdb/config/version.rb
62
+ test/helper.rb
63
+ test/test_config.rb
64
+ test/test_league_utils.rb
65
+ test/test_season_utils.rb
@@ -0,0 +1,27 @@
1
+ # sportdb-config - sport.db configuration settings and built-in defaults
2
+
3
+
4
+ * home :: [github.com/sportdb/sport.db](https://github.com/sportdb/sport.db)
5
+ * bugs :: [github.com/sportdb/sport.db/issues](https://github.com/sportdb/sport.db/issues)
6
+ * gem :: [rubygems.org/gems/sportdb-config](https://rubygems.org/gems/sportdb-config)
7
+ * rdoc :: [rubydoc.info/gems/sportdb-config](http://rubydoc.info/gems/sportdb-config)
8
+ * forum :: [opensport](http://groups.google.com/group/opensport)
9
+
10
+
11
+ ## Usage
12
+
13
+
14
+
15
+
16
+
17
+ ## License
18
+
19
+ The `sportdb-config` scripts are dedicated to the public domain.
20
+ Use it as you please with no restrictions whatsoever.
21
+
22
+
23
+ ## Questions? Comments?
24
+
25
+ Send them along to the
26
+ [Open Sports & Friends Forum/Mailing List](http://groups.google.com/group/opensport).
27
+ Thanks!
@@ -0,0 +1,26 @@
1
+ require 'hoe'
2
+ require './lib/sportdb/config/version.rb'
3
+
4
+ Hoe.spec 'sportdb-config' do
5
+
6
+ self.version = SportDb::Boot::VERSION
7
+
8
+ self.summary = "sportdb-config - sport.db configuration settings and built-in defaults"
9
+ self.description = summary
10
+
11
+ self.urls = ['https://github.com/sportdb/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 = 'README.md'
18
+ self.history_file = 'HISTORY.md'
19
+
20
+ self.licenses = ['Public Domain']
21
+
22
+ self.spec_extras = {
23
+ :required_ruby_version => '>= 2.2.2'
24
+ }
25
+
26
+ end
@@ -0,0 +1,162 @@
1
+ ##
2
+ # what name? use regions or maps or geos or zones or __?
3
+
4
+ #
5
+ # england
6
+ # see https://en.wikipedia.org/wiki/Subdivisions_of_England
7
+ # see https://www.bbc.co.uk/news/england/regions
8
+
9
+ ##
10
+ # todo: for sort order - allow different sort name
11
+ # e.g. East Sussex => Sussex (East) or Sussex, East or something
12
+ # use <> for marking what counts for sorting
13
+ # e.g East <Sussex> => get auto-converted to Sussex, East - why? why not?
14
+ #
15
+ # more examples:
16
+ # North ‹Yorkshire› => Yorkshire (North) or Yorkshire, North
17
+ # Greater ‹London› => London, Greater
18
+ # Greater ‹Manchaster› => Manchaster, Greater
19
+
20
+
21
+ ##
22
+ # note: uses all regions following the camra good beer guide (book)
23
+ #
24
+
25
+ ======================================
26
+ == North West England ==
27
+
28
+ # Cumbria
29
+ # Lancashire
30
+ # Liverpool
31
+ # Manchester
32
+
33
+ Cheshire
34
+ Cumbria
35
+ Lancashire
36
+ Greater Manchester | Manchester, Greater
37
+ Liverpool & Merseyside | Merseyside ## note: added Liverpool & - why? why not?
38
+
39
+
40
+ ===================================
41
+ == North East England
42
+
43
+ # Tees
44
+ # Tyne & Wear
45
+
46
+ Durham
47
+ Newcastle & Northumberland | Northumberland ## note: added Newcastle & - why? why not?
48
+ Tyne and Wear
49
+
50
+
51
+ =====================================
52
+ == Yorkshire & Lincolnshire ==
53
+
54
+ # Humberside
55
+ # Leeds & West Yorkshire
56
+ # Lincolnshire
57
+ # Sheffield & South Yorkshire
58
+ # York & North Yorkshire
59
+
60
+ Lincolnshire
61
+ West Yorkshire | Yorkshire, West | Yorkshire (West)
62
+ South Yorkshire | Yorkshire, South | Yorkshire (South)
63
+ North Yorkshire | Yorkshire, North | Yorkshire (North)
64
+ East Yorkshire | Yorkshire, East | Yorkshire (East)
65
+
66
+
67
+ ==================================
68
+ == West Midlands
69
+
70
+ # Birmingham & Black Country
71
+ # Coventry & Warwickshire
72
+ # Hereford & Worcester
73
+ # Shropshire
74
+ # Stoke & Staffordshire
75
+
76
+ Herefordshire
77
+ Shropshire
78
+ Staffordshire
79
+ Warwickshire
80
+ Birmingham & West Midlands | West Midlands ## note: added Birmingham - why? why not?
81
+ Worcestershire
82
+
83
+
84
+ ==================================
85
+ == East Midlands
86
+
87
+ # Derby
88
+ # Leicester
89
+ # Northampton
90
+ # Nottingham
91
+
92
+ Derbyshire
93
+ Leicestershire
94
+ Northamptonshire
95
+ Nottinghamshire
96
+ Rutland
97
+
98
+
99
+ ===================================
100
+ == West & South West
101
+
102
+ # Bristol
103
+ # Cornwall
104
+ # Devon
105
+ # Gloucestershire
106
+ # Somerset
107
+ # Wiltshire
108
+
109
+
110
+ Cornwall
111
+ Devon
112
+ Bristol & Gloucestershire | Gloucestershire
113
+ Somerset
114
+ Wiltshire
115
+
116
+
117
+ =================================
118
+ == East
119
+
120
+ # Beds, Herts & Bucks
121
+ # Cambridgeshire
122
+ # Essex
123
+ # Norfolk
124
+ # Suffolk
125
+
126
+ Bedfordshire
127
+ Hertfordshire
128
+ Buckinghamshire
129
+ Cambridgeshire
130
+ Essex
131
+ Norfolk
132
+ Suffolk
133
+
134
+
135
+ ===============================
136
+ == South
137
+
138
+ # Berkshire
139
+ # Dorset
140
+ # Hampshire & Isle of Wight
141
+ # Oxford
142
+
143
+ Berkshire
144
+ Dorset
145
+ Hampshire
146
+ Oxfordshire
147
+
148
+
149
+
150
+ ===============================
151
+ == London & South East
152
+
153
+ # Kent
154
+ # London
155
+ # Surrey
156
+ # Sussex
157
+
158
+ Greater London | London, Greater
159
+ Kent
160
+ Surrey
161
+ East Sussex | Sussex, East | Sussex (East)
162
+ West Sussex | Sussex, West | Sussex (West)
@@ -0,0 +1,40 @@
1
+ ## all lowercase (no-space) key optional
2
+ ## if not present auto-generate from name
3
+
4
+ #############################
5
+ ## todo / future: add number of clubs / teams ?? why? why not?
6
+ ## add up/down - relegation?, champions league, europe league? etc.
7
+ ## check how to handle groups with playoffs ? (e.g. see belgium)
8
+ ##
9
+ ## use 1/2 or 1+2 or => for relegation playoff - why? why not???
10
+
11
+
12
+ 1 => premierleague, English Premier League
13
+ 2 => championship, English Championship League
14
+ 3 => league1, English League 1
15
+ 4 => league2, English League 2
16
+ 5 => conference, English Conference
17
+
18
+ #########################################
19
+ # until (including) 2003-04 season
20
+
21
+ [2003-04] # or just use 2003-04: or similar - why? why not?
22
+ # or use 2003/04 - 1992/93 - why? why not?
23
+
24
+ 1 => premierleague, English Premier League
25
+ 2 => division1, English Division 1
26
+ 3 => division2, English Division 2
27
+ 4 => division3, English Division 3
28
+
29
+
30
+ #############################################
31
+ # note: in season 1992/93 the premier league starts
32
+ # until (including) 1991-92} season
33
+
34
+ [1991-92]
35
+ 1 => division1, English Division 1
36
+ 2 => division2, English Division 2
37
+ 3 => division3, English Division 3
38
+ 3a => division3n, English Division 3 (North)
39
+ 3b => division3s, English Division 3 (South)
40
+ 4 => division4, English Division 4 ## check if real?
@@ -0,0 +1,9 @@
1
+
2
+
3
+ 1 => ligue1, French Ligue 1
4
+ 2 => ligue2, French Ligue 2
5
+
6
+
7
+ [2001-02] ## until (including) 2001-02 season
8
+ 1 => division1, ? ## use championat or something? check official name
9
+ 2 => division2, ?
@@ -0,0 +1,7 @@
1
+
2
+
3
+ 1 => superleague, Greek Superleague
4
+
5
+
6
+ [2005-06] ## until (including) 2005-06 season
7
+ 1 => alphaethniki, Greek Alpha Ethniki
@@ -0,0 +1,19 @@
1
+
2
+ 1 => premiership, Scotish Premiership # starting w/ 2013-14 season
3
+ 2 => championship, Scotish Championship
4
+ 3 => league1, Scotish League One
5
+ 4 => league2, Scotish League Two
6
+
7
+
8
+ [2012-13] ## until (including) 2012-13 season
9
+ 1 => premierleague, Scotish Premiership
10
+ 2 => division1, Scotish 1st Division
11
+ 3 => division2, Scotish League One
12
+ 4 => division3, Scotish League Two
13
+
14
+
15
+ [1997-98] ## until (including) season
16
+ 1 => premierdivision, Scotish Premier Division
17
+ 2 => division1, Scotish 1st Division
18
+ 3 => division2, Scotish 2nd Division
19
+ 4 => division3, Scotish 3rd Division
@@ -0,0 +1,6 @@
1
+ ###################################
2
+ # Albania (al)
3
+
4
+
5
+ KF Tirana => KF Tirana, Tirana ## Klubi i Futbollit Tirana
6
+ FK Partizani Tirana => FK Partizani Tirana, Tirana
@@ -0,0 +1,26 @@
1
+
2
+ Austria Vienna | Austria Wien => FK Austria Wien, Wien
3
+ Rapid Vienna | Rapid Wien => SK Rapid Wien, Wien
4
+ Wiener Sport-Club => Wiener Sport-Club, Wien
5
+
6
+
7
+ Mattersburg => SV Mattersburg, Mattersburg › Burgenland
8
+
9
+ Admira | Admira Wien => FC Admira Wacker Mödling, Maria Enzersdorf › Niederösterreich ## use Südstadt ?? - Südstadt ist ein Ortsteil der Marktgemeinde Maria Enzersdorf
10
+ Neustadt => SC Wiener Neustadt, Wr. Neustadt › Niederösterreich
11
+ St. Polten => SKN St. Pölten, St. Pölten › Niederösterreich
12
+
13
+ LASK Linz | Linzer ASK => LASK Linz, Linz › Oberösterreich ## use Pasching ??
14
+ SK VOEST Linz => FC Stahl Linz, Linz › Oberösterreich
15
+ Ried => SV Ried, Ried i. Innkreis › Oberösterreich
16
+
17
+ Sturm Graz => SK Sturm Graz, Graz › Steiermark
18
+
19
+ AC Wolfsberger => Wolfsberger AC, Wolfsberg › Kärnten
20
+
21
+ Grodig => SV Grödig, Grödig › Salzburg
22
+ Salzburg => FC RB Salzburg, Salzburg › Salzburg ## use Wals-Siezenheim ??
23
+
24
+ Wacker Innsbruck | FC Tirol => FC Wacker Innsbruck, Innsbruck › Tirol ## FC Tirol old name
25
+
26
+ Altach => SCR Altach, Altach › Vorarlberg
@@ -0,0 +1,58 @@
1
+ ##########################################
2
+ # be-belgium - [nl,fr,de]
3
+
4
+
5
+ Anderlecht => RSC Anderlecht, Brussels
6
+ FC Brussels => FC Brussels, Brussels
7
+ Molenbeek => RWD Molenbeek, Brussels
8
+
9
+
10
+ Antwerp => Royal Antwerp FC, Antwerpen › Antwerpen › Vlaanderen
11
+ Germinal => Germinal Beerschot, Antwerpen › Antwerpen › Vlaanderen
12
+
13
+
14
+
15
+ Charleroi => Sporting Charleroi, Charleroi › Hainaut › Wallonie ## [fr] Royal Charleroi Sporting Club; Sporting de Charleroi
16
+ Mouscron | Mouscron-Peruwelz => Royal Excel Mouscron, Mouscron › Hainaut › Wallonie ## Moeskroen [nl]
17
+ Bergen => RAEC Mons, Mons › Hainaut › Wallonie ## Bergen [nl]
18
+
19
+ Eupen => KAS Eupen, Eupen › Liège › Wallonie ## [de]
20
+ Standard | Standard Liege => Standard Liège, Liège › Liège › Wallonie ## [fr] Standard de Liège
21
+
22
+
23
+ Mechelen => KV Mechelen, Mechelen › Antwerpen › Vlaanderen
24
+ Westerlo => KVC Westerlo, Westerlo › Antwerpen › Vlaanderen
25
+ Lierse => K Lierse SK, Lier › Antwerpen › Vlaanderen
26
+
27
+ Genk => KRC Genk, Genk › Limburg › Vlaanderen
28
+ St Truiden => Sint-Truidense VV, Sint-Truiden › Limburg › Vlaanderen
29
+
30
+ Gent => KAA Gent, Gent › Oost-Vlaanderen › Vlaanderen
31
+ Lokeren => KSC Lokeren OV, Lokeren › Oost-Vlaanderen › Vlaanderen ## Sporting Lokeren
32
+ Aalst => SC Eendracht Aalst, Aalst › Oost-Vlaanderen › Vlaanderen
33
+ Dender => FCV Dender EH, Denderleeuw › Oost-Vlaanderen › Vlaanderen
34
+
35
+ Waasland-Beveren => Waasland-Beveren, Beveren › Oost-Vlaanderen › Vlaanderen ## KVRS Waasland - SK Beveren
36
+ Beveren => KSK Beveren, Beveren › Oost-Vlaanderen › Vlaanderen
37
+
38
+
39
+
40
+ Club Brugge => Club Brugge, Brugge › West-Vlaanderen › Vlaanderen ## Club Brugge KV
41
+ Cercle Brugge => Cercle Brugge, Brugge › West-Vlaanderen › Vlaanderen ## Cercle Brugge KSV
42
+
43
+ Kortrijk => KV Kortrijk, Kortrijk › West-Vlaanderen › Vlaanderen
44
+ Oostende => KV Oostende, Oostende › West-Vlaanderen › Vlaanderen
45
+ Waregem => SV Zulte Waregem, Waregem › West-Vlaanderen › Vlaanderen
46
+
47
+
48
+
49
+
50
+ Geel => KFC Verbroedering Geel, Geel
51
+ Harelbeke => KRC Harelbeke, Harelbeke
52
+ Heusden Zolder => K Heusden-Zolder, Heusden-Zolder
53
+ Lommel => KFC Lommel SK, Lommel
54
+ Louvieroise => RAA Louviéroise, La Louvière
55
+ Roeselare => KSV Roeselare, Roeselare
56
+ Seraing => RFC Seraing, Seraing
57
+ Tubize => AFC Tubize, Tubize
58
+ Oud-Heverlee Leuven => Oud-Heverlee Leuven, Leuven