sportdb 1.8.13 → 1.8.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/bin/sportdb +0 -0
- data/config/fixtures/de.yml +4 -3
- data/config/fixtures/en.yml +10 -11
- data/config/fixtures/es.yml +4 -3
- data/config/fixtures/fr.yml +3 -3
- data/config/fixtures/it.yml +3 -3
- data/config/fixtures/pt.yml +2 -3
- data/config/fixtures/ro.yml +4 -4
- data/data/seasons.txt +8 -0
- data/lib/sportdb/lang.rb +22 -7
- data/lib/sportdb/reader.rb +19 -22
- data/lib/sportdb/version.rb +1 -1
- data/test/test_lang.rb +38 -26
- data/test/test_round_header.rb +29 -1
- metadata +72 -44
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 5cefa76f8ddfdb3d4e725aa3e91ba49691f8fc19
|
|
4
|
+
data.tar.gz: 4b13723ae7ef89874187ca474216d944bfd7e765
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 3911dd470b9117eea519f09eab2e675e5e398ea360dbaa3adf2fdb6997d25926836538f7bd2f4637abd1bc2d000e72ff56ab716d1d834f8641bbab5a63326e92
|
|
7
|
+
data.tar.gz: bef43a3710fe4d9d06221d386609244693333f02164bdbc673b4ab2ad2c61d4469c6fd4b64de2da93159300d652aa4137e1440682b474caf63d31ba7056e93b5
|
data/bin/sportdb
CHANGED
|
File without changes
|
data/config/fixtures/de.yml
CHANGED
|
@@ -4,19 +4,20 @@
|
|
|
4
4
|
|
|
5
5
|
group: Gruppe
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
round: Runde
|
|
7
|
+
round: Spieltag|Runde
|
|
8
|
+
|
|
10
9
|
|
|
11
10
|
stage: Gruppenphase|Qualifikation|Play-off|Finalrunde|K.-o.-Phase
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
### Knock out rounds
|
|
15
14
|
|
|
15
|
+
## fix: add playoffs:
|
|
16
16
|
round32: Sechzehntelfinale|1/16 Finale
|
|
17
17
|
round16: Achtelfinale|1/8 Finale
|
|
18
18
|
quarterfinals: Viertelfinale|1/4 Finale
|
|
19
19
|
semifinals: Halbfinale|Semifinale|1/2 Finale
|
|
20
|
+
fifthplace: Spiel um Platz 5
|
|
20
21
|
thirdplace: Spiel um Platz 3
|
|
21
22
|
final: Finale|Endspiel
|
|
22
23
|
|
data/config/fixtures/en.yml
CHANGED
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
group: Group
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
matchday: Matchday
|
|
10
|
-
round: Round
|
|
7
|
+
round: Round|Matchday
|
|
11
8
|
|
|
12
9
|
stage: Stage|Phase|Rounds
|
|
13
10
|
# e.g.
|
|
@@ -20,20 +17,22 @@ stage: Stage|Phase|Rounds
|
|
|
20
17
|
|
|
21
18
|
|
|
22
19
|
|
|
23
|
-
|
|
24
20
|
### Knockout rounds
|
|
25
21
|
|
|
22
|
+
playoffs: Play-off|Play-offs|Play-off for quarter-finals
|
|
26
23
|
round32: Round of 32|Last 32
|
|
27
|
-
round16: Round of 16|Last 16
|
|
28
|
-
quarterfinals: Quarterfinals|Quarter-finals|Quarters|Quarterfinal
|
|
29
|
-
semifinals: Semifinals|Semi-finals|Semis
|
|
30
|
-
|
|
24
|
+
round16: Round of 16|Last 16|8th finals
|
|
25
|
+
quarterfinals: Quarterfinals|Quarter-finals|Quarters|Quarterfinal|Last 8
|
|
26
|
+
semifinals: Semifinals|Semi-finals|Semis|Last 4
|
|
27
|
+
fifthplace: Fifth place match|Fifth place|5th place match|5th place final|5th place|Match for fifth place|Match for 5th place
|
|
28
|
+
thirdplace: Third place match|Third place|3rd place match|3rd place final|3rd place|Match for third place|Match for 3rd place|Third-place play-off|Third place play-off
|
|
31
29
|
final: Final|Finals
|
|
32
30
|
|
|
31
|
+
|
|
33
32
|
### Pair matches/games if marked with leg1 n leg2
|
|
34
33
|
|
|
35
|
-
leg1: 1st leg|
|
|
36
|
-
leg2: 2nd leg|
|
|
34
|
+
leg1: 1st leg|First leg
|
|
35
|
+
leg2: 2nd leg|Second leg
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
#######################
|
data/config/fixtures/es.yml
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
group: Grupo
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
matchday: Jornada
|
|
9
|
-
round: Fecha
|
|
7
|
+
round: Fecha|Jornada
|
|
10
8
|
|
|
11
9
|
|
|
12
10
|
stage: Primera fase|Segunda fase|Fase de grupos|Fase final
|
|
@@ -14,6 +12,9 @@ stage: Primera fase|Segunda fase|Fase de grupos|Fase final
|
|
|
14
12
|
|
|
15
13
|
### Knock out rounds
|
|
16
14
|
|
|
15
|
+
## fix: add playoffs + fifthplace
|
|
16
|
+
|
|
17
|
+
|
|
17
18
|
round32: Dieciseisavos de final|16vos de final
|
|
18
19
|
round16: Octavos|Octavos de final|8vos de final
|
|
19
20
|
quarterfinals: Cuartos|Cuartos de final|4tos de final
|
data/config/fixtures/fr.yml
CHANGED
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
group: Groupe
|
|
6
6
|
|
|
7
|
-
## roll into one (matchday+round) ???
|
|
8
|
-
|
|
9
|
-
matchday: Journée
|
|
10
7
|
round: Journée
|
|
11
8
|
|
|
12
9
|
stage: Phase de groupes|Phase à élimination directe|Phase finale
|
|
@@ -23,6 +20,9 @@ stage: Phase de groupes|Phase à élimination directe|Phase finale
|
|
|
23
20
|
|
|
24
21
|
### Knockout rounds
|
|
25
22
|
|
|
23
|
+
## fix: add playoffs + fifthplace
|
|
24
|
+
|
|
25
|
+
|
|
26
26
|
round32: Seizièmes de finale
|
|
27
27
|
round16: Huitièmes de finale
|
|
28
28
|
quarterfinals: Quarts de finale
|
data/config/fixtures/it.yml
CHANGED
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
group: Gruppo
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
## roll into one (matchday+round) ???
|
|
9
|
-
|
|
10
|
-
matchday: Giornata
|
|
11
8
|
round: Giornata
|
|
12
9
|
|
|
13
10
|
stage: Fase a gironi|Fase a eliminazione diretta
|
|
@@ -24,6 +21,9 @@ stage: Fase a gironi|Fase a eliminazione diretta
|
|
|
24
21
|
|
|
25
22
|
### Knockout rounds
|
|
26
23
|
|
|
24
|
+
## fix: add playoffs + fifthplace
|
|
25
|
+
|
|
26
|
+
|
|
27
27
|
round32: Sedicesimi di finale
|
|
28
28
|
round16: Ottavi di finale
|
|
29
29
|
quarterfinals: Quarti di finale
|
data/config/fixtures/pt.yml
CHANGED
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
group: Grupo
|
|
6
6
|
|
|
7
|
-
## roll into one (matchday+round) ???
|
|
8
|
-
|
|
9
|
-
matchday: Rodada
|
|
10
7
|
round: Rodada
|
|
11
8
|
|
|
12
9
|
stage: Fase de grupos|Fase final|Primeira Fase|Segunda Fase
|
|
@@ -14,6 +11,8 @@ stage: Fase de grupos|Fase final|Primeira Fase|Segunda Fase
|
|
|
14
11
|
|
|
15
12
|
### Knock out rounds
|
|
16
13
|
|
|
14
|
+
## fix: add playoffs + fifthplace
|
|
15
|
+
|
|
17
16
|
round32: 16-avos de final
|
|
18
17
|
round16: Oitavos de final|Oitavas-de-final
|
|
19
18
|
quarterfinals: Quartos de final|Quartas-de-final
|
data/config/fixtures/ro.yml
CHANGED
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
group: Grupa
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
matchday: Etapa
|
|
10
|
-
round: Runda
|
|
7
|
+
round: Runda|Etapa
|
|
11
8
|
|
|
12
9
|
|
|
13
10
|
stage: Faza grupelor|Faza eliminatorie
|
|
@@ -24,6 +21,9 @@ stage: Faza grupelor|Faza eliminatorie
|
|
|
24
21
|
|
|
25
22
|
### Knockout rounds
|
|
26
23
|
|
|
24
|
+
## fix: add playoffs + fifthplace
|
|
25
|
+
|
|
26
|
+
|
|
27
27
|
round32: 1/16 de finală
|
|
28
28
|
round16: Optimi de finală
|
|
29
29
|
quarterfinals: Sferturi de finală
|
data/data/seasons.txt
CHANGED
data/lib/sportdb/lang.rb
CHANGED
|
@@ -128,18 +128,23 @@ private
|
|
|
128
128
|
def round_getter
|
|
129
129
|
# e.g. Spieltag|Runde|Achtelfinale|Viertelfinale|Halbfinale|Finale
|
|
130
130
|
|
|
131
|
+
## fix/todo:
|
|
132
|
+
## sort by length first - to allow best match e.g.
|
|
133
|
+
## 3rd place play-off instead of Play-off ?? etc. - why? why not?
|
|
134
|
+
|
|
131
135
|
h = @words[ lang ]
|
|
132
136
|
values = "" # NB: always construct a new string (do NOT use a reference to hash value)
|
|
133
137
|
values << h['round']
|
|
134
|
-
values << "|" << h['matchday'] ## todo/check: fold round n matchday into one key? why? why not??
|
|
135
138
|
|
|
136
139
|
### add knockout rounds values too
|
|
137
140
|
values << "|" << h['round32']
|
|
138
141
|
values << "|" << h['round16']
|
|
139
142
|
values << "|" << h['quarterfinals']
|
|
140
143
|
values << "|" << h['semifinals']
|
|
144
|
+
values << "|" << h['fifthplace'] if h['fifthplace'] # nb: allow empty/is optional!!
|
|
141
145
|
values << "|" << h['thirdplace']
|
|
142
146
|
values << "|" << h['final']
|
|
147
|
+
values << "|" << h['playoffs'] if h['playoffs'] # nb: allow empty/is optional!!
|
|
143
148
|
values
|
|
144
149
|
end
|
|
145
150
|
|
|
@@ -164,35 +169,45 @@ private
|
|
|
164
169
|
values << "|" << h['round16']
|
|
165
170
|
values << "|" << h['quarterfinals']
|
|
166
171
|
values << "|" << h['semifinals']
|
|
172
|
+
values << "|" << h['fifthplace'] if h['fifthplace'] # nb: allow empty/is optional!!
|
|
167
173
|
values << "|" << h['thirdplace']
|
|
168
174
|
values << "|" << h['final']
|
|
175
|
+
values << "|" << h['playoffs'] if h['playoffs'] # nb: allow empty/is optional!!
|
|
169
176
|
values
|
|
170
177
|
end
|
|
171
178
|
|
|
172
179
|
def regex_group_getter
|
|
173
180
|
## todo: escape for regex?
|
|
174
|
-
|
|
181
|
+
## NB: let's ignore case (that is, UPCASE,downcase); always use /i flag
|
|
182
|
+
/#{group}/i
|
|
175
183
|
end
|
|
176
184
|
|
|
177
185
|
def regex_round_getter
|
|
178
186
|
## todo: escape for regex?
|
|
179
187
|
## todo: sort by length - biggest words go first? does regex match biggest word automatically?? - check
|
|
180
|
-
|
|
188
|
+
## todo/fix: make - optional e.g. convert to ( |-) or better [ \-] ??
|
|
189
|
+
## NB: let's ignore case (that is, UPCASE,downcase); always use /i flag
|
|
190
|
+
/#{round}/i
|
|
181
191
|
end
|
|
182
192
|
|
|
183
193
|
def regex_knockout_round_getter
|
|
184
194
|
## todo: escape for regex?
|
|
185
|
-
|
|
195
|
+
## todo: sort by length - biggest words go first? does regex match biggest word automatically?? - check
|
|
196
|
+
## todo/fix: make - optional e.g. convert to ( |-) or better [ \-] ??
|
|
197
|
+
## NB: let's ignore case (that is, UPCASE,downcase); always use /i flag
|
|
198
|
+
/#{knockout_round}/i
|
|
186
199
|
end
|
|
187
|
-
|
|
200
|
+
|
|
188
201
|
def regex_leg1_getter
|
|
189
202
|
## todo: escape for regex?
|
|
190
|
-
|
|
203
|
+
## NB: let's ignore case (that is, UPCASE,downcase); always use /i flag
|
|
204
|
+
/#{leg1}/i
|
|
191
205
|
end
|
|
192
206
|
|
|
193
207
|
def regex_leg2_getter
|
|
194
208
|
## todo: escape for regex?
|
|
195
|
-
|
|
209
|
+
## NB: let's ignore case (that is, UPCASE,downcase); always use /i flag
|
|
210
|
+
/#{leg2}/i
|
|
196
211
|
end
|
|
197
212
|
|
|
198
213
|
end # class Lang
|
data/lib/sportdb/reader.rb
CHANGED
|
@@ -40,6 +40,21 @@ class Reader
|
|
|
40
40
|
end # method load_setup
|
|
41
41
|
|
|
42
42
|
|
|
43
|
+
def is_club_fixture?( name )
|
|
44
|
+
## guess (heuristic) if it's a national team event (e.g. world cup, copa america, etc.)
|
|
45
|
+
## or club event (e.g. bundesliga, club world cup, etc.)
|
|
46
|
+
|
|
47
|
+
if name =~ /club-world-cup!?\// # NB: must go before -cup (special case)
|
|
48
|
+
true
|
|
49
|
+
elsif name =~ /copa-america!?\// || # NB: copa-america/ or copa-america!/
|
|
50
|
+
name =~ /-cup!?\// # NB: -cup/ or -cup!/
|
|
51
|
+
false
|
|
52
|
+
else
|
|
53
|
+
true
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
|
|
43
58
|
def load( name ) # convenience helper for all-in-one reader
|
|
44
59
|
|
|
45
60
|
logger.debug "enter load( name=>>#{name}<<, include_path=>>#{include_path}<<)"
|
|
@@ -98,16 +113,8 @@ class Reader
|
|
|
98
113
|
reader.read( name, club: true, country_id: country.id )
|
|
99
114
|
end
|
|
100
115
|
elsif name =~ /(?:^|\/)leagues/ # NB: ^leagues or also possible world!/leagues - NB: make sure goes after leagues_for_country!!
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
# e.g. national team tournaments/leagues (e.g. world-cup/ or euro-cup/)
|
|
104
|
-
reader = LeagueReader.new( include_path )
|
|
105
|
-
reader.read( name, club: false )
|
|
106
|
-
else
|
|
107
|
-
# e.g. leagues_club
|
|
108
|
-
reader = LeagueReader.new( include_path )
|
|
109
|
-
reader.read( name, club: true )
|
|
110
|
-
end
|
|
116
|
+
reader = LeagueReader.new( include_path )
|
|
117
|
+
reader.read( name, club: is_club_fixture?( name ) )
|
|
111
118
|
elsif match_teams_for_country( name ) do |country_key| # name =~ /^([a-z]{2})\/teams/
|
|
112
119
|
# auto-add country code (from folder structure) for country-specific teams
|
|
113
120
|
# e.g. at/teams at/teams.2 de/teams etc.
|
|
@@ -116,18 +123,8 @@ class Reader
|
|
|
116
123
|
reader.read( name, club: true, country_id: country.id )
|
|
117
124
|
end
|
|
118
125
|
elsif name =~ /(?:^|\/)teams/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
# assume national teams
|
|
122
|
-
# e.g. world-cup/teams amercia-cup/teams_northern
|
|
123
|
-
reader = TeamReader.new( include_path )
|
|
124
|
-
reader.read( name, club: false )
|
|
125
|
-
else
|
|
126
|
-
# club teams (many countries)
|
|
127
|
-
# e.g. club/europe/teams
|
|
128
|
-
reader = TeamReader.new( include_path )
|
|
129
|
-
reader.read( name, club: true )
|
|
130
|
-
end
|
|
126
|
+
reader = TeamReader.new( include_path )
|
|
127
|
+
reader.read( name, club: is_club_fixture?( name ) )
|
|
131
128
|
elsif name =~ /\/(\d{4}|\d{4}_\d{2})\// || name =~ /\/(\d{4}|\d{4}_\d{2})$/
|
|
132
129
|
# e.g. must match /2012/ or /2012_13/
|
|
133
130
|
# or /2012 or /2012_13 e.g. brazil/2012 or brazil/2012_13
|
data/lib/sportdb/version.rb
CHANGED
data/test/test_lang.rb
CHANGED
|
@@ -17,31 +17,33 @@ class TestLang < MiniTest::Unit::TestCase
|
|
|
17
17
|
|
|
18
18
|
group = 'Group'
|
|
19
19
|
|
|
20
|
-
round = 'Round'
|
|
21
|
-
round << '|Matchday'
|
|
20
|
+
round = 'Round|Matchday'
|
|
22
21
|
round << '|Round of 32|Last 32'
|
|
23
|
-
round << '|Round of 16|Last 16'
|
|
24
|
-
round << '|Quarterfinals|Quarter-finals|Quarters|Quarterfinal'
|
|
25
|
-
round << '|Semifinals|Semi-finals|Semis'
|
|
26
|
-
round << '|
|
|
22
|
+
round << '|Round of 16|Last 16|8th finals'
|
|
23
|
+
round << '|Quarterfinals|Quarter-finals|Quarters|Quarterfinal|Last 8'
|
|
24
|
+
round << '|Semifinals|Semi-finals|Semis|Last 4'
|
|
25
|
+
round << '|Fifth place match|Fifth place|5th place match|5th place final|5th place|Match for fifth place|Match for 5th place'
|
|
26
|
+
round << '|Third place match|Third place|3rd place match|3rd place final|3rd place|Match for third place|Match for 3rd place|Third-place play-off|Third place play-off'
|
|
27
27
|
round << '|Final|Finals'
|
|
28
|
+
round << '|Play-off|Play-offs|Play-off for quarter-finals'
|
|
28
29
|
|
|
29
30
|
knockout_round = 'Round of 32|Last 32'
|
|
30
|
-
knockout_round << '|Round of 16|Last 16'
|
|
31
|
-
knockout_round << '|Quarterfinals|Quarter-finals|Quarters|Quarterfinal'
|
|
32
|
-
knockout_round << '|Semifinals|Semi-finals|Semis'
|
|
33
|
-
knockout_round << '|
|
|
31
|
+
knockout_round << '|Round of 16|Last 16|8th finals'
|
|
32
|
+
knockout_round << '|Quarterfinals|Quarter-finals|Quarters|Quarterfinal|Last 8'
|
|
33
|
+
knockout_round << '|Semifinals|Semi-finals|Semis|Last 4'
|
|
34
|
+
knockout_round << '|Fifth place match|Fifth place|5th place match|5th place final|5th place|Match for fifth place|Match for 5th place'
|
|
35
|
+
knockout_round << '|Third place match|Third place|3rd place match|3rd place final|3rd place|Match for third place|Match for 3rd place|Third-place play-off|Third place play-off'
|
|
34
36
|
knockout_round << '|Final|Finals'
|
|
37
|
+
knockout_round << '|Play-off|Play-offs|Play-off for quarter-finals'
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
assert( knockout_round == lang.knockout_round )
|
|
39
|
+
assert_equal group, lang.group
|
|
40
|
+
assert_equal round, lang.round
|
|
41
|
+
assert_equal knockout_round, lang.knockout_round
|
|
40
42
|
|
|
41
43
|
# NB: call twice to test caching with ||=
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
assert_equal group, lang.group
|
|
45
|
+
assert_equal round, lang.round
|
|
46
|
+
assert_equal knockout_round, lang.knockout_round
|
|
45
47
|
|
|
46
48
|
end
|
|
47
49
|
|
|
@@ -51,12 +53,12 @@ class TestLang < MiniTest::Unit::TestCase
|
|
|
51
53
|
|
|
52
54
|
group = 'Gruppe'
|
|
53
55
|
|
|
54
|
-
round = 'Runde'
|
|
55
|
-
round << '|Spieltag'
|
|
56
|
+
round = 'Spieltag|Runde'
|
|
56
57
|
round << '|Sechzehntelfinale|1/16 Finale'
|
|
57
58
|
round << '|Achtelfinale|1/8 Finale'
|
|
58
59
|
round << '|Viertelfinale|1/4 Finale'
|
|
59
60
|
round << '|Halbfinale|Semifinale|1/2 Finale'
|
|
61
|
+
round << '|Spiel um Platz 5'
|
|
60
62
|
round << '|Spiel um Platz 3'
|
|
61
63
|
round << '|Finale|Endspiel'
|
|
62
64
|
|
|
@@ -64,19 +66,20 @@ class TestLang < MiniTest::Unit::TestCase
|
|
|
64
66
|
knockout_round << '|Achtelfinale|1/8 Finale'
|
|
65
67
|
knockout_round << '|Viertelfinale|1/4 Finale'
|
|
66
68
|
knockout_round << '|Halbfinale|Semifinale|1/2 Finale'
|
|
69
|
+
knockout_round << '|Spiel um Platz 5'
|
|
67
70
|
knockout_round << '|Spiel um Platz 3'
|
|
68
71
|
knockout_round << '|Finale|Endspiel'
|
|
69
72
|
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
assert_equal group, lang.group
|
|
75
|
+
assert_equal round, lang.round
|
|
76
|
+
assert_equal knockout_round, lang.knockout_round
|
|
74
77
|
|
|
75
78
|
# NB: call twice to test caching with ||=
|
|
76
79
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
assert_equal group, lang.group
|
|
81
|
+
assert_equal round, lang.round
|
|
82
|
+
assert_equal knockout_round, lang.knockout_round
|
|
80
83
|
end
|
|
81
84
|
|
|
82
85
|
def test_regex_knockout_round
|
|
@@ -86,7 +89,16 @@ class TestLang < MiniTest::Unit::TestCase
|
|
|
86
89
|
lines = [
|
|
87
90
|
'(4) Quarter-finals',
|
|
88
91
|
'(5) Semi-finals',
|
|
89
|
-
'(6) Final'
|
|
92
|
+
'(6) Final',
|
|
93
|
+
'(1) Play-off 1st Leg // 11–15 October',
|
|
94
|
+
'(2) Play-off 2nd Leg // 15-19 November',
|
|
95
|
+
'(1) Play-off for quarter-finals',
|
|
96
|
+
'(4) Match for fifth place',
|
|
97
|
+
'(5) Match for third place',
|
|
98
|
+
## check for ALL UPCASE too
|
|
99
|
+
'(4) QUARTER-FINALS',
|
|
100
|
+
'(5) SEMI-FINALS',
|
|
101
|
+
'(6) FINAL'
|
|
90
102
|
]
|
|
91
103
|
|
|
92
104
|
lines.each do |line|
|
data/test/test_round_header.rb
CHANGED
|
@@ -41,7 +41,35 @@ class TestRoundHeader < MiniTest::Unit::TestCase
|
|
|
41
41
|
{ pos:14,
|
|
42
42
|
title: 'Round of 16 / 2nd Leg',
|
|
43
43
|
title2: 'May 8-10',
|
|
44
|
-
ko: true }]
|
|
44
|
+
ko: true }],
|
|
45
|
+
|
|
46
|
+
[ "(4) Match for fifth place",
|
|
47
|
+
{ pos:4,
|
|
48
|
+
title: 'Match for fifth place',
|
|
49
|
+
ko: true }],
|
|
50
|
+
|
|
51
|
+
[ "(5) Match for third place",
|
|
52
|
+
{ pos:5,
|
|
53
|
+
title: 'Match for third place',
|
|
54
|
+
ko: true }],
|
|
55
|
+
|
|
56
|
+
[ "(1) Play-off for quarter-finals",
|
|
57
|
+
{ pos:1,
|
|
58
|
+
title: 'Play-off for quarter-finals',
|
|
59
|
+
ko: true }],
|
|
60
|
+
|
|
61
|
+
[ "(1) Play-off 1st Leg // 11–15 October",
|
|
62
|
+
{ pos:1,
|
|
63
|
+
title: 'Play-off 1st Leg',
|
|
64
|
+
title2: '11–15 October',
|
|
65
|
+
ko: false } ],
|
|
66
|
+
|
|
67
|
+
[ "(2) Play-off 2nd Leg // 15-19 November",
|
|
68
|
+
{ pos:2,
|
|
69
|
+
title: 'Play-off 2nd Leg',
|
|
70
|
+
title2: '15-19 November',
|
|
71
|
+
ko: true } ],
|
|
72
|
+
]
|
|
45
73
|
|
|
46
74
|
assert_rounds( data )
|
|
47
75
|
end
|
metadata
CHANGED
|
@@ -1,126 +1,155 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sportdb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.
|
|
5
|
-
prerelease:
|
|
4
|
+
version: 1.8.14
|
|
6
5
|
platform: ruby
|
|
7
6
|
authors:
|
|
8
7
|
- Gerald Bauer
|
|
9
8
|
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date: 2014-04-
|
|
11
|
+
date: 2014-04-18 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: props
|
|
16
|
-
requirement:
|
|
17
|
-
none: false
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
16
|
requirements:
|
|
19
17
|
- - ! '>='
|
|
20
18
|
- !ruby/object:Gem::Version
|
|
21
19
|
version: '0'
|
|
22
20
|
type: :runtime
|
|
23
21
|
prerelease: false
|
|
24
|
-
version_requirements:
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ! '>='
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
25
27
|
- !ruby/object:Gem::Dependency
|
|
26
28
|
name: logutils
|
|
27
|
-
requirement:
|
|
28
|
-
none: false
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
30
|
requirements:
|
|
30
31
|
- - ! '>='
|
|
31
32
|
- !ruby/object:Gem::Version
|
|
32
33
|
version: '0'
|
|
33
34
|
type: :runtime
|
|
34
35
|
prerelease: false
|
|
35
|
-
version_requirements:
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ! '>='
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
36
41
|
- !ruby/object:Gem::Dependency
|
|
37
42
|
name: textutils
|
|
38
|
-
requirement:
|
|
39
|
-
none: false
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
40
44
|
requirements:
|
|
41
45
|
- - ! '>='
|
|
42
46
|
- !ruby/object:Gem::Version
|
|
43
47
|
version: '0'
|
|
44
48
|
type: :runtime
|
|
45
49
|
prerelease: false
|
|
46
|
-
version_requirements:
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ! '>='
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
47
55
|
- !ruby/object:Gem::Dependency
|
|
48
56
|
name: worlddb
|
|
49
|
-
requirement:
|
|
50
|
-
none: false
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
51
58
|
requirements:
|
|
52
59
|
- - ! '>='
|
|
53
60
|
- !ruby/object:Gem::Version
|
|
54
61
|
version: 2.0.2
|
|
55
62
|
type: :runtime
|
|
56
63
|
prerelease: false
|
|
57
|
-
version_requirements:
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ! '>='
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 2.0.2
|
|
58
69
|
- !ruby/object:Gem::Dependency
|
|
59
70
|
name: tagutils
|
|
60
|
-
requirement:
|
|
61
|
-
none: false
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
62
72
|
requirements:
|
|
63
73
|
- - ! '>='
|
|
64
74
|
- !ruby/object:Gem::Version
|
|
65
75
|
version: '0'
|
|
66
76
|
type: :runtime
|
|
67
77
|
prerelease: false
|
|
68
|
-
version_requirements:
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ! '>='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
69
83
|
- !ruby/object:Gem::Dependency
|
|
70
84
|
name: fetcher
|
|
71
|
-
requirement:
|
|
72
|
-
none: false
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
73
86
|
requirements:
|
|
74
87
|
- - ! '>='
|
|
75
88
|
- !ruby/object:Gem::Version
|
|
76
89
|
version: '0.3'
|
|
77
90
|
type: :runtime
|
|
78
91
|
prerelease: false
|
|
79
|
-
version_requirements:
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ! '>='
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0.3'
|
|
80
97
|
- !ruby/object:Gem::Dependency
|
|
81
98
|
name: gli
|
|
82
|
-
requirement:
|
|
83
|
-
none: false
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
84
100
|
requirements:
|
|
85
101
|
- - ! '>='
|
|
86
102
|
- !ruby/object:Gem::Version
|
|
87
103
|
version: 2.5.6
|
|
88
104
|
type: :runtime
|
|
89
105
|
prerelease: false
|
|
90
|
-
version_requirements:
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ! '>='
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: 2.5.6
|
|
91
111
|
- !ruby/object:Gem::Dependency
|
|
92
112
|
name: activerecord
|
|
93
|
-
requirement:
|
|
94
|
-
none: false
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
95
114
|
requirements:
|
|
96
115
|
- - ! '>='
|
|
97
116
|
- !ruby/object:Gem::Version
|
|
98
117
|
version: '0'
|
|
99
118
|
type: :runtime
|
|
100
119
|
prerelease: false
|
|
101
|
-
version_requirements:
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - ! '>='
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '0'
|
|
102
125
|
- !ruby/object:Gem::Dependency
|
|
103
126
|
name: rdoc
|
|
104
|
-
requirement:
|
|
105
|
-
none: false
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
106
128
|
requirements:
|
|
107
129
|
- - ~>
|
|
108
130
|
- !ruby/object:Gem::Version
|
|
109
131
|
version: '4.0'
|
|
110
132
|
type: :development
|
|
111
133
|
prerelease: false
|
|
112
|
-
version_requirements:
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - ~>
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '4.0'
|
|
113
139
|
- !ruby/object:Gem::Dependency
|
|
114
140
|
name: hoe
|
|
115
|
-
requirement:
|
|
116
|
-
none: false
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
117
142
|
requirements:
|
|
118
143
|
- - ~>
|
|
119
144
|
- !ruby/object:Gem::Version
|
|
120
|
-
version: '3.
|
|
145
|
+
version: '3.10'
|
|
121
146
|
type: :development
|
|
122
147
|
prerelease: false
|
|
123
|
-
version_requirements:
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - ~>
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '3.10'
|
|
124
153
|
description: sportdb - sport.db command line tool
|
|
125
154
|
email: opensport@googlegroups.com
|
|
126
155
|
executables:
|
|
@@ -259,6 +288,7 @@ files:
|
|
|
259
288
|
homepage: https://github.com/geraldb/sport.db.ruby
|
|
260
289
|
licenses:
|
|
261
290
|
- Public Domain
|
|
291
|
+
metadata: {}
|
|
262
292
|
post_install_message: ! '******************************************************************************
|
|
263
293
|
|
|
264
294
|
|
|
@@ -276,31 +306,29 @@ rdoc_options:
|
|
|
276
306
|
require_paths:
|
|
277
307
|
- lib
|
|
278
308
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
279
|
-
none: false
|
|
280
309
|
requirements:
|
|
281
310
|
- - ! '>='
|
|
282
311
|
- !ruby/object:Gem::Version
|
|
283
312
|
version: 1.9.2
|
|
284
313
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
285
|
-
none: false
|
|
286
314
|
requirements:
|
|
287
315
|
- - ! '>='
|
|
288
316
|
- !ruby/object:Gem::Version
|
|
289
317
|
version: '0'
|
|
290
318
|
requirements: []
|
|
291
319
|
rubyforge_project:
|
|
292
|
-
rubygems_version: 1.
|
|
320
|
+
rubygems_version: 2.1.10
|
|
293
321
|
signing_key:
|
|
294
|
-
specification_version:
|
|
322
|
+
specification_version: 4
|
|
295
323
|
summary: sportdb - sport.db command line tool
|
|
296
324
|
test_files:
|
|
325
|
+
- test/test_changes.rb
|
|
326
|
+
- test/test_cursor.rb
|
|
297
327
|
- test/test_date.rb
|
|
298
328
|
- test/test_lang.rb
|
|
299
|
-
- test/
|
|
300
|
-
- test/test_scores.rb
|
|
301
|
-
- test/test_winner.rb
|
|
329
|
+
- test/test_reader.rb
|
|
302
330
|
- test/test_round_def.rb
|
|
303
|
-
- test/test_utils.rb
|
|
304
331
|
- test/test_round_header.rb
|
|
305
|
-
- test/
|
|
306
|
-
- test/
|
|
332
|
+
- test/test_scores.rb
|
|
333
|
+
- test/test_utils.rb
|
|
334
|
+
- test/test_winner.rb
|