sportdb-readers 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/lib/sportdb/readers/match_reader.rb +4 -14
- data/lib/sportdb/readers/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e288d917f0333c7d12ae67eac1c8f16eeb6499cb40b9b4d6e40b45d3e617dc1
|
4
|
+
data.tar.gz: 1eb4d7e7cbf14e67141edc1043cf64cb2f3bb77fdaf1532f4f7017e95df2adaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ad5a423fb07514b374aae88cb7e858446ed75131c1aa9530b4037e521c3a8b3be9b7746cc3a13cb1010e1fa76f002f8b968858145ee593cb53f90eff28e3ef0
|
7
|
+
data.tar.gz: 19d85196f34037b618d1bbb560cc5f2b42cc4d2d006f60b7428d7bb1d72b4dc770f7c9ae2ac0f86d01eea307d36eb80bf5e4ae0511df8c5f55692c4b306e3f2c
|
data/CHANGELOG.md
CHANGED
@@ -9,16 +9,6 @@ module SportDb
|
|
9
9
|
class MatchReader ## todo/check: rename to MatchReaderV2 (use plural?) why? why not?
|
10
10
|
|
11
11
|
|
12
|
-
### fix - remove catalog reference!!!
|
13
|
-
## use classes with "augmented" static methods
|
14
|
-
## e.g. Club.match_by etc.
|
15
|
-
def catalog
|
16
|
-
puts "[deprecated] do NOT use catalog reference; use classes with enhanced search static methods!"
|
17
|
-
Import.catalog
|
18
|
-
end
|
19
|
-
|
20
|
-
|
21
|
-
|
22
12
|
def self.read( path, season: nil ) ## use - rename to read_file or from_file etc. - why? why not?
|
23
13
|
txt = File.open( path, 'r:utf-8' ) {|f| f.read }
|
24
14
|
parse( txt, season: season )
|
@@ -73,8 +63,8 @@ class MatchReader ## todo/check: rename to MatchReaderV2 (use plural?) why? w
|
|
73
63
|
|
74
64
|
### check if event info available - use start_date;
|
75
65
|
## otherwise we have to guess (use a "synthetic" start_date)
|
76
|
-
event_info =
|
77
|
-
|
66
|
+
event_info = Import::EventInfo.find_by( season: season,
|
67
|
+
league: league )
|
78
68
|
|
79
69
|
start = if event_info && event_info.start_date
|
80
70
|
puts "event info found:"
|
@@ -116,8 +106,8 @@ class MatchReader ## todo/check: rename to MatchReaderV2 (use plural?) why? w
|
|
116
106
|
puts "league:"
|
117
107
|
pp league
|
118
108
|
|
119
|
-
teams =
|
120
|
-
|
109
|
+
teams = Import::Team.find_by!( name: auto_conf_teams,
|
110
|
+
league: league )
|
121
111
|
|
122
112
|
puts " [debug] teams:"
|
123
113
|
pp teams
|