football-timezones 0.3.0 → 0.3.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 +4 -4
- data/CHANGELOG.md +1 -1
- data/Manifest.txt +1 -0
- data/config/leagues.csv +3 -3
- data/config/leagues_more.csv +34 -0
- data/config/timezones_america.csv +7 -0
- data/config/timezones_world.csv +1 -1
- data/lib/football-timezones/leagueset.rb +28 -0
- data/lib/football-timezones/version.rb +1 -1
- data/lib/football-timezones.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac21f96485baced66f13afd18e167b181203b9aa280b5c16996f76b0895c7500
|
4
|
+
data.tar.gz: a6bbe1691030240f2cb599bfb3df8634337ca3678ced4eb19adf6c37f808bbb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42e149d038868379ab286ded5087b885d4d7bee7d66246b4a6ec8b80acb3d2ec7077854583511fff8175be3c422a262f68deb2898e395871056d302a6051db0c
|
7
|
+
data.tar.gz: b53f6d16560a9082e8142080356dd8d1ad39bcec2888a932dbb3e4e395ce3f86cefd25ee8bdbd5087bbc5ea495f4bc0b0e37bde27f7218f141a150256e2cb94f
|
data/CHANGELOG.md
CHANGED
data/Manifest.txt
CHANGED
data/config/leagues.csv
CHANGED
@@ -209,9 +209,9 @@ fr.cup.l,French Coupe de la Ligue,coupedelaligue,,
|
|
209
209
|
fr.super,French Trophée des Champions,tropheedeschampions,,
|
210
210
|
it.1,Italian Serie A,1-seriea,,
|
211
211
|
it.2,Italian Serie B,2-serieb,,
|
212
|
-
it.3.a,Italian Serie C (North & Central West),
|
213
|
-
it.3.b,Italian Serie C (North & Central East),
|
214
|
-
it.3.c,Italian Serie C (South),
|
212
|
+
it.3.a,Italian Serie C (North & Central West),3-seriec_a,,
|
213
|
+
it.3.b,Italian Serie C (North & Central East),3-seriec_b,,
|
214
|
+
it.3.c,Italian Serie C (South),3-seriec_c,,
|
215
215
|
it.cup,Coppa Italia,cup,,
|
216
216
|
it.cup.c,Italian Coppa Italia Serie C,coppaitaliaseriec,,
|
217
217
|
it.super,Italian Supercoppa Italiana,supercoppaitaliana,,
|
@@ -0,0 +1,34 @@
|
|
1
|
+
key,name,basename,start_season,end_season
|
2
|
+
|
3
|
+
|
4
|
+
### quick hack - add more leagues "by hand"
|
5
|
+
### todo - add leagues upstream!!!
|
6
|
+
|
7
|
+
|
8
|
+
mls,Major League Soccer,majorleaguesoccer,,
|
9
|
+
mls.back,MLS is Back Tournament,mlsisbacktournament,,
|
10
|
+
|
11
|
+
|
12
|
+
## first expansion season -> 2020/21 Apertura
|
13
|
+
## last ascenso season -> 2019/20 Clausura
|
14
|
+
mx.2.ascenso,Ascenso MX,2-ascensomx,,2019/20
|
15
|
+
mx.2.expansion,Liga de Expansión MX,2-ligaexpansionmx,2020/21,
|
16
|
+
|
17
|
+
|
18
|
+
### add alternate keys for de.4
|
19
|
+
de.4.n,Deutsche Regionalliga Nord,4-regionalliga_nord,,
|
20
|
+
de.4.no,Deutsche Regionalliga Nordost,4-regionalliga_nordost,,
|
21
|
+
de.4.w,Deutsche Regionalliga West,4-regionalliga_west,,
|
22
|
+
de.4.sw,Deutsche Regionalliga Südwest,4-regionalliga_suedwest,,
|
23
|
+
|
24
|
+
|
25
|
+
## italy - update upstream
|
26
|
+
## use seriec_a or seriec-a ???
|
27
|
+
# it.3.a,Italian Serie C (North & Central West),3-seriec_a,,
|
28
|
+
# it.3.b,Italian Serie C (North & Central East),3-seriec_b,,
|
29
|
+
# it.3.c,Italian Serie C (South),3-seriec_c,,
|
30
|
+
|
31
|
+
## england
|
32
|
+
## add alternate codes / keys
|
33
|
+
eng.fa.cup,English FA Cup,facup,,
|
34
|
+
eng.efl.cup,English EFL Cup,eflcup,,
|
@@ -2,6 +2,8 @@ key, zone
|
|
2
2
|
|
3
3
|
|
4
4
|
us, America/New_York
|
5
|
+
mls, America/New_York
|
6
|
+
|
5
7
|
ca, America/Toronto
|
6
8
|
|
7
9
|
mx, America/Mexico_City
|
@@ -31,4 +33,9 @@ co, America/Bogota
|
|
31
33
|
|
32
34
|
|
33
35
|
copa.l, America/Sao_Paulo ### use brazil time - why? why not?
|
36
|
+
copa.s, America/Sao_Paulo
|
37
|
+
|
38
|
+
|
39
|
+
southamerica, America/Sao_Paulo ## copa america - use country specific by year - why? why not?
|
40
|
+
|
34
41
|
|
data/config/timezones_world.csv
CHANGED
@@ -90,6 +90,8 @@ end
|
|
90
90
|
|
91
91
|
### use a function for (re)use
|
92
92
|
### note - may add seasons in place!! (if seasons is empty)
|
93
|
+
##
|
94
|
+
## todo/check - change source_path to (simply) path - why? why not?
|
93
95
|
def validate!( source_path: ['.'] )
|
94
96
|
each do |league_key, seasons|
|
95
97
|
|
@@ -132,6 +134,32 @@ end
|
|
132
134
|
|
133
135
|
|
134
136
|
|
137
|
+
## todo/check: find a better name for helper?
|
138
|
+
## find_all_datasets, filter_datatsets - add alias(es???
|
139
|
+
## queries (lik ARGV) e.g. ['at'] or ['eng', 'de'] etc. list of strings
|
140
|
+
def filter( queries=[] )
|
141
|
+
## find all matching leagues (that is, league keys)
|
142
|
+
if queries.empty? ## no filter - get all league keys
|
143
|
+
self
|
144
|
+
else
|
145
|
+
recs = @recs.find_all do |league_key, seasons|
|
146
|
+
found = false
|
147
|
+
## note: normalize league key
|
148
|
+
## (remove dot and downcase)
|
149
|
+
norm_key = league_key.gsub( '.', '' )
|
150
|
+
queries.each do |query|
|
151
|
+
q = query.gsub( '.', '' ).downcase
|
152
|
+
if norm_key.start_with?( q )
|
153
|
+
found = true
|
154
|
+
break
|
155
|
+
end
|
156
|
+
end
|
157
|
+
found
|
158
|
+
end
|
159
|
+
## return new typed leagueset
|
160
|
+
self.class.new( recs )
|
161
|
+
end
|
162
|
+
end
|
135
163
|
|
136
164
|
|
137
165
|
def pretty_print( printer )
|
data/lib/football-timezones.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: football-timezones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.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:
|
11
|
+
date: 2025-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tzinfo
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- README.md
|
101
101
|
- Rakefile
|
102
102
|
- config/leagues.csv
|
103
|
+
- config/leagues_more.csv
|
103
104
|
- config/timezones_africa.csv
|
104
105
|
- config/timezones_america.csv
|
105
106
|
- config/timezones_asia.csv
|