sportdb-formats 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/Manifest.txt +5 -0
  3. data/Rakefile +2 -2
  4. data/lib/sportdb/formats.rb +17 -5
  5. data/lib/sportdb/formats/country/country_index.rb +7 -7
  6. data/lib/sportdb/formats/country/country_reader.rb +26 -6
  7. data/lib/sportdb/formats/datafile_package.rb +10 -7
  8. data/lib/sportdb/formats/league/league_outline_reader.rb +24 -7
  9. data/lib/sportdb/formats/league/league_reader.rb +3 -3
  10. data/lib/sportdb/formats/match/mapper.rb +63 -63
  11. data/lib/sportdb/formats/match/mapper_teams.rb +1 -1
  12. data/lib/sportdb/formats/match/match_parser.rb +99 -180
  13. data/lib/sportdb/formats/match/match_parser_csv.rb +321 -0
  14. data/lib/sportdb/formats/package.rb +165 -11
  15. data/lib/sportdb/formats/parser_helper.rb +11 -2
  16. data/lib/sportdb/formats/score/score_formats.rb +41 -1
  17. data/lib/sportdb/formats/score/score_parser.rb +6 -0
  18. data/lib/sportdb/formats/structs/country.rb +6 -3
  19. data/lib/sportdb/formats/structs/group.rb +5 -12
  20. data/lib/sportdb/formats/structs/round.rb +6 -13
  21. data/lib/sportdb/formats/structs/standings.rb +30 -9
  22. data/lib/sportdb/formats/structs/team.rb +1 -2
  23. data/lib/sportdb/formats/team/club_reader_props.rb +3 -3
  24. data/lib/sportdb/formats/version.rb +4 -2
  25. data/test/helper.rb +2 -1
  26. data/test/test_club_reader_props.rb +2 -2
  27. data/test/test_country_index.rb +4 -4
  28. data/test/test_country_reader.rb +34 -4
  29. data/test/test_csv_match_parser.rb +114 -0
  30. data/test/test_csv_match_parser_utils.rb +20 -0
  31. data/test/test_csv_reader.rb +5 -5
  32. data/test/test_datafile.rb +0 -32
  33. data/test/test_datafile_package.rb +46 -0
  34. data/test/test_match_auto_relegation.rb +41 -0
  35. data/test/test_package.rb +60 -28
  36. data/test/test_package_match.rb +27 -3
  37. data/test/test_regex.rb +25 -7
  38. data/test/test_scores.rb +58 -49
  39. metadata +9 -4
@@ -7,40 +7,72 @@
7
7
 
8
8
  require 'helper'
9
9
 
10
-
11
10
  class TestPackage < MiniTest::Test
12
11
 
13
- def test_read
14
- [Datafile::DirPackage.new( '../../../openfootball/england' ),
15
- Datafile::ZipPackage.new( 'tmp/england-master.zip' )
16
- ].each do |eng|
17
- assert eng.find( '2015-16/.conf.txt' ).read.start_with?( '= English Premier League 2015/16' )
18
- assert eng.find( '2017-18/.conf.txt' ).read.start_with?( '= English Premier League 2017/18' )
19
- assert eng.find( '2015-16/1-premierleague-i.txt' ).read.start_with?( '= English Premier League 2015/16' )
20
- end
12
+ AUSTRIA_DIR = '../../../openfootball/austria'
13
+ AUSTRIA_CSV_DIR = '../../../footballcsv/austria'
21
14
 
22
- [Datafile::DirPackage.new( '../../../openfootball/austria' ),
23
- Datafile::ZipPackage.new( 'tmp/austria-master.zip' )
24
- ].each do |at|
25
- assert at.find( '2018-19/.conf.txt' ).read.start_with?( '= Österr. Bundesliga 2018/19' )
26
- end
15
+ ENGLAND_DIR = '../../../openfootball/england'
16
+ ENGLAND_CSV_DIR = '../../../footballcsv/england'
17
+
18
+
19
+ def test_match_by
27
20
 
