icu_tournament 1.3.8 → 1.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,7 +43,7 @@ module ICU
43
43
  #
44
44
  # tournament = parser.parse_file('ncc', :start => '2010-05-08')
45
45
  # tournament.player(2).id # => 12379 (ICU ID)
46
- # tournament.player(2).fide # => 1205064 (FIDE ID)
46
+ # tournament.player(2).fide_id # => 1205064 (FIDE ID)
47
47
  # tournament.player(2).rating # => 2556 (ICU rating)
48
48
  # tournament.player(2).fide_rating # => 2530 (FIDE rating)
49
49
  #
@@ -58,9 +58,9 @@ module ICU
58
58
  # The optional attribute names, together with their column header names in SwissPerfect, are as follows:
59
59
  #
60
60
  # * _fed_: Feder
61
- # * _fide_: Intl Id
61
+ # * _fide_id_: Intl Id
62
62
  # * _id_: Loc Id
63
- # * _fide_: ting_ (Rtg
63
+ # * _fide_rating_: Rtg
64
64
  # * _rating_: Loc
65
65
  # * _title_: Title
66
66
  # * _points_: Total
@@ -107,6 +107,8 @@ module ICU
107
107
  #
108
108
  class SPExport
109
109
  attr_reader :error
110
+
111
+ EXPORT_OPTIONS = [:fed, :fide_id, :id, :fide_rating, :rating, :title, :points]
110
112
 
111
113
  # Parse SwissPerfect export data returning a Tournament on success or raising an exception on error.
112
114
  def parse!(spx, arg={})
@@ -189,7 +191,7 @@ module ICU
189
191
  columns = Array.new
190
192
  columns.push(:num)
191
193
  columns.push(:name)
192
- [:fed, :fide_id, :id, :fide_rating, :rating, :title, :points].each { |x| columns.push(x) if optional.include?(x) }
194
+ EXPORT_OPTIONS.each { |x| columns.push(x) if optional.include?(x) }
193
195
 
194
196
  # SwissPerfect headers for each column (other than the rounds, which are treated separately).
195
197
  header = Hash.new
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ICU
4
4
  class Tournament
5
- VERSION = "1.3.8"
5
+ VERSION = "1.3.9"
6
6
  end
7
7
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 3
8
- - 8
9
- version: 1.3.8
8
+ - 9
9
+ version: 1.3.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mark Orr
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-06 00:00:00 +00:00
17
+ date: 2011-03-08 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency