sportdb-config 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/config/catalog.rb +19 -0
- data/lib/sportdb/config/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: 75debc4f481f8b0cc4bd7f9d885d1bf526527189
|
4
|
+
data.tar.gz: '0489bb3235ebfb289ccf93c758a3c4a0cc7e37de'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 632a90def9488cbdc5eed0b6de6ba7e2796a2050618d7e1c077d6a3084627e94a5ac4c2e9868f6dfacc76115566425e6767b24994c03e654fde27de2c62cded0
|
7
|
+
data.tar.gz: 18882a224e55b3145a3deaf3892bd4f6ef70d3e0d0f1bec92f37d477deb4aa38bf5b1ae8c9aa54b17e7798130fb430bfcea7eca46b24ed0e48ae101ad3276d0a
|
@@ -15,6 +15,9 @@ class Catalog
|
|
15
15
|
def teams() @teams ||= build_team_index; end
|
16
16
|
def leagues() @leagues ||= build_league_index; end
|
17
17
|
|
18
|
+
def events() @events ||= build_event_index; end
|
19
|
+
def seasons() @seasons ||= build_season_index; end
|
20
|
+
|
18
21
|
|
19
22
|
def build_team_index() TeamIndex.new; end
|
20
23
|
|
@@ -69,6 +72,22 @@ class Catalog
|
|
69
72
|
FootballDb::Import.build_league_index
|
70
73
|
end
|
71
74
|
end
|
75
|
+
|
76
|
+
|
77
|
+
def build_event_index
|
78
|
+
if config.leagues_dir ## (re)use leagues dir for now - add separate seasons_dir - why? why not?
|
79
|
+
EventIndex.build( config.leagues_dir )
|
80
|
+
else
|
81
|
+
puts "!! WARN - no leagues_dir set; for now buit-in events in catalog - fix!!!!"
|
82
|
+
EventIndex.new ## return empty event index
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def build_season_index
|
87
|
+
# note: for now always (re)use the events from the event (info) index
|
88
|
+
SeasonIndex.new( events )
|
89
|
+
end
|
90
|
+
|
72
91
|
end # class Catalog
|
73
92
|
|
74
93
|
end # module Import
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb-config
|
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-formats
|