28
- puts "DirPackage:"
29
- pack = Datafile::DirPackage.new( '../../../openfootball/austria' )
30
- puts pack.name
31
- puts " entries:"
32
- pack.each( pattern: /\.txt$/ ) do |entry|
33
- puts entry.name
21
+ [ AUSTRIA_CSV_DIR,
22
+ ENGLAND_CSV_DIR,
23
+ "#{SportDb::Test.data_dir}/packages/test-levels",
24
+ ].each do |path|
25
+ puts
26
+ puts "match (csv) in #{path}:"
27
+ pack = SportDb::Package.new( path )
28
+ pp pack.match_by_season_dir( format: 'csv' )
29
+ puts "---"
30
+ pp pack.match_by_season( format: 'csv' )
34
31
  end
35
32
 
36
- puts "ZipPackage:"
37
- pack = Datafile::ZipPackage.new( 'tmp/austria-master.zip' )
38
- puts pack.name
39
- puts " entries:"
40
- pack.each( pattern: /\.txt$/ ) do |entry|
41
- puts entry.name
33
+ [ AUSTRIA_DIR,
34
+ ENGLAND_DIR,
35
+ "#{SportDb::Test.data_dir}/packages/test-levels",
36
+ ].each do |path|
37
+ puts
38
+ puts "match (txt) in #{path}:"
39
+ pack = SportDb::Package.new( path )
40
+ pp pack.match_by_season_dir
41
+ puts "---"
42
+ pp pack.match_by_season( start: '2000' ) ## note: try with start season filter!!
42
43
  end
44
+ end
45
+
46
+
47
+ CLUBS_DIR = '../../../openfootball/clubs' ## source repo directory path
48
+ LEAGUES_DIR = '../../../openfootball/leagues'
49
+
50
+ def test_bundle
51
+ datafiles = SportDb::Package.find_clubs( CLUBS_DIR )
52
+ pp datafiles
53
+
54
+ ## todo/fix: turn into Datafile::Bundle.new and Bundle#write/save -why? why not?
55
+ bundle = Datafile::Bundle.new( './tmp/clubs.txt' )
56
+ bundle.write <<TXT
57
+ ##########################################
58
+ # auto-generated all-in-one single datafile clubs.txt bundle
59
+ # on #{Time.now} from #{datafiles.size} datafile(s)
60
+ TXT
61
+ bundle.write datafiles
62
+ bundle.close
63
+ end
64
+
65
+ def test_bundle_old
66
+ datafiles = SportDb::Package.find_leagues( LEAGUES_DIR )
67
+ pp datafiles
43
68
 
44
- end # method test_read
69
+ Datafile.write_bundle( './tmp/leagues.txt',
70
+ datafiles: datafiles,
71
+ header: <<TXT )
72
+ ##########################################
73
+ # auto-generated all-in-one single datafile leagues.txt bundle
74
+ # on #{Time.now} from #{datafiles.size} datafile(s)
75
+ TXT
76
+ end
45
77
 
46
- end # class TestPackage
78
+ end # class TestPackage
@@ -9,9 +9,12 @@ require 'helper'
9
9
 
10
10
  class TestPackageMatch < MiniTest::Test
11
11
 
12
- CLUBS_DIR = '../../../openfootball/clubs' ## source repo directory path
13
- LEAGUES_DIR = '../../../openfootball/leagues'
14
- AUSTRIA_DIR = '../../../openfootball/austria'
12
+ CLUBS_DIR = '../../../openfootball/clubs' ## source repo directory path
13
+ LEAGUES_DIR = '../../../openfootball/leagues'
14
+ AUSTRIA_DIR = '../../../openfootball/austria'
15
+
16
+ AUSTRIA_CSV_DIR = '../../../footballcsv/austria'
17
+
15
18
 
16
19
  def test_find
17
20
  datafiles = SportDb::Package.find_clubs( CLUBS_DIR )
@@ -25,6 +28,27 @@ class TestPackageMatch < MiniTest::Test
25
28
 
