icu_tournament 1.6.2 → 1.6.3

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.
@@ -191,7 +191,7 @@ module ICU
191
191
  end
192
192
  raise "invalid INI file (no sections)" if ini.size == 0
193
193
  if ini["Tournament Info"]
194
- %w(name arbiter rounds).each do |key|
194
+ %w(name arbiter).each do |key|
195
195
  val = (ini["Tournament Info"][key.capitalize] || '').squeeze(" ")
196
196
  @t.send("#{key}=", val) if val.size > 0
197
197
  end
@@ -285,9 +285,9 @@ module ICU
285
285
  fix_numbering
286
286
  end
287
287
 
288
+ # Since version 1.6.3 we no longer trust the number of rounds from the INI file.
288
289
  def fix_number_of_rounds
289
- rounds = @t.last_round
290
- @t.rounds = rounds
290
+ @t.rounds = @t.last_round
291
291
  end
292
292
 
293
293
  def fix_missing_results
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ICU
4
4
  class Tournament
5
- VERSION = "1.6.2"
5
+ VERSION = "1.6.3"
6
6
  end
7
7
  end
@@ -233,6 +233,20 @@ module ICU
233
233
  end
234
234
  end
235
235
 
236
+ context "Phibsborough Intermediate CC, 2012, which has zero for the number of rounds in the INI file" do
237
+ before(:each) do
238
+ @p = ICU::Tournament::SwissPerfect.new
239
+ end
240
+
241
+ it "should parse" do
242
+ @t = @p.parse_file(SAMPLES + 'phibs_cc_inter_2012.zip', :start => "2012-04-16")
243
+ @p.error.should be_nil
244
+ @t.name.should == "Phibsboro Club Championship 2012 Inter"
245
+ @t.rounds.should == 5
246
+ @t.arbiter.should == "Michael Germaine"
247
+ end
248
+ end
249
+
236
250
  context "Non-existant ZIP file" do
237
251
  before(:all) do
238
252
  @p = ICU::Tournament::SwissPerfect.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icu_tournament
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-12 00:00:00.000000000 Z
12
+ date: 2012-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dbf
@@ -173,7 +173,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  segments:
175
175
  - 0
176
- hash: 2248538419215277086
176
+ hash: -277681938587393865
177
177
  required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  none: false
179
179
  requirements:
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  version: '0'
183
183
  segments:
184
184
  - 0
185
- hash: 2248538419215277086
185
+ hash: -277681938587393865
186
186
  requirements: []
187
187
  rubyforge_project: icu_tournament
188
188
  rubygems_version: 1.8.24