sportdb-readers 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sportdb/readers/match_reader.rb +13 -4
- data/lib/sportdb/readers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d51d795ec384d281363b3af32bb6560bb0e7707a
|
4
|
+
data.tar.gz: 6579ab0a20f45673f24ae4b444bc01d5c0f43d19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b5ca27813390ab7fe3aa41e63897bbd0aa03c39d78dabed8a321eb3853528a2c1700c8dea4be57fe7fd3eb6122631878bdfb2beeed03ac81e545b4c9049dd4f
|
7
|
+
data.tar.gz: 5c2a40f3fd42a0ec3eac82e942088a00bd2e7a6bf4bd07a2d993d217ac2b17a3503ac41d7befd1016a90511ded5c8ea2d4df7a577bbd1ec3dd994f84c4ea1113
|
@@ -31,12 +31,13 @@ class MatchReader ## todo/check: rename to MatchReaderV2 (use plural?) why? w
|
|
31
31
|
langs = { ## map country keys to lang codes
|
32
32
|
'de' => 'de', ## de - Deutsch (German)
|
33
33
|
'at' => 'de',
|
34
|
+
'ch' => 'de',
|
34
35
|
'fr' => 'fr', ## fr - French
|
35
36
|
'it' => 'it', ## it - Italian
|
36
37
|
'es' => 'es', ## es - Español (Spanish)
|
37
38
|
'mx' => 'es',
|
38
39
|
'pt' => 'pt', ## pt - Português (Portuguese)
|
39
|
-
'br' => 'br'
|
40
|
+
'br' => 'br' ## !!! todo/check - br exists?? use pt portuges??
|
40
41
|
}
|
41
42
|
|
42
43
|
secs.each do |sec| ## sec(tion)s
|
@@ -53,11 +54,19 @@ class MatchReader ## todo/check: rename to MatchReaderV2 (use plural?) why? w
|
|
53
54
|
Import.config.lang = langs[ league.country.key ] || 'en'
|
54
55
|
end
|
55
56
|
|
57
|
+
### check if event info availabe - use start_date;
|
58
|
+
## otherwise we have to guess (use a "synthetic" start_date)
|
59
|
+
event_info = catalog.events.find_by( season: season,
|
60
|
+
league: league )
|
56
61
|
|
57
|
-
start = if
|
58
|
-
|
62
|
+
start = if event_info && event_info.start_date
|
63
|
+
event_info.start_date
|
59
64
|
else
|
60
|
-
|
65
|
+
if season.year?
|
66
|
+
Date.new( season.start_year, 1, 1 )
|
67
|
+
else
|
68
|
+
Date.new( season.start_year, 7, 1 )
|
69
|
+
end
|
61
70
|
end
|
62
71
|
|
63
72
|
auto_conf_teams, _ = AutoConfParser.parse( lines,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb-readers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sportdb-sync
|