26
29
  datafiles = SportDb::Package.find_conf( AUSTRIA_DIR )
27
30
  pp datafiles
31
+
32
+ datafiles = SportDb::Package.find_match( AUSTRIA_DIR )
33
+ puts
34
+ puts "== find_match (in #{AUSTRIA_DIR}) - found #{datafiles.size}:"
35
+ pp datafiles
36
+
37
+ datafiles = SportDb::Package.find_match( AUSTRIA_CSV_DIR )
38
+ puts
39
+ puts "== find_match (in #{AUSTRIA_CSV_DIR}) - found #{datafiles.size}:"
40
+ pp datafiles
41
+
42
+
43
+ datafiles = SportDb::Package.find_match( AUSTRIA_DIR, format: 'csv' )
44
+ puts
45
+ puts "== find_match+csv (in #{AUSTRIA_DIR}) - found #{datafiles.size}:"
46
+ pp datafiles
47
+
48
+ datafiles = SportDb::Package.find_match( AUSTRIA_CSV_DIR, format: 'csv' )
49
+ puts
50
+ puts "== find_match+csv (in #{AUSTRIA_CSV_DIR}) - found #{datafiles.size}:"
51
+ pp datafiles
28
52
  end
29
53
 
30
54
 
@@ -9,9 +9,27 @@ require 'helper'
9
9
 
10
10
  class TestRegex < MiniTest::Test
11
11
 
12
+ HEADER_SEP_RE = SportDb::MatchParser::HEADER_SEP_RE
13
+
14
+ def test_header_sep
15
+ assert_equal ['Round', 'Fr+Sa Dec 11+12'], 'Round // Fr+Sa Dec 11+12'.split( HEADER_SEP_RE )
16
+ assert_equal ['Round 11', 'Fr+Sa Dec 11+12'], 'Round 11 /// Fr+Sa Dec 11+12'.split( HEADER_SEP_RE )
17
+ assert_equal ['Round 11', 'Fr+Sa Dec 11+12'], 'Round 11 -- Fr+Sa Dec 11+12'.split( HEADER_SEP_RE )
18
+ assert_equal ['Round 11', 'Fr+Sa Dec 11+12'], 'Round 11 --- Fr+Sa Dec 11+12'.split( HEADER_SEP_RE )
19
+ assert_equal ['Round 11', 'Fr+Sa Dec 11+12'], 'Round 11 ++ Fr+Sa Dec 11+12'.split( HEADER_SEP_RE )
20
+ assert_equal ['Round 11', 'Fr+Sa Dec 11+12'], 'Round 11 +++ Fr+Sa Dec 11+12'.split( HEADER_SEP_RE )
21
+ assert_equal ['Round 11', 'Fr+Sa Dec 11+12'], 'Round 11 || Fr+Sa Dec 11+12'.split( HEADER_SEP_RE )
22
+
23
+ assert_equal ['Final - Leg 1'], 'Final - Leg 1'.split( HEADER_SEP_RE )
24
+ assert_equal ['Final | Leg 1'], 'Final | Leg 1'.split( HEADER_SEP_RE )
25
+ assert_equal ['Final / Leg 1'], 'Final / Leg 1'.split( HEADER_SEP_RE )
26
+ assert_equal ['Final, Leg 1'], 'Final, Leg 1'.split( HEADER_SEP_RE )
27
+ end
28
+
29
+
12
30
  ADDR_MARKER_RE = SportDb::Import::ClubReader::ADDR_MARKER_RE
13
31
  B_TEAM_MARKER_RE = SportDb::Import::ClubReader::B_TEAM_MARKER_RE
14
-
32
+
15
33
  def test_addr
16
34
  assert '~ Wien' =~ ADDR_MARKER_RE
17
35
  assert 'Wien ~' =~ ADDR_MARKER_RE
@@ -22,13 +40,13 @@ class TestRegex < MiniTest::Test
22
40
  assert 'Fischhofgasse 12 /// 1100 Wien' =~ ADDR_MARKER_RE
23
41
 
