sportdb-formats 2.1.0 → 2.1.2
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/bin/fbchk +9 -2
- data/lib/sportdb/formats/quick_match_linter.rb +11 -5
- data/lib/sportdb/formats/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ec79f151992c1c7a16a8a500b60771a0babaf81a546c61ce54bdc0e644f6b6c
|
4
|
+
data.tar.gz: c8b1510c899407477b8799a21982ffa7c7fa72db708e83af3d9ac7d3007df366
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2e036967bdf35d73d1f93e1f1cb754058fb167a228785b9fbef4b21c8377b6bce9a9764bce2f9d79ed3629bb4202c6d344630bafdf187e53ec20e65c49ff32a
|
7
|
+
data.tar.gz: 95a64a731197e54d333ee931f31e9f6aae0691c09ad2494b80508b9db08e87b6be74520d8ce261667fa8df78aa8b5ce4ed9b13f343d598e6ee250811f284ff5f
|
data/CHANGELOG.md
CHANGED
data/bin/fbchk
CHANGED
@@ -23,6 +23,7 @@ end
|
|
23
23
|
args = ARGV
|
24
24
|
opts = { debug: false,
|
25
25
|
file: nil,
|
26
|
+
teams: true, ## check/lint teams (name errros etc.)
|
26
27
|
}
|
27
28
|
|
28
29
|
parser = OptionParser.new do |parser|
|
@@ -45,10 +46,14 @@ end
|
|
45
46
|
opts[:file] = file
|
46
47
|
end
|
47
48
|
|
48
|
-
|
49
|
+
parser.on( "--[no-]teams",
|
50
|
+
"turn on/off team name checks (default: #{opts[:teams]})") do |teams|
|
51
|
+
opts[:teams] = teams
|
52
|
+
end
|
49
53
|
end
|
50
54
|
parser.parse!( args )
|
51
55
|
|
56
|
+
|
52
57
|
puts "OPTS:"
|
53
58
|
p opts
|
54
59
|
puts "ARGV:"
|
@@ -95,9 +100,11 @@ end
|
|
95
100
|
errors = []
|
96
101
|
paths.each_with_index do |path,j|
|
97
102
|
puts "==> [#{j+1}/#{paths.size}] reading >#{path}<..."
|
98
|
-
quick = SportDb::QuickMatchLinter.new( read_text( path )
|
103
|
+
quick = SportDb::QuickMatchLinter.new( read_text( path ),
|
104
|
+
check_teams: opts[:teams] )
|
99
105
|
matches = quick.parse
|
100
106
|
|
107
|
+
|
101
108
|
if quick.errors?
|
102
109
|
puts "!! #{quick.errors.size} error(s):"
|
103
110
|
pp quick.errors
|
@@ -23,11 +23,17 @@ class QuickMatchLinter
|
|
23
23
|
|
24
24
|
include Logging
|
25
25
|
|
26
|
-
def initialize( txt
|
26
|
+
def initialize( txt,
|
27
|
+
check_teams: true )
|
27
28
|
@errors = []
|
28
29
|
@txt = txt
|
30
|
+
@check_teams = check_teams
|
29
31
|
end
|
30
32
|
|
33
|
+
def check_teams?() @check_teams; end
|
34
|
+
|
35
|
+
|
36
|
+
|
31
37
|
attr_reader :errors
|
32
38
|
def errors?() @errors.size > 0; end
|
33
39
|
|
@@ -70,7 +76,8 @@ class QuickMatchLinter
|
|
70
76
|
###
|
71
77
|
## db check - check league
|
72
78
|
## fix/fix - add season to match_by !!!!!!!
|
73
|
-
|
79
|
+
## note - changed to match (incl. code) from match_by(name:) only!!!
|
80
|
+
recs = Import::League.match( league )
|
74
81
|
league_rec = nil
|
75
82
|
if recs.size == 1
|
76
83
|
league_rec = recs[0]
|
@@ -111,6 +118,7 @@ class QuickMatchLinter
|
|
111
118
|
## only clubs for now
|
112
119
|
## fix add better support for champs etc
|
113
120
|
## and national teams!!!
|
121
|
+
if check_teams?
|
114
122
|
auto_conf_teams.each do |team|
|
115
123
|
recs = if league_rec && !league_rec.intl?
|
116
124
|
Import::Club.match_by( name: team, league: league_rec )
|
@@ -150,9 +158,7 @@ class QuickMatchLinter
|
|
150
158
|
puts "!! #{msg}"
|
151
159
|
end
|
152
160
|
end
|
153
|
-
|
154
|
-
|
155
|
-
|
161
|
+
end
|
156
162
|
|
157
163
|
|
158
164
|
## note: pass along stage (if present): stage - optional from heading!!!!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb-formats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09
|
11
|
+
date: 2024-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sportdb-search
|