sportdb-models 1.18.3 → 1.18.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sportdb/finders/scores.rb +5 -4
- data/lib/sportdb/version.rb +1 -1
- data/test/test_scores.rb +5 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a98ed66ad51aa02af40583f83dc46e04a56c3dad
|
4
|
+
data.tar.gz: 54b2c7f2b26daac5922a05c782abba79bd932bd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3313deac8439d0c4edf848c8ffc99eaab7bc792a598ba53cf0a9a419c7baac7b65ce62a50409e7a4de4c6a24c43350ecaa52fc52855ce822e1a853e6da12a3b
|
7
|
+
data.tar.gz: f6d31b12c5f78fbb9b53ed8ff5e7b4aef45ad0faf97262b5b92fbe95dd9bcdca1b001bc01dc3e83a3ccd14cac2a3b535c123c9f48a6e2c9eefeaff5c16c486d9
|
@@ -79,10 +79,11 @@ class ScoresFinder
|
|
79
79
|
# more
|
80
80
|
|
81
81
|
# e.g. 1:2 or 0:2 or 3:3 or
|
82
|
-
# 1-1 or 0-2 or 3-3
|
82
|
+
# 1-1 or 0-2 or 3-3 or
|
83
|
+
# 1x1 or 1X1 or 0x2 or 3x3 -- used in Brazil / Portugal
|
83
84
|
FT_REGEX = /\b
|
84
85
|
(?<score1>\d{1,2})
|
85
|
-
[:\-]
|
86
|
+
[:\-xX]
|
86
87
|
(?<score2>\d{1,2})
|
87
88
|
\b/x
|
88
89
|
|
@@ -92,7 +93,7 @@ class ScoresFinder
|
|
92
93
|
# note: possible ending w/ . -> thus cannot use /b will not work w/ .; use zero look-ahead
|
93
94
|
ET_REGEX = /\b
|
94
95
|
(?<score1>\d{1,2})
|
95
|
-
[:\-]
|
96
|
+
[:\-xX]
|
96
97
|
(?<score2>\d{1,2})
|
97
98
|
\s? # allow optional space
|
98
99
|
(?:nv|n\.v\.|aet|a\.e\.t\.) # allow optional . e.g. nV or n.V.
|
@@ -106,7 +107,7 @@ class ScoresFinder
|
|
106
107
|
# note: possible ending w/ . -> thus cannot use /b will not work w/ .; use zero look-ahead
|
107
108
|
P_REGEX = /\b
|
108
109
|
(?<score1>\d{1,2})
|
109
|
-
[:\-]
|
110
|
+
[:\-xX]
|
110
111
|
(?<score2>\d{1,2})
|
111
112
|
\s? # allow optional space
|
112
113
|
(?:iE|i\.E\.|p|pen|PSO) # allow optional . e.g. iE or i.E.
|
data/lib/sportdb/version.rb
CHANGED
data/test/test_scores.rb
CHANGED
@@ -3,9 +3,6 @@
|
|
3
3
|
###
|
4
4
|
# to run use
|
5
5
|
# ruby -I ./lib -I ./test test/test_scores.rb
|
6
|
-
# or better
|
7
|
-
# rake -I ./lib test
|
8
|
-
|
9
6
|
|
10
7
|
|
11
8
|
require 'helper'
|
@@ -18,12 +15,17 @@ class TestScores < MiniTest::Test
|
|
18
15
|
[ '10:0', [nil,nil,10,0]],
|
19
16
|
[ '1:22', [nil,nil,1,22]],
|
20
17
|
[ '1-22', [nil,nil,1,22]],
|
18
|
+
[ '1x22', [nil,nil,1,22]],
|
19
|
+
[ '1X22', [nil,nil,1,22]],
|
20
|
+
|
21
21
|
|
22
22
|
## do not support three digits
|
23
23
|
[ '1-222', []],
|
24
24
|
[ '111-0', []],
|
25
25
|
[ '1:222', []],
|
26
26
|
[ '111:0', []],
|
27
|
+
[ '111x0', []],
|
28
|
+
[ '111X0', []],
|
27
29
|
|
28
30
|
## penality only
|
29
31
|
[ '3-4iE', [nil,nil,nil,nil,nil,nil,3,4]],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportdb-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.18.
|
4
|
+
version: 1.18.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: worlddb-models
|