24
42
  assert_nil 'Fischhofgasse 12 + 1100 Wien' =~ ADDR_MARKER_RE
25
- assert_nil 'Fischhofgasse 12++1100 Wien' =~ ADDR_MARKER_RE
43
+ assert_nil 'Fischhofgasse 12++1100 Wien' =~ ADDR_MARKER_RE ## todo/fix: make it a match!!! why? why not?
26
44
  assert_nil 'Fischhofgasse 12 / 1100 Wien' =~ ADDR_MARKER_RE
27
- assert_nil 'Fischhofgasse 12//1100 Wien' =~ ADDR_MARKER_RE
28
-
45
+ assert_nil 'Fischhofgasse 12//1100 Wien' =~ ADDR_MARKER_RE ## todo/fix: make it a match!!! why? why not?
46
+
29
47
  assert_nil 'Atlanta United FC, 2017, Atlanta › Georgia' =~ ADDR_MARKER_RE
30
48
  end
31
-
49
+
32
50
  def test_b_team
33
51
  assert 'b) Rapid Wien II' =~ B_TEAM_MARKER_RE
34
52
  assert '(b) Rapid Wien II' =~ B_TEAM_MARKER_RE
@@ -38,12 +56,12 @@ class TestRegex < MiniTest::Test
38
56
  assert '(ii.) Rapid Wien II' =~ B_TEAM_MARKER_RE
39
57
  assert '2) Rapid Wien II' =~ B_TEAM_MARKER_RE
40
58
  assert '(2) Rapid Wien II' =~ B_TEAM_MARKER_RE
41
-
59
+
42
60
  assert_nil '(3) Rapid Wien II' =~ B_TEAM_MARKER_RE
43
61
  assert_nil '(iii) Rapid Wien II' =~ B_TEAM_MARKER_RE
44
62
  assert_nil 'iii) Rapid Wien II' =~ B_TEAM_MARKER_RE
45
63
  assert_nil 'c) Rapid Wien II' =~ B_TEAM_MARKER_RE
46
64
  assert_nil '(c) Rapid Wien II' =~ B_TEAM_MARKER_RE
47
65
  end
48
-
66
+
49
67
  end # class TestRegex
@@ -12,9 +12,9 @@ class TestScores < MiniTest::Test
12
12
  def test_de
13
13
  ScoreFormats.lang = :de
