icu_tournament 1.9.5 → 1.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 74df6f6b05bbaf0a54ce055e247c4ece9e64ec16
4
- data.tar.gz: 427004e7f6b7fab5a6b632fd3b4ea38a21ffcdfe
2
+ SHA256:
3
+ metadata.gz: e1f1c6f7bc5da88c02ef93bb645ea1c66a74a524c9660228b113a9534dda9fe1
4
+ data.tar.gz: 2aabe2659d391ce17af265bc90bbad37e23b358eb869f2223fa84b8cf33f6ec3
5
5
  SHA512:
6
- metadata.gz: 027f715f83f6eeab51c8aeab5d42b9bacd004cebcd8557c8f0792c160c1ebc4ed55641d670ea41173e8dacaf19ca1e53d32546a0f07048661e71281ddc3732d5
7
- data.tar.gz: eb3fe4ae2559df38e4a127aa571e0956833626bea49f0dda5a59cde0ad625c29e433e3a2b48139f75a9ab675d79cbb2db88b0a5df07f9225f04d0c5418fb66ea
6
+ metadata.gz: cb4e37782391a243362b0852538dd032f5c6a291ea0e404ffa110e28ed2df3593d182a35628f70a3044e915a5ff303959fdf4d344c6e9ebb3066bf9b6640b846
7
+ data.tar.gz: 932cf6f1d651cda6edf1d7fb93f6dc999be911e2009bcdd7c816ff9dde9ba48f3b80197fdaed81d1a960a7284a4f619e46d379da2e8d30763d107dbe9dd3f36d
@@ -433,11 +433,18 @@ module ICU
433
433
  full_byes << round
434
434
  return 0.0
435
435
  end
436
- data = "#{data} -" if data.match(/^\d+ (w|b|-)$/)
437
- raise "invalid result '#{data}'" unless data.match(/^(0{1,4}|[1-9]\d{0,3}) (w|b|-) (1|0|=|\+|-)$/)
438
- opponent = $1.to_i
439
- colour = $2
440
- score = $3
436
+ data = "#{data} -" if data.match(/^(\d+)? (w|b|-)$/)
437
+ if data.match(/^(0{1,4}|[1-9]\d{0,3}) (w|b|-) (1|0|=|\+|-)$/)
438
+ opponent = $1.to_i
439
+ colour = $2
440
+ score = $3
441
+ elsif data.match(/- (1|0|=|\+|-)$/)
442
+ opponent = 0
443
+ colour = "-"
444
+ score = $1
445
+ else
446
+ raise "invalid result '#{data}'"
447
+ end
441
448
  options = Hash.new
442
449
  options[:opponent] = opponent unless opponent == 0
443
450
  options[:colour] = colour unless colour == '-'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ICU
4
4
  class Tournament
5
- VERSION = "1.9.5"
5
+ VERSION = "1.9.7"
6
6
  end
7
7
  end
@@ -807,6 +807,12 @@ KRAUSE
807
807
  expect { @p.parse_file!(file) }.not_to raise_error
808
808
  end
809
809
 
810
+ it "should handle Cork Major 2018 (Swiss Master format)" do
811
+ file = "#{@s}/cork_major_2018_swissmaster.tab"
812
+ @t = @p.parse_file(file, :fed => :ignore)
813
+ check_results(1, 6, 3.5)
814
+ end
815
+
810
816
  it "should handle a file with a BOM" do
811
817
  file = "#{@s}/armstrong_2012_with_bom.tab"
812
818
  expect { @p.parse_file!(file) }.not_to raise_error
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icu_tournament
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.5
4
+ version: 1.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Orr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-07 00:00:00.000000000 Z
11
+ date: 2019-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dbf
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: icu_utils
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.2'
61
+ version: 1.3.2
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.2'
68
+ version: 1.3.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -176,19 +176,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  version: '0'
177
177
  requirements: []
178
178
  rubyforge_project: icu_tournament
179
- rubygems_version: 2.4.5
179
+ rubygems_version: 2.7.8
180
180
  signing_key:
181
181
  specification_version: 4
182
182
  summary: For reading and writing files of chess tournament data.
183
183
  test_files:
184
- - spec/player_spec.rb
185
184
  - spec/result_spec.rb
186
- - spec/spec_helper.rb
187
- - spec/team_spec.rb
188
- - spec/tie_break_spec.rb
189
185
  - spec/tournament_fcsv_spec.rb
186
+ - spec/team_spec.rb
187
+ - spec/util_spec.rb
188
+ - spec/player_spec.rb
189
+ - spec/tournament_spec.rb
190
190
  - spec/tournament_krause_spec.rb
191
191
  - spec/tournament_sp_spec.rb
192
- - spec/tournament_spec.rb
192
+ - spec/tie_break_spec.rb
193
+ - spec/spec_helper.rb
193
194
  - spec/tournament_spx_spec.rb
194
- - spec/util_spec.rb