sportdb-config 1.1.0 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 72a9ce4c1edae6d428da40e3764282fea81995ae
4
- data.tar.gz: aaf4a46f110099605e72df4f40cc416dba485ae2
3
+ metadata.gz: 75debc4f481f8b0cc4bd7f9d885d1bf526527189
4
+ data.tar.gz: '0489bb3235ebfb289ccf93c758a3c4a0cc7e37de'
5
5
  SHA512:
6
- metadata.gz: 32e485f24c938a59930978a95ce51734853af0c068d64d039cce9e10ca68532d14658c938f7c7a292b4f5a7d82d17dd4a9b7a1f1b69342c93c9080c4f77983be
7
- data.tar.gz: 358731992f199ab916f07316ad9677972f8a8ddb76d75fdc83147e633af571bc4059e83b4a038eb121e924f01c2582d8aaaa6846e52ba948cde8abeb115cfe88
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
@@ -7,7 +7,7 @@ module Catalogs
7
7
 
8
8
  MAJOR = 1 ## todo: namespace inside version or something - why? why not??
9
9
  MINOR = 1
10
- PATCH = 0
10
+ PATCH = 1
11
11
  VERSION = [MAJOR,MINOR,PATCH].join('.')
12
12
 
13
13
  def self.version
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.0
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-06-15 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sportdb-formats