14
14
  data = [
15
- [ '10:0', [nil,nil,10,0]],
16
- [ '1:22', [nil,nil,1,22]],
17
- [ '1-22', [nil,nil,1,22]],
15
+ [ '10:0', [nil,nil, 10,0]],
16
+ [ '1:22', [nil,nil, 1,22]],
17
+ [ '1-22', [nil,nil, 1,22]],
18
18
 
19
19
  ## do not support three digits for now - why? why not?
20
20
  [ '1:222', []],
@@ -22,23 +22,32 @@ class TestScores < MiniTest::Test
22
22
  [ '1-222', []],
23
23
  [ '111-0', []],
24
24
 
25
- [ '2:2 (1:1, 1:0) n.V. 5:1 i.E.', [1,0,1,1,2,2,5,1]],
26
- [ '2:2 (1:1, 1:0) n.V.', [1,0,1,1,2,2]],
27
- [ '2:2 (1:1, ) n.V. 5:1 i.E.', [nil,nil,1,1,2,2,5,1]],
28
- [ '2:2 (1:1, ) n.V.', [nil,nil,1,1,2,2]],
29
-
30
- [ '2:2 (1:1) n.V. 5:1 i.E.', [nil,nil,1,1,2,2,5,1]],
31
- [ '2:2 (1:1) n.V.', [nil,nil,1,1,2,2]],
32
-
33
- [ '2-2 (1-1, 1-0) n.V. 5-1 i.E.', [1,0,1,1,2,2,5,1]],
34
- [ '2-2 (1-1, 1-0) n.V.', [1,0,1,1,2,2]],
35
- [ '2-2 (1-1, ) n.V. 5-1 i.E.', [nil,nil,1,1,2,2,5,1]],
36
- [ '2-2 (1-1, ) n.V.', [nil,nil,1,1,2,2]],
37
-
38
- [ '2 : 2 ( 1 : 1 , 1 : 0 ) n.V. 5 : 1 i.E.', [1,0,1,1,2,2,5,1]],
39
- [ '2 : 2 ( 1 : 1 , 1 : 0 ) n.V.', [1,0,1,1,2,2]],
40
- [ '2 : 2 ( 1 : 1 , ) n.V. 5 : 1 i.E.', [nil,nil,1,1,2,2,5,1]],
41
- [ '2 : 2 ( 1 : 1 , ) n.V.', [nil,nil,1,1,2,2]],
25
+ [ '2:2 (1:1, 1:0) n.V. 5:1 i.E.', [1,0, 1,1, 2,2, 5,1]],
26
+ [ '2:2 (1:1, 1:0) n.V.', [1,0, 1,1, 2,2]],
27
+ [ '2:2 (1:1, ) n.V. 5:1 i.E.', [nil,nil, 1,1, 2,2, 5,1]],
28
+ [ '2:2 (1:1, ) n.V.', [nil,nil, 1,1, 2,2]],
29
+
30
+ [ '2:2 (1:1) n.V. 5:1 i.E.', [nil,nil, 1,1, 2,2, 5,1]],
31
+ [ '2:2 (1:1) n.V.', [nil,nil, 1,1, 2,2]],
32
+
33
+ [ '2-2 (1-1, 1-0) n.V. 5-1 i.E.', [1,0, 1,1, 2,2, 5,1]],
34
+ [ '2-2 (1-1, 1-0) n.V.', [1,0, 1,1, 2,2]],
35
+ [ '2-2 (1-1, ) n.V. 5-1 i.E.', [nil,nil, 1,1, 2,2, 5,1]],
36
+ [ '2-2 (1-1, ) n.V.', [nil,nil, 1,1, 2,2]],
37
+
38
+ [ '2 : 2 ( 1 : 1 , 1 : 0 ) n.V. 5 : 1 i.E.', [1,0, 1,1, 2,2, 5,1]],
39
+ [ '2 : 2 ( 1 : 1 , 1 : 0 ) n.V.', [1,0, 1,1, 2,2]],
40
+ [ '2 : 2 ( 1 : 1 , ) n.V. 5 : 1 i.E.', [nil,nil, 1,1, 2,2, 5,1]],
41
+ [ '2 : 2 ( 1 : 1 , ) n.V.', [nil,nil, 1,1, 2,2]],
42
+
43
+ ## alternate format
44
+ ['i.E. 2:4, n.V. 3:3 (1:1, 1:0)', [1,0, 1,1, 3,3, 2,4]],
45
+ ['iE 2:4 nV 3:3 (1:1, 1:0)', [1,0, 1,1, 3,3, 2,4]],
46
+ ['i.E. 2:4 n.V. 3:3 (1:1, 1:0)', [1,0, 1,1, 3,3, 2,4]],
47
+ ['i.E. 2:4, n.V. 3:3 (1:1)', [nil, nil, 1,1, 3,3, 2,4]],
48
+ ['i.E. 2:4 n.V. 3:3 (1:1)', [nil, nil, 1,1, 3,3, 2,4]],
49
+ ['n.V. 3:2 (2:2, 1:2)', [1,2, 2,2, 3,2]],
50
+ ['n.V. 3:2 (2:2)', [nil, nil, 2,2, 3,2]],
42
51
  ]
43
52
 
44
53
  assert_score( data )
@@ -48,9 +57,9 @@ class TestScores < MiniTest::Test
48
57
  ScoreFormats.lang = :en
49
58
 
