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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c227a8566030829c53c10e3a8ab626b3222653ebcf795143e17c4627609a3e9f
4
- data.tar.gz: 25cf88f75828207d783009f7f67f86de3cffab7265cc875fc893133678134bd5
3
+ metadata.gz: 2ec79f151992c1c7a16a8a500b60771a0babaf81a546c61ce54bdc0e644f6b6c
4
+ data.tar.gz: c8b1510c899407477b8799a21982ffa7c7fa72db708e83af3d9ac7d3007df366
5
5
  SHA512:
6
- metadata.gz: 5eb402eb00c0aff8e18a8079807cf39d1ed7d3e4d57786051d3737c39680958917a412a304fd40132b7aa1e7a7cc7d0d0a8e97f15307176e2fb54083e2f16caf
7
- data.tar.gz: ba5db77e4b57f72ed3c305cd71bbc5ad7e150971ff9055544a4d3028ff3b24c579ec9c9915e651ed2eae1f2f4d19a7772f8aafc79af7f4d60dcc6e22e33bc930
6
+ metadata.gz: f2e036967bdf35d73d1f93e1f1cb754058fb167a228785b9fbef4b21c8377b6bce9a9764bce2f9d79ed3629bb4202c6d344630bafdf187e53ec20e65c49ff32a
7
+ data.tar.gz: 95a64a731197e54d333ee931f31e9f6aae0691c09ad2494b80508b9db08e87b6be74520d8ce261667fa8df78aa8b5ce4ed9b13f343d598e6ee250811f284ff5f
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ### 2.1.0
1
+ ### 2.1.2
2
2
 
3
3
  ### 0.0.1 / 2019-10-28
4
4
 
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
- recs = Import::League.match_by( name: league )
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!!!!
@@ -4,7 +4,7 @@ module Formats
4
4
 
5
5
  MAJOR = 2 ## todo: namespace inside version or something - why? why not??
6
6
  MINOR = 1
7
- PATCH = 0
7
+ PATCH = 2
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
10
10
  def self.version
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.0
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-26 00:00:00.000000000 Z
11
+ date: 2024-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sportdb-search