50
59
  data = [
51
- [ '1-22', [nil,nil,1,22]],
52
- [ '1x22', [nil,nil,1,22]],
53
- [ '1X22', [nil,nil,1,22]],
60
+ [ '1-22', [nil,nil, 1, 22]],
61
+ [ '1x22', [nil,nil, 1, 22]],
62
+ [ '1X22', [nil,nil, 1,22]],
54
63
 
55
64
  ## do not support three digits for now - why? why not?
56
65
  [ '1-222', []],
@@ -63,39 +72,39 @@ class TestScores < MiniTest::Test
63
72
  [ '2:1 (1:1)', []],
64
73
 
65
74
 
66
- [ '2-1 (1-1)', [1,1,2,1]],
67
- [ '2x1 (1x1)', [1,1,2,1]],
68
- [ '2X1 (1X1)', [1,1,2,1]],
75
+ [ '2-1 (1-1)', [1,1, 2,1]],
76
+ [ '2x1 (1x1)', [1,1, 2,1]],
77
+ [ '2X1 (1X1)', [1,1, 2,1]],
69
78
 
70
- [ '2-1 a.e.t. (1-1, 0-0)', [0,0,1,1,2,1]],
71
- [ '2-1aet (1-1, 0-0)', [0,0,1,1,2,1]],
72
- [ '2-1 A.E.T. (1-1, 0-0)', [0,0,1,1,2,1]],
73
- [ '2-1AET (1-1, 0-0)', [0,0,1,1,2,1]],
79
+ [ '2-1 a.e.t. (1-1, 0-0)', [0,0, 1,1, 2,1]],
80
+ [ '2-1aet (1-1, 0-0)', [0,0, 1,1, 2,1]],
81
+ [ '2-1 A.E.T. (1-1, 0-0)', [0,0, 1,1, 2,1]],
82
+ [ '2-1AET (1-1, 0-0)', [0,0, 1,1, 2,1]],
74
83
 
75
- [ '3-4 pen. 2-2 a.e.t. (1-1, 1-1)', [1,1,1,1,2,2,3,4]],
76
- [ '3-4 pen 2-2 a.e.t. (1-1, 1-1)', [1,1,1,1,2,2,3,4]],
77
- [ '3-4 pen 2-2 a.e.t. (1-1, 1-1)', [1,1,1,1,2,2,3,4]],
78
- [ '3-4p 2-2aet (1-1, 1-1)', [1,1,1,1,2,2,3,4]],
79
- [ '3-4PSO 2-2AET (1-1, 1-1)', [1,1,1,1,2,2,3,4]],
84
+ [ '3-4 pen. 2-2 a.e.t. (1-1, 1-1)', [1,1, 1,1, 2,2, 3,4]],
85
+ [ '3-4 pen 2-2 a.e.t. (1-1, 1-1)', [1,1, 1,1, 2,2, 3,4]],
86
+ [ '3-4 pen 2-2 a.e.t. (1-1, 1-1)', [1,1, 1,1, 2,2, 3,4]],
87
+ [ '3-4p 2-2aet (1-1, 1-1)', [1,1, 1,1, 2,2, 3,4]],
88
+ [ '3-4PSO 2-2AET (1-1, 1-1)', [1,1, 1,1, 2,2, 3,4]],
80
89
 
81
- [ '4-3 pen. 1-0 a.e.t. (1-0, )', [nil,nil,1,0,1,0,4,3]],
82
- [ '3-4 pen. 2-1 a.e.t. (2-1, )', [nil,nil,2,1,2,1,3,4]],
83
- [ '4-1 a.e.t. (3-1, )', [nil,nil,3,1,4,1]],
84
- [ '3-4aet (1-1,)', [nil,nil,1,1,3,4]],
85
- [ '3-4 a.e.t. (1-1,)', [nil,nil,1,1,3,4]],
90
+ [ '4-3 pen. 1-0 a.e.t. (1-0, )', [nil,nil, 1,0, 1,0, 4,3]],
91
+ [ '3-4 pen. 2-1 a.e.t. (2-1, )', [nil,nil, 2,1, 2,1, 3,4]],
92
+ [ '4-1 a.e.t. (3-1, )', [nil,nil, 3,1, 4,1]],
93
+ [ '3-4aet (1-1,)', [nil,nil, 1,1, 3,4]],
94
+ [ '3-4 a.e.t. (1-1,)', [nil,nil, 1,1, 3,4]],
86
95
 
87
- [ '4-3 pen. 1-0 a.e.t. (1-0)', [nil,nil,1,0,1,0,4,3]],
88
- [ '3-4 pen. 2-1 a.e.t. (2-1)', [nil,nil,2,1,2,1,3,4]],
89
- [ '4-1 a.e.t. (3-1)', [nil,nil,3,1,4,1]],
90
- [ '3-4aet (1-1)', [nil,nil,1,1,3,4]],
91
- [ '3-4 a.e.t. (1-1)', [nil,nil,1,1,3,4]],
96
+ [ '4-3 pen. 1-0 a.e.t. (1-0)', [nil,nil, 1,0, 1,0, 4,3]],
97
+ [ '3-4 pen. 2-1 a.e.t. (2-1)', [nil,nil, 2,1, 2,1, 3,4]],
98
+ [ '4-1 a.e.t. (3-1)', [nil,nil, 3,1, 4,1]],
99
+ [ '3-4aet (1-1)', [nil,nil, 1,1, 3,4]],
100
+ [ '3-4 a.e.t. (1-1)', [nil,nil, 1,1, 3,4]],
92
101
 
93
- [ '3-1 pen (1-1)', [nil,nil,1,1, nil, nil, 3,1]],
102
+ [ '3-1 pen (1-1)', [nil,nil, 1,1, nil, nil, 3,1]],
94
103
 
95
104
  ## try with more "liberal" spaces
96
- [ '2 - 1 ( 1 - 1 )', [1,1,2,1]],
97
- [ '2 - 1 a.e.t. ( 1 - 1 , 0 - 0 )', [0,0,1,1,2,1]],
98
- [ '4 - 1 a.e.t. ( 3 - 1, )', [nil,nil,3,1,4,1]],
105
+ [ '2 - 1 ( 1 - 1 )', [1,1, 2,1]],
106
+ [ '2 - 1 a.e.t. ( 1 - 1 , 0 - 0 )', [0,0, 1,1, 2,1]],
107
+ [ '4 - 1 a.e.t. ( 3 - 1, )', [nil,nil, 3,1, 4,1]],
99
108
  ]
100
109
 
101
110
  assert_score( data )
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: 1.0.2
4
+ version: 1.1.0
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-05-12 00:00:00.000000000 Z
11
+ date: 2020-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alphabets
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
33
+ version: 1.0.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 1.0.0
40
+ version: 1.0.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: csvreader
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +136,7 @@ files:
136
136
  - lib/sportdb/formats/match/mapper_teams.rb
137
137
  - lib/sportdb/formats/match/match_parser.rb
138
138
  - lib/sportdb/formats/match/match_parser_auto_conf.rb
139
+ - lib/sportdb/formats/match/match_parser_csv.rb
139
140
  - lib/sportdb/formats/name_helper.rb
140
141
  - lib/sportdb/formats/outline_reader.rb
141
142
  - lib/sportdb/formats/package.rb
@@ -168,8 +169,11 @@ files:
168
169
  - test/test_conf.rb
169
170
  - test/test_country_index.rb
170
171
  - test/test_country_reader.rb
172
+ - test/test_csv_match_parser.rb
173
+ - test/test_csv_match_parser_utils.rb
171
174
  - test/test_csv_reader.rb
172
175
  - test/test_datafile.rb
176
+ - test/test_datafile_package.rb
173
177
  - test/test_goals.rb
174
178
  - test/test_league_index.rb
175
179
  - test/test_league_outline_reader.rb
@@ -178,6 +182,7 @@ files:
178
182
  - test/test_match_auto.rb
179
183
  - test/test_match_auto_champs.rb
180
184
  - test/test_match_auto_euro.rb
185
+ - test/test_match_auto_relegation.rb
181
186
  - test/test_match_auto_worldcup.rb
182
187
  - test/test_match_champs.rb
183
188
  - test/test_match_eng.rb