icu_tournament 1.7.3 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -97,7 +97,7 @@ module ICU
97
97
  # fox1.gender # => 'M'
98
98
  #
99
99
  class Player
100
- extend ICU::Accessor
100
+ extend ICU::Util::Accessor
101
101
  attr_integer :num
102
102
  attr_positive_or_nil :id, :fide_id, :rating, :fide_rating, :rank
103
103
  attr_date_or_nil :dob
@@ -132,7 +132,7 @@ module ICU
132
132
 
133
133
  # Reset the original name.
134
134
  def original_name=(original_name)
135
- @original_name = ICU::Util.to_utf8(original_name)
135
+ @original_name = ICU::Util::String.to_utf8(original_name)
136
136
  end
137
137
 
138
138
  # Return the full name, last name first.
@@ -80,7 +80,7 @@ module ICU
80
80
  # r.eql?(r3, :except => [:rateable, :score]) # => true
81
81
  #
82
82
  class Result
83
- extend ICU::Accessor
83
+ extend ICU::Util::Accessor
84
84
  attr_positive :round
85
85
  attr_integer :player
86
86
 
@@ -193,7 +193,7 @@ module ICU
193
193
  # in which case any options supplied to this method will be silently ignored.
194
194
  #
195
195
  class Tournament
196
- extend ICU::Accessor
196
+ extend ICU::Util::Accessor
197
197
  attr_date :start
198
198
  attr_date_or_nil :finish
199
199
  attr_positive_or_nil :rounds
@@ -224,7 +224,7 @@ module ICU
224
224
  # Add a round date.
225
225
  def add_round_date(round_date)
226
226
  round_date = round_date.to_s.strip
227
- parsed_date = Util.parsedate(round_date)
227
+ parsed_date = Util::Date.parse(round_date)
228
228
  raise "invalid round date (#{round_date})" unless parsed_date
229
229
  @round_dates << parsed_date
230
230
  end
@@ -125,7 +125,7 @@ module ICU
125
125
  def parse!(csv, arg={})
126
126
  @state, @line, @round, @sum, @error = 0, 0, nil, nil, nil
127
127
  @tournament = Tournament.new('Unspecified', '2000-01-01')
128
- csv = ICU::Util.to_utf8(csv) unless arg[:is_utf8]
128
+ csv = ICU::Util::String.to_utf8(csv) unless arg[:is_utf8]
129
129
 
130
130
  CSV.parse(csv, :row_sep => :auto) do |r|
131
131
  @line += 1 # increment line number
@@ -184,7 +184,7 @@ module ICU
184
184
 
185
185
  # Same as <em>parse!</em> except the input is a file name rather than file contents.
186
186
  def parse_file!(file)
187
- csv = ICU::Util.read_utf8(file)
187
+ csv = ICU::Util::File.read_utf8(file)
188
188
  parse!(csv, :is_utf8 => true)
189
189
  end
190
190
 
@@ -216,7 +216,7 @@ module ICU
216
216
  @name_set, @start_set = false, false
217
217
  @comments = ''
218
218
  @results = Array.new
219
- krs = ICU::Util.to_utf8(krs) unless arg[:is_utf8]
219
+ krs = ICU::Util::String.to_utf8(krs) unless arg[:is_utf8]
220
220
  lines = get_lines(krs)
221
221
 
222
222
  # Process all lines.
@@ -292,7 +292,7 @@ module ICU
292
292
 
293
293
  # Same as <em>parse!</em> except the input is a file name rather than file contents.
294
294
  def parse_file!(file, arg={})
295
- krause = ICU::Util.read_utf8(file)
295
+ krause = ICU::Util::File.read_utf8(file)
296
296
  arg[:is_utf8] = true
297
297
  parse!(krause, arg)
298
298
  end
@@ -185,7 +185,7 @@ module ICU
185
185
 
186
186
  def parse_ini(file)
187
187
  begin
188
- ini = ICU::Util.load_ini(file)
188
+ ini = ICU::Util::File.load_ini(file)
189
189
  rescue
190
190
  raise "non-existant INI file (#{file})"
191
191
  end
@@ -128,7 +128,7 @@ module ICU
128
128
  @lineno = 0
129
129
  @header = nil
130
130
  @results = Array.new
131
- spx = ICU::Util.to_utf8(spx) unless arg[:is_utf8]
131
+ spx = ICU::Util::String.to_utf8(spx) unless arg[:is_utf8]
132
132
 
133
133
  # Process each line.
134
134
  spx.each_line do |line|
@@ -172,7 +172,7 @@ module ICU
172
172
 
173
173
  # Same as <em>parse!</em> except the input is a file name rather than file contents.
174
174
  def parse_file!(file, arg={})
175
- spx = ICU::Util.read_utf8(file)
175
+ spx = ICU::Util::File.read_utf8(file)
176
176
  arg[:is_utf8] = true
177
177
  parse!(spx, arg)
178
178
  end
@@ -1,166 +1,167 @@
1
1
  module ICU
2
2
  module Util
3
-
4
- # Parse dates into yyyy-mm-dd format, preferring European over US convention. Returns nil on error.
5
- #
6
- # Util.parsedate('1955-11-09') # => '1955-11-09'
7
- # Util.parsedate('02/03/2009') # => '2009-03-02'
8
- # Util.parsedate('02/23/2009') # => '2009-02-23'
9
- # Util.parsedate('16th June 1986') # => '1986-06-16'
10
- #
11
- # Note that the parse method of the Date class behaves differently in Ruby 1.8 and 1.9.
12
- # In 1.8 it assumes American dates and will raise ArgumentError on "30/03/2003".
13
- # In 1.9 it assumes European dates and will raise ArgumentError on "03/30/2003".
14
- def self.parsedate(date)
15
- date = date.to_s.strip
16
- return nil unless date.match(/[1-9]/)
17
- date = [$3].concat($2.to_i > 12 ? [$1, $2] : [$2, $1]).join('-') if date.match(/^(\d{1,2}).(\d{1,2}).(\d{4})$/)
18
- begin
19
- Date.parse(date, true).to_s
20
- rescue
21
- nil
3
+ module Date
4
+ # Parse dates into yyyy-mm-dd format, preferring European over US convention. Returns nil on error.
5
+ #
6
+ # Date.parse('1955-11-09') # => '1955-11-09'
7
+ # Date.parse('02/03/2009') # => '2009-03-02'
8
+ # Date.parse('02/23/2009') # => '2009-02-23'
9
+ # Date.parse('16th June 1986') # => '1986-06-16'
10
+ #
11
+ # Note that the parse method of the Date class behaves differently in Ruby 1.8 and 1.9.
12
+ # In 1.8 it assumes American dates and will raise ArgumentError on "30/03/2003".
13
+ # In 1.9 it assumes European dates and will raise ArgumentError on "03/30/2003".
14
+ def self.parse(date)
15
+ date = date.to_s.strip
16
+ return nil unless date.match(/[1-9]/)
17
+ date = [$3].concat($2.to_i > 12 ? [$1, $2] : [$2, $1]).join('-') if date.match(/^(\d{1,2}).(\d{1,2}).(\d{4})$/)
18
+ begin
19
+ ::Date.parse(date, true).to_s
20
+ rescue
21
+ nil
22
+ end
22
23
  end
23
24
  end
24
25
 
25
- # Read UTF data from a file.
26
- def self.read_utf8(name)
27
- File.open(name, "r:ASCII-8BIT") do |f|
28
- data = f.read
29
- bom = "\xEF\xBB\xBF".force_encoding("ASCII-8BIT")
30
- data.sub!(/^#{bom}/, "") # get rid of a UTF-8 BOM
31
- to_utf8(data) # this function is defined in ICU::Util from icu_name
26
+ module File
27
+ # Read UTF data from a file.
28
+ def self.read_utf8(name)
29
+ ::File.open(name, "r:ASCII-8BIT") do |f|
30
+ data = f.read
31
+ bom = "\xEF\xBB\xBF".force_encoding("ASCII-8BIT")
32
+ data.sub!(/^#{bom}/, "") # get rid of a UTF-8 BOM
33
+ ICU::Util::String.to_utf8(data) # defined in icu_name
34
+ end
32
35
  end
33
- end
34
36
 
35
- # Load an INI file and convert to a hash.
36
- def self.load_ini(name)
37
- text = read_utf8(name)
38
- data = Hash.new
39
- header = nil
40
- text.split(/\n/).each do |line|
41
- if line.match(/^\s*\[([^\]]+)\]\s*$/)
42
- header = $1.strip
43
- header = nil if header == ""
44
- elsif header && line.match(/^([^=]+)=(.*)$/)
45
- key = $1.strip
46
- val = $2.strip
47
- unless key == ""
48
- data[header] ||= Hash.new
49
- data[header][key] = val
37
+ # Load an INI file and convert to a hash.
38
+ def self.load_ini(name)
39
+ text = self.read_utf8(name)
40
+ data = Hash.new
41
+ header = nil
42
+ text.split(/\n/).each do |line|
43
+ if line.match(/^\s*\[([^\]]+)\]\s*$/)
44
+ header = $1.strip
45
+ header = nil if header == ""
46
+ elsif header && line.match(/^([^=]+)=(.*)$/)
47
+ key = $1.strip
48
+ val = $2.strip
49
+ unless key == ""
50
+ data[header] ||= Hash.new
51
+ data[header][key] = val
52
+ end
50
53
  end
51
54
  end
55
+ data
52
56
  end
53
- data
54
57
  end
55
- end
56
58
 
57
- #
58
- # Miscellaneous accessor helpers.
59
- #
60
- module Accessor
61
- def attr_accessor(name, &block)
62
- attr_reader name
63
- if block
64
- define_method("#{name}=") do |val|
65
- val = block.call(val)
66
- instance_variable_set("@#{name}", val)
59
+ # Miscellaneous accessor helpers.
60
+ module Accessor
61
+ def attr_accessor(name, &block)
62
+ attr_reader name
63
+ if block
64
+ define_method("#{name}=") do |val|
65
+ val = block.call(val)
66
+ instance_variable_set("@#{name}", val)
67
+ end
67
68
  end
68
69
  end
69
- end
70
70
 
71
- def attr_integer(*names)
72
- names.each do |name|
73
- attr_accessor(name) do |val|
74
- tmp = val.to_i
75
- raise "invalid integer (#{val}) for #{name}" unless val.is_a?(Fixnum) || (val.is_a?(String) && val.include?(tmp.to_s))
76
- tmp
71
+ def attr_integer(*names)
72
+ names.each do |name|
73
+ attr_accessor(name) do |val|
74
+ tmp = val.to_i
75
+ raise "invalid integer (#{val}) for #{name}" unless val.is_a?(Fixnum) || (val.is_a?(::String) && val.include?(tmp.to_s))
76
+ tmp
77
+ end
77
78
  end
78
79
  end
79
- end
80
80
 
81
- def attr_integer_or_nil(*names)
82
- names.each do |name|
83
- attr_accessor(name) do |val|
84
- tmp = case val
85
- when nil then nil
86
- when Fixnum then val
87
- when /^\s*$/ then nil
88
- else val.to_i
81
+ def attr_integer_or_nil(*names)
82
+ names.each do |name|
83
+ attr_accessor(name) do |val|
84
+ tmp = case val
85
+ when nil then nil
86
+ when Fixnum then val
87
+ when /^\s*$/ then nil
88
+ else val.to_i
89
+ end
90
+ raise "invalid integer (#{val}) for #{name}" if tmp == 0 && val.is_a?(::String) && !val.include?('0')
91
+ tmp
89
92
  end
90
- raise "invalid integer (#{val}) for #{name}" if tmp == 0 && val.is_a?(String) && !val.include?('0')
91
- tmp
92
93
  end
93
94
  end
94
- end
95
95
 
96
- def attr_positive(*names)
97
- names.each do |name|
98
- attr_accessor(name) do |val|
99
- tmp = val.to_i
100
- raise "invalid positive integer (#{val}) for #{name}" unless tmp > 0
101
- tmp
96
+ def attr_positive(*names)
97
+ names.each do |name|
98
+ attr_accessor(name) do |val|
99
+ tmp = val.to_i
100
+ raise "invalid positive integer (#{val}) for #{name}" unless tmp > 0
101
+ tmp
102
+ end
102
103
  end
103
104
  end
104
- end
105
105
 
106
- def attr_positive_or_nil(*names)
107
- names.each do |name|
108
- attr_accessor(name) do |val|
109
- tmp = case val
110
- when nil then nil
111
- when Fixnum then val
112
- when /^\s*$/ then nil
113
- else val.to_i
106
+ def attr_positive_or_nil(*names)
107
+ names.each do |name|
108
+ attr_accessor(name) do |val|
109
+ tmp = case val
110
+ when nil then nil
111
+ when Fixnum then val
112
+ when /^\s*$/ then nil
113
+ else val.to_i
114
+ end
115
+ raise "invalid positive integer or nil (#{val}) for #{name}" unless tmp.nil? || tmp > 0
116
+ tmp
114
117
  end
115
- raise "invalid positive integer or nil (#{val}) for #{name}" unless tmp.nil? || tmp > 0
116
- tmp
117
118
  end
118
119
  end
119
- end
120
120
 
121
- def attr_date(*names)
122
- names.each do |name|
123
- attr_accessor(name) do |val|
124
- tmp = val.to_s.strip
125
- tmp = ICU::Util::parsedate(tmp)
126
- raise "invalid date (#{val}) for #{name}" unless tmp
127
- tmp
121
+ def attr_date(*names)
122
+ names.each do |name|
123
+ attr_accessor(name) do |val|
124
+ tmp = val.to_s.strip
125
+ tmp = ICU::Util::Date::parse(tmp)
126
+ raise "invalid date (#{val}) for #{name}" unless tmp
127
+ tmp
128
+ end
128
129
  end
129
130
  end
130
- end
131
131
 
132
- def attr_date_or_nil(*names)
133
- names.each do |name|
134
- attr_accessor(name) do |val|
135
- tmp = val.to_s.strip
136
- if tmp == ''
137
- tmp = nil
138
- else
139
- tmp = ICU::Util::parsedate(tmp)
140
- raise "invalid date or nil (#{val}) for #{name}" unless tmp
132
+ def attr_date_or_nil(*names)
133
+ names.each do |name|
134
+ attr_accessor(name) do |val|
135
+ tmp = val.to_s.strip
136
+ if tmp == ''
137
+ tmp = nil
138
+ else
139
+ tmp = ICU::Util::Date::parse(tmp)
140
+ raise "invalid date or nil (#{val}) for #{name}" unless tmp
141
+ end
142
+ tmp
141
143
  end
142
- tmp
143
144
  end
144
145
  end
145
- end
146
146
 
147
- def attr_string(regex, *names)
148
- names.each do |name|
149
- attr_accessor(name) do |val|
150
- tmp = val.to_s.strip
151
- raise "invalid #{name} (#{val})" unless tmp.match(regex)
152
- tmp
147
+ def attr_string(regex, *names)
148
+ names.each do |name|
149
+ attr_accessor(name) do |val|
150
+ tmp = val.to_s.strip
151
+ raise "invalid #{name} (#{val})" unless tmp.match(regex)
152
+ tmp
153
+ end
153
154
  end
154
155
  end
155
- end
156
156
 
157
- def attr_string_or_nil(regex, *names)
158
- names.each do |name|
159
- attr_accessor(name) do |val|
160
- tmp = val.to_s.strip
161
- tmp = nil if tmp == ''
162
- raise "invalid #{name} (#{val})" unless tmp.nil? || tmp.match(regex)
163
- tmp
157
+ def attr_string_or_nil(regex, *names)
158
+ names.each do |name|
159
+ attr_accessor(name) do |val|
160
+ tmp = val.to_s.strip
161
+ tmp = nil if tmp == ''
162
+ raise "invalid #{name} (#{val})" unless tmp.nil? || tmp.match(regex)
163
+ tmp
164
+ end
164
165
  end
165
166
  end
166
167
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ICU
4
4
  class Tournament
5
- VERSION = "1.7.3"
5
+ VERSION = "1.8.0"
6
6
  end
7
7
  end
data/spec/util_spec.rb CHANGED
@@ -2,430 +2,434 @@
2
2
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3
3
 
4
4
  module ICU
5
- describe Util do
6
- context "#parsedate" do
7
- it "should parse standard dates" do
8
- Util.parsedate('2001-01-01').should == '2001-01-01'
9
- Util.parsedate('1955-11-09').should == '1955-11-09'
10
- end
11
-
12
- it "should handle US format" do
13
- Util.parsedate('03/30/2009').should == '2009-03-30'
14
- end
15
-
16
- it "should handle European format" do
17
- Util.parsedate('30/03/2009').should == '2009-03-30'
18
- end
19
-
20
- it "should prefer European format" do
21
- Util.parsedate('02/03/2009').should == '2009-03-02'
22
- end
23
-
24
- it "should handle US style when there's no alternative" do
25
- Util.parsedate('02/23/2009').should == '2009-02-23'
26
- end
27
-
28
- it "should handle single digits" do
29
- Util.parsedate('9/8/2006').should == '2006-08-09'
30
- end
31
-
32
- it "should handle names of monthsx" do
33
- Util.parsedate('9th Nov 1955').should == '1955-11-09'
34
- Util.parsedate('16th June 1986').should == '1986-06-16'
5
+ module Util
6
+ describe Date do
7
+ context "#parse" do
8
+ it "should parse standard dates" do
9
+ Date.parse('2001-01-01').should == '2001-01-01'
10
+ Date.parse('1955-11-09').should == '1955-11-09'
11
+ end
12
+
13
+ it "should handle US format" do
14
+ Date.parse('03/30/2009').should == '2009-03-30'
15
+ end
16
+
17
+ it "should handle European format" do
18
+ Date.parse('30/03/2009').should == '2009-03-30'
19
+ end
20
+
21
+ it "should prefer European format" do
22
+ Date.parse('02/03/2009').should == '2009-03-02'
23
+ end
24
+
25
+ it "should handle US style when there's no alternative" do
26
+ Date.parse('02/23/2009').should == '2009-02-23'
27
+ end
28
+
29
+ it "should handle single digits" do
30
+ Date.parse('9/8/2006').should == '2006-08-09'
31
+ end
32
+
33
+ it "should handle names of monthsx" do
34
+ Date.parse('9th Nov 1955').should == '1955-11-09'
35
+ Date.parse('16th June 1986').should == '1986-06-16'
36
+ end
35
37
  end
36
38
  end
39
+
40
+ describe File do
41
+ context "#read_utf8" do
42
+ before(:all) do
43
+ @s = ::File.dirname(__FILE__) + '/samples/file'
44
+ end
37
45
 
38
- context "#read_utf8" do
39
- before(:all) do
40
- @s = File.dirname(__FILE__) + '/samples/file'
41
- end
42
-
43
- it "should read ASCII" do
44
- Util.read_utf8("#{@s}/ascii.txt").should == "Resume\nResume\n"
45
- end
46
+ it "should read ASCII" do
47
+ File.read_utf8("#{@s}/ascii.txt").should == "Resume\nResume\n"
48
+ end
46
49
 
47
- it "should read Latin-1" do
48
- Util.read_utf8("#{@s}/latin1.txt").should == "Résumé\nRésumé\n"
49
- end
50
+ it "should read Latin-1" do
51
+ File.read_utf8("#{@s}/latin1.txt").should == "Résumé\nRésumé\n"
52
+ end
50
53
 
51
- it "should read Windows CP1252" do
52
- Util.read_utf8("#{@s}/cp1252.txt").should == "€3\n£7\n¥1\n"
53
- end
54
+ it "should read Windows CP1252" do
55
+ File.read_utf8("#{@s}/cp1252.txt").should == "€3\n£7\n¥1\n"
56
+ end
54
57
 
55
- it "should read UTF-8" do
56
- Util.read_utf8("#{@s}/utf8.txt").should == "ヒラガナ\nヒラガナ\n"
57
- end
58
+ it "should read UTF-8" do
59
+ File.read_utf8("#{@s}/utf8.txt").should == "ヒラガナ\nヒラガナ\n"
60
+ end
58
61
 
59
- it "should thow an exception for a non-existant file" do
60
- lambda { Util.read_utf8("#{@s}/no_such_file.txt") }.should raise_error
62
+ it "should thow an exception for a non-existant file" do
63
+ lambda { File.read_utf8("#{@s}/no_such_file.txt") }.should raise_error
64
+ end
61
65
  end
62
- end
63
66
 
64
- context "#load_ini" do
65
- before(:all) do
66
- @s = File.dirname(__FILE__) + '/samples/ini'
67
- end
67
+ context "#load_ini" do
68
+ before(:all) do
69
+ @s = ::File.dirname(__FILE__) + '/samples/ini'
70
+ end
68
71
 
69
- it "should read ASCII" do
70
- data = Util.load_ini("#{@s}/ascii.ini")
71
- data.should be_an_instance_of(Hash)
72
- data["Pairing"]["UseRating"].should == "0"
73
- data["NoKeys"] == nil
74
- data["Tournament Info"]["Arbiter"].should == "Herbert Scarry"
75
- data["Tournament Info"]["DrawSymbol"].should == "D"
76
- end
72
+ it "should read ASCII" do
73
+ data = File.load_ini("#{@s}/ascii.ini")
74
+ data.should be_an_instance_of(Hash)
75
+ data["Pairing"]["UseRating"].should == "0"
76
+ data["NoKeys"] == nil
77
+ data["Tournament Info"]["Arbiter"].should == "Herbert Scarry"
78
+ data["Tournament Info"]["DrawSymbol"].should == "D"
79
+ end
77
80
 
78
- it "should read Latin1" do
79
- data = Util.load_ini("#{@s}/latin1.ini")
80
- data.should be_an_instance_of(Hash)
81
- data["Tournament Info"]["Arbiter"].should == "Gearóidín"
82
- data["Tournament Info"]["DrawSymbol"].should == "½"
83
- end
81
+ it "should read Latin1" do
82
+ data = File.load_ini("#{@s}/latin1.ini")
83
+ data.should be_an_instance_of(Hash)
84
+ data["Tournament Info"]["Arbiter"].should == "Gearóidín"
85
+ data["Tournament Info"]["DrawSymbol"].should == "½"
86
+ end
84
87
 
85
- it "should read Windows-1252" do
86
- data = Util.load_ini("#{@s}/cp1252.ini")
87
- data.should be_an_instance_of(Hash)
88
- data["Tournament Info"]["Entry Fee"].should == "€50"
89
- end
88
+ it "should read Windows-1252" do
89
+ data = File.load_ini("#{@s}/cp1252.ini")
90
+ data.should be_an_instance_of(Hash)
91
+ data["Tournament Info"]["Entry Fee"].should == "€50"
92
+ end
90
93
 
91
- it "should read UTF8" do
92
- data = Util.load_ini("#{@s}/utf8.ini")
93
- data.should be_an_instance_of(Hash)
94
- data["Tournament Info"]["Entry Fee"].should == "€50"
95
- data["Tournament Info"]["Arbiter"].should == "ヒラガナ"
96
- data["Tournament Info"]["DrawSymbol"].should == "½"
97
- end
94
+ it "should read UTF8" do
95
+ data = File.load_ini("#{@s}/utf8.ini")
96
+ data.should be_an_instance_of(Hash)
97
+ data["Tournament Info"]["Entry Fee"].should == "€50"
98
+ data["Tournament Info"]["Arbiter"].should == "ヒラガナ"
99
+ data["Tournament Info"]["DrawSymbol"].should == "½"
100
+ end
98
101
 
99
- it "should handle untidily formatted files" do
100
- data = Util.load_ini("#{@s}/untidy.ini")
101
- data.should be_an_instance_of(Hash)
102
- data["Tournament Info"]["Entry Fee"].should == "€50"
103
- data["Tournament Info"]["DrawSymbol"].should == "½"
104
- data["Pairing"]["Use Rating"].should == "0"
105
- end
102
+ it "should handle untidily formatted files" do
103
+ data = File.load_ini("#{@s}/untidy.ini")
104
+ data.should be_an_instance_of(Hash)
105
+ data["Tournament Info"]["Entry Fee"].should == "€50"
106
+ data["Tournament Info"]["DrawSymbol"].should == "½"
107
+ data["Pairing"]["Use Rating"].should == "0"
108
+ end
106
109
 
107
- it "should thow an exception for a non-existant file" do
108
- lambda { Util.read_utf8("#{@s}/no_such_file.ini") }.should raise_error
110
+ it "should thow an exception for a non-existant file" do
111
+ lambda { File.read_utf8("#{@s}/no_such_file.ini") }.should raise_error
112
+ end
109
113
  end
110
114
  end
111
- end
112
115
 
113
- describe Accessor do
114
- context "#attr_accessor" do
115
- before(:each) do
116
- @class = Class.new
117
- @class.extend ICU::Accessor
118
- @obj = @class.new
119
- end
116
+ describe Accessor do
117
+ context "#attr_accessor" do
118
+ before(:each) do
119
+ @class = Class.new
120
+ @class.extend ICU::Util::Accessor
121
+ @obj = @class.new
122
+ end
120
123
 
121
- it "should not have an accessor unless declared" do
122
- @obj.respond_to?(:myatr).should be_false
123
- @obj.respond_to?(:myatr=).should be_false
124
- end
124
+ it "should not have an accessor unless declared" do
125
+ @obj.respond_to?(:myatr).should be_false
126
+ @obj.respond_to?(:myatr=).should be_false
127
+ end
125
128
 
126
- it "should have a getter but no setter with the default declaration" do
127
- @class.attr_accessor('myatr')
128
- @obj.respond_to?(:myatr).should be_true
129
- @obj.respond_to?(:myatr=).should be_false
130
- @obj.instance_eval { @myatr = 42 }
131
- @obj.myatr.should == 42
132
- end
129
+ it "should have a getter but no setter with the default declaration" do
130
+ @class.attr_accessor('myatr')
131
+ @obj.respond_to?(:myatr).should be_true
132
+ @obj.respond_to?(:myatr=).should be_false
133
+ @obj.instance_eval { @myatr = 42 }
134
+ @obj.myatr.should == 42
135
+ end
133
136
 
134
- it "should be able to create do-it-yourself setters such as for a positive integer" do
135
- @class.attr_accessor('myatr') do |val|
136
- tmp = val.to_i
137
- raise "invalid positive integer (#{val})" unless tmp > 0
138
- tmp
139
- end
140
- @obj.respond_to?(:myatr).should be_true
141
- @obj.respond_to?(:myatr=).should be_true
142
- lambda { @obj.myatr = "no number here" }.should raise_error(/invalid positive integer \(no number here\)/)
143
- lambda { @obj.myatr = -1 }.should raise_error
144
- lambda { @obj.myatr = 0 }.should raise_error
145
- lambda { @obj.myatr = 1 }.should_not raise_error
146
- @obj.myatr.should == 1
147
- lambda { @obj.myatr = '42' }.should_not raise_error
148
- @obj.myatr.should == 42
149
- lambda { @obj.myatr = ' 0371 ' }.should_not raise_error
150
- @obj.myatr.should == 371
137
+ it "should be able to create do-it-yourself setters such as for a positive integer" do
138
+ @class.attr_accessor('myatr') do |val|
139
+ tmp = val.to_i
140
+ raise "invalid positive integer (#{val})" unless tmp > 0
141
+ tmp
142
+ end
143
+ @obj.respond_to?(:myatr).should be_true
144
+ @obj.respond_to?(:myatr=).should be_true
145
+ lambda { @obj.myatr = "no number here" }.should raise_error(/invalid positive integer \(no number here\)/)
146
+ lambda { @obj.myatr = -1 }.should raise_error
147
+ lambda { @obj.myatr = 0 }.should raise_error
148
+ lambda { @obj.myatr = 1 }.should_not raise_error
149
+ @obj.myatr.should == 1
150
+ lambda { @obj.myatr = '42' }.should_not raise_error
151
+ @obj.myatr.should == 42
152
+ lambda { @obj.myatr = ' 0371 ' }.should_not raise_error
153
+ @obj.myatr.should == 371
154
+ end
151
155
  end
152
- end
153
156
 
154
- context "#attr_integer" do
155
- before(:each) do
156
- @class = Class.new
157
- @class.extend ICU::Accessor
158
- @class.attr_integer :myint
159
- @obj = @class.new
160
- end
157
+ context "#attr_integer" do
158
+ before(:each) do
159
+ @class = Class.new
160
+ @class.extend ICU::Util::Accessor
161
+ @class.attr_integer :myint
162
+ @obj = @class.new
163
+ end
161
164
 
162
- it "should have a getter and setter" do
163
- @obj.respond_to?(:myint).should be_true
164
- @obj.respond_to?(:myint=).should be_true
165
- end
165
+ it "should have a getter and setter" do
166
+ @obj.respond_to?(:myint).should be_true
167
+ @obj.respond_to?(:myint=).should be_true
168
+ end
166
169
 
167
- it "should work with ints" do
168
- @obj.myint = -43
169
- @obj.myint.should == -43
170
- end
170
+ it "should work with ints" do
171
+ @obj.myint = -43
172
+ @obj.myint.should == -43
173
+ end
171
174
 
172
- it "should work with strings" do
173
- @obj.myint = " -99 "
174
- @obj.myint.should == -99
175
- end
175
+ it "should work with strings" do
176
+ @obj.myint = " -99 "
177
+ @obj.myint.should == -99
178
+ end
176
179
 
177
- it "should handle zero" do
178
- lambda { @obj.myint = 0 }.should_not raise_error
179
- lambda { @obj.myint = '0' }.should_not raise_error
180
- end
180
+ it "should handle zero" do
181
+ lambda { @obj.myint = 0 }.should_not raise_error
182
+ lambda { @obj.myint = '0' }.should_not raise_error
183
+ end
181
184
 
182
- it "should reject nil and other non-numbers" do
183
- lambda { @obj.myint = nil }.should raise_error(/invalid/)
184
- lambda { @obj.myint = "N" }.should raise_error(/invalid/)
185
- lambda { @obj.myint = " " }.should raise_error(/invalid/)
186
- lambda { @obj.myint = '' }.should raise_error(/invalid/)
187
- end
185
+ it "should reject nil and other non-numbers" do
186
+ lambda { @obj.myint = nil }.should raise_error(/invalid/)
187
+ lambda { @obj.myint = "N" }.should raise_error(/invalid/)
188
+ lambda { @obj.myint = " " }.should raise_error(/invalid/)
189
+ lambda { @obj.myint = '' }.should raise_error(/invalid/)
190
+ end
188
191
 
189
- it "should handle multiple names" do
190
- @class.attr_integer :yourint, :hisint
191
- @obj.respond_to?(:yourint).should be_true
192
- @obj.respond_to?(:hisint=).should be_true
192
+ it "should handle multiple names" do
193
+ @class.attr_integer :yourint, :hisint
194
+ @obj.respond_to?(:yourint).should be_true
195
+ @obj.respond_to?(:hisint=).should be_true
196
+ end
193
197
  end
194
- end
195
198
 
196
- context "#attr_integer_or_nil" do
197
- before(:each) do
198
- @class = Class.new
199
- @class.extend ICU::Accessor
200
- @class.attr_integer_or_nil :myint
201
- @obj = @class.new
202
- end
199
+ context "#attr_integer_or_nil" do
200
+ before(:each) do
201
+ @class = Class.new
202
+ @class.extend ICU::Util::Accessor
203
+ @class.attr_integer_or_nil :myint
204
+ @obj = @class.new
205
+ end
203
206
 
204
- it "should have a getter and setter" do
205
- @obj.respond_to?(:myint).should be_true
206
- @obj.respond_to?(:myint=).should be_true
207
- end
207
+ it "should have a getter and setter" do
208
+ @obj.respond_to?(:myint).should be_true
209
+ @obj.respond_to?(:myint=).should be_true
210
+ end
208
211
 
209
- it "should work with ints and nil and spaces" do
210
- @obj.myint = 43
211
- @obj.myint.should == 43
212
- @obj.myint = nil
213
- @obj.myint.should == nil
214
- @obj.myint = ' '
215
- @obj.myint.should == nil
216
- end
212
+ it "should work with ints and nil and spaces" do
213
+ @obj.myint = 43
214
+ @obj.myint.should == 43
215
+ @obj.myint = nil
216
+ @obj.myint.should == nil
217
+ @obj.myint = ' '
218
+ @obj.myint.should == nil
219
+ end
217
220
 
218
- it "should reject non-numbers" do
219
- lambda { @obj.myint = "N" }.should raise_error(/invalid/)
220
- end
221
+ it "should reject non-numbers" do
222
+ lambda { @obj.myint = "N" }.should raise_error(/invalid/)
223
+ end
221
224
 
222
- it "should handle multiple names" do
223
- @class.attr_integer :yourint, :hisint
224
- @obj.respond_to?(:yourint).should be_true
225
- @obj.respond_to?(:hisint=).should be_true
225
+ it "should handle multiple names" do
226
+ @class.attr_integer :yourint, :hisint
227
+ @obj.respond_to?(:yourint).should be_true
228
+ @obj.respond_to?(:hisint=).should be_true
229
+ end
226
230
  end
227
- end
228
231
 
229
- context "#attr_positive" do
230
- before(:each) do
231
- @class = Class.new
232
- @class.extend ICU::Accessor
233
- @class.attr_positive :mypos
234
- @obj = @class.new
235
- end
232
+ context "#attr_positive" do
233
+ before(:each) do
234
+ @class = Class.new
235
+ @class.extend ICU::Util::Accessor
236
+ @class.attr_positive :mypos
237
+ @obj = @class.new
238
+ end
236
239
 
237
- it "should have a getter and setter" do
238
- @obj.respond_to?(:mypos).should be_true
239
- @obj.respond_to?(:mypos=).should be_true
240
- end
240
+ it "should have a getter and setter" do
241
+ @obj.respond_to?(:mypos).should be_true
242
+ @obj.respond_to?(:mypos=).should be_true
243
+ end
241
244
 
242
- it "should work as expected" do
243
- @obj.mypos = "34"
244
- @obj.mypos.should == 34
245
- end
245
+ it "should work as expected" do
246
+ @obj.mypos = "34"
247
+ @obj.mypos.should == 34
248
+ end
246
249
 
247
- it "should reject nil and other non-positive integers" do
248
- lambda { @obj.mypos = nil }.should raise_error(/invalid/)
249
- lambda { @obj.mypos = 'X' }.should raise_error(/invalid/)
250
- lambda { @obj.mypos = '0' }.should raise_error(/invalid/)
251
- lambda { @obj.mypos = -13 }.should raise_error(/invalid/)
252
- end
250
+ it "should reject nil and other non-positive integers" do
251
+ lambda { @obj.mypos = nil }.should raise_error(/invalid/)
252
+ lambda { @obj.mypos = 'X' }.should raise_error(/invalid/)
253
+ lambda { @obj.mypos = '0' }.should raise_error(/invalid/)
254
+ lambda { @obj.mypos = -13 }.should raise_error(/invalid/)
255
+ end
253
256
 
254
- it "should handle multiple names" do
255
- @class.attr_integer :ourpos, :theirpos
256
- @obj.respond_to?(:ourpos).should be_true
257
- @obj.respond_to?(:theirpos=).should be_true
257
+ it "should handle multiple names" do
258
+ @class.attr_integer :ourpos, :theirpos
259
+ @obj.respond_to?(:ourpos).should be_true
260
+ @obj.respond_to?(:theirpos=).should be_true
261
+ end
258
262
  end
259
- end
260
263
 
261
- context "#attr_positive_or_nil" do
262
- before(:each) do
263
- @class = Class.new
264
- @class.extend ICU::Accessor
265
- @class.attr_positive_or_nil :mypon
266
- @obj = @class.new
267
- end
264
+ context "#attr_positive_or_nil" do
265
+ before(:each) do
266
+ @class = Class.new
267
+ @class.extend ICU::Util::Accessor
268
+ @class.attr_positive_or_nil :mypon
269
+ @obj = @class.new
270
+ end
268
271
 
269
- it "should have a getter and setter" do
270
- @obj.respond_to?(:mypon).should be_true
271
- @obj.respond_to?(:mypon=).should be_true
272
- end
272
+ it "should have a getter and setter" do
273
+ @obj.respond_to?(:mypon).should be_true
274
+ @obj.respond_to?(:mypon=).should be_true
275
+ end
273
276
 
274
- it "should work with numbers, nil, empty strings and spaces" do
275
- @obj.mypon = " 54 "
276
- @obj.mypon.should == 54
277
- @obj.mypon = nil
278
- @obj.mypon.should be_nil
279
- @obj.mypon = ''
280
- @obj.mypon.should be_nil
281
- @obj.mypon = ' '
282
- @obj.mypon.should be_nil
283
- end
277
+ it "should work with numbers, nil, empty strings and spaces" do
278
+ @obj.mypon = " 54 "
279
+ @obj.mypon.should == 54
280
+ @obj.mypon = nil
281
+ @obj.mypon.should be_nil
282
+ @obj.mypon = ''
283
+ @obj.mypon.should be_nil
284
+ @obj.mypon = ' '
285
+ @obj.mypon.should be_nil
286
+ end
284
287
 
285
- it "should reject non-integers and non-positive integers" do
286
- lambda { @obj.mypon = 'X' }.should raise_error(/invalid/)
287
- lambda { @obj.mypon = '0' }.should raise_error(/invalid/)
288
- lambda { @obj.mypon = -13 }.should raise_error(/invalid/)
289
- end
288
+ it "should reject non-integers and non-positive integers" do
289
+ lambda { @obj.mypon = 'X' }.should raise_error(/invalid/)
290
+ lambda { @obj.mypon = '0' }.should raise_error(/invalid/)
291
+ lambda { @obj.mypon = -13 }.should raise_error(/invalid/)
292
+ end
290
293
 
291
- it "should handle multiple names" do
292
- @class.attr_integer :ourpon, :theirpon
293
- @obj.respond_to?(:ourpon).should be_true
294
- @obj.respond_to?(:theirpon=).should be_true
294
+ it "should handle multiple names" do
295
+ @class.attr_integer :ourpon, :theirpon
296
+ @obj.respond_to?(:ourpon).should be_true
297
+ @obj.respond_to?(:theirpon=).should be_true
298
+ end
295
299
  end
296
- end
297
300
 
298
- context "#attr_date" do
299
- before(:each) do
300
- @class = Class.new
301
- @class.extend ICU::Accessor
302
- @class.attr_date :mydate
303
- @obj = @class.new
304
- end
301
+ context "#attr_date" do
302
+ before(:each) do
303
+ @class = Class.new
304
+ @class.extend ICU::Util::Accessor
305
+ @class.attr_date :mydate
306
+ @obj = @class.new
307
+ end
305
308
 
306
- it "should have a getter and setter" do
307
- @obj.respond_to?(:mydate).should be_true
308
- @obj.respond_to?(:mydate=).should be_true
309
- end
309
+ it "should have a getter and setter" do
310
+ @obj.respond_to?(:mydate).should be_true
311
+ @obj.respond_to?(:mydate=).should be_true
312
+ end
310
313
 
311
- it "should work as expected" do
312
- @obj.mydate = "2009/11/09"
313
- @obj.mydate.should == '2009-11-09'
314
- end
314
+ it "should work as expected" do
315
+ @obj.mydate = "2009/11/09"
316
+ @obj.mydate.should == '2009-11-09'
317
+ end
315
318
 
316
- it "should reject nil and other non-dates" do
317
- lambda { @obj.mydate = nil }.should raise_error(/invalid/)
318
- lambda { @obj.mydate = 'blah de blah' }.should raise_error(/invalid/)
319
- lambda { @obj.mydate = ' ' }.should raise_error(/invalid/)
320
- lambda { @obj.mydate = 0 }.should raise_error(/invalid/)
321
- end
319
+ it "should reject nil and other non-dates" do
320
+ lambda { @obj.mydate = nil }.should raise_error(/invalid/)
321
+ lambda { @obj.mydate = 'blah de blah' }.should raise_error(/invalid/)
322
+ lambda { @obj.mydate = ' ' }.should raise_error(/invalid/)
323
+ lambda { @obj.mydate = 0 }.should raise_error(/invalid/)
324
+ end
322
325
 
323
- it "should handle multiple names" do
324
- @class.attr_date :ourdate, :theirdate
325
- @obj.respond_to?(:ourdate).should be_true
326
- @obj.respond_to?(:theirdate=).should be_true
326
+ it "should handle multiple names" do
327
+ @class.attr_date :ourdate, :theirdate
328
+ @obj.respond_to?(:ourdate).should be_true
329
+ @obj.respond_to?(:theirdate=).should be_true
330
+ end
327
331
  end
328
- end
329
332
 
330
- context "#attr_date_or_nil" do
331
- before(:each) do
332
- @class = Class.new
333
- @class.extend ICU::Accessor
334
- @class.attr_date_or_nil :mydate
335
- @obj = @class.new
336
- end
333
+ context "#attr_date_or_nil" do
334
+ before(:each) do
335
+ @class = Class.new
336
+ @class.extend ICU::Util::Accessor
337
+ @class.attr_date_or_nil :mydate
338
+ @obj = @class.new
339
+ end
337
340
 
338
- it "should have a getter and setter" do
339
- @obj.respond_to?(:mydate).should be_true
340
- @obj.respond_to?(:mydate=).should be_true
341
- end
341
+ it "should have a getter and setter" do
342
+ @obj.respond_to?(:mydate).should be_true
343
+ @obj.respond_to?(:mydate=).should be_true
344
+ end
342
345
 
343
- it "should work as expected, including with nil" do
344
- @obj.mydate = "2009/11/09"
345
- @obj.mydate.should == '2009-11-09'
346
- @obj.mydate = nil
347
- @obj.mydate.should be_nil
348
- end
346
+ it "should work as expected, including with nil" do
347
+ @obj.mydate = "2009/11/09"
348
+ @obj.mydate.should == '2009-11-09'
349
+ @obj.mydate = nil
350
+ @obj.mydate.should be_nil
351
+ end
349
352
 
350
- it "should reject non-dates" do
351
- lambda { @obj.mydate = 'blah de blah' }.should raise_error(/invalid/)
352
- lambda { @obj.mydate = 0 }.should raise_error(/invalid/)
353
- end
353
+ it "should reject non-dates" do
354
+ lambda { @obj.mydate = 'blah de blah' }.should raise_error(/invalid/)
355
+ lambda { @obj.mydate = 0 }.should raise_error(/invalid/)
356
+ end
354
357
 
355
- it "should handle multiple names" do
356
- @class.attr_date :ourdate, :theirdate
357
- @obj.respond_to?(:ourdate).should be_true
358
- @obj.respond_to?(:theirdate=).should be_true
358
+ it "should handle multiple names" do
359
+ @class.attr_date :ourdate, :theirdate
360
+ @obj.respond_to?(:ourdate).should be_true
361
+ @obj.respond_to?(:theirdate=).should be_true
362
+ end
359
363
  end
360
- end
361
364
 
362
- context "#attr_string" do
363
- before(:each) do
364
- @class = Class.new
365
- @class.extend ICU::Accessor
366
- @class.attr_string %r%[a-z]+%i, :mystring
367
- @obj = @class.new
368
- end
365
+ context "#attr_string" do
366
+ before(:each) do
367
+ @class = Class.new
368
+ @class.extend ICU::Util::Accessor
369
+ @class.attr_string %r%[a-z]+%i, :mystring
370
+ @obj = @class.new
371
+ end
369
372
 
370
- it "should have a getter and setter" do
371
- @obj.respond_to?(:mystring).should be_true
372
- @obj.respond_to?(:mystring=).should be_true
373
- end
373
+ it "should have a getter and setter" do
374
+ @obj.respond_to?(:mystring).should be_true
375
+ @obj.respond_to?(:mystring=).should be_true
376
+ end
374
377
 
375
- it "should work as expected" do
376
- @obj.mystring = " mark "
377
- @obj.mystring.should == 'mark'
378
- end
378
+ it "should work as expected" do
379
+ @obj.mystring = " mark "
380
+ @obj.mystring.should == 'mark'
381
+ end
379
382
 
380
- it "should reject values that don't match" do
381
- lambda { @obj.mystring = nil }.should raise_error(/invalid/)
382
- lambda { @obj.mystring = ' 123 ' }.should raise_error(/invalid/)
383
- lambda { @obj.mystring = ' ' }.should raise_error(/invalid/)
384
- lambda { @obj.mystring = 0 }.should raise_error(/invalid/)
385
- lambda { @obj.mystring = ' a ' }.should_not raise_error
386
- lambda { @obj.mystring = 'ZYX' }.should_not raise_error
387
- end
383
+ it "should reject values that don't match" do
384
+ lambda { @obj.mystring = nil }.should raise_error(/invalid/)
385
+ lambda { @obj.mystring = ' 123 ' }.should raise_error(/invalid/)
386
+ lambda { @obj.mystring = ' ' }.should raise_error(/invalid/)
387
+ lambda { @obj.mystring = 0 }.should raise_error(/invalid/)
388
+ lambda { @obj.mystring = ' a ' }.should_not raise_error
389
+ lambda { @obj.mystring = 'ZYX' }.should_not raise_error
390
+ end
388
391
 
389
- it "should handle multiple names" do
390
- @class.attr_string %r%^[A-Z]{3}$%, :ourstring, :theirstring
391
- @obj.respond_to?(:ourstring=).should be_true
392
- @obj.respond_to?(:theirstring).should be_true
392
+ it "should handle multiple names" do
393
+ @class.attr_string %r%^[A-Z]{3}$%, :ourstring, :theirstring
394
+ @obj.respond_to?(:ourstring=).should be_true
395
+ @obj.respond_to?(:theirstring).should be_true
396
+ end
393
397
  end
394
- end
395
398
 
396
- context "#attr_string_or_nil" do
397
- before(:each) do
398
- @class = Class.new
399
- @class.extend ICU::Accessor
400
- @class.attr_string_or_nil %r%^[1-9]\d*$%i, :mystring
401
- @obj = @class.new
402
- end
399
+ context "#attr_string_or_nil" do
400
+ before(:each) do
401
+ @class = Class.new
402
+ @class.extend ICU::Util::Accessor
403
+ @class.attr_string_or_nil %r%^[1-9]\d*$%i, :mystring
404
+ @obj = @class.new
405
+ end
403
406
 
404
- it "should have a getter and setter" do
405
- @obj.respond_to?(:mystring).should be_true
406
- @obj.respond_to?(:mystring=).should be_true
407
- end
407
+ it "should have a getter and setter" do
408
+ @obj.respond_to?(:mystring).should be_true
409
+ @obj.respond_to?(:mystring=).should be_true
410
+ end
408
411
 
409
- it "should work as expected" do
410
- @obj.mystring = " 12345 "
411
- @obj.mystring.should == '12345'
412
- @obj.mystring = nil
413
- @obj.mystring.should be_nil
414
- @obj.mystring = ' '
415
- @obj.mystring.should be_nil
416
- end
412
+ it "should work as expected" do
413
+ @obj.mystring = " 12345 "
414
+ @obj.mystring.should == '12345'
415
+ @obj.mystring = nil
416
+ @obj.mystring.should be_nil
417
+ @obj.mystring = ' '
418
+ @obj.mystring.should be_nil
419
+ end
417
420
 
418
- it "should reject values that don't match" do
419
- lambda { @obj.mystring = ' 0 ' }.should raise_error(/invalid/)
420
- lambda { @obj.mystring = 0 }.should raise_error(/invalid/)
421
- lambda { @obj.mystring = -1 }.should raise_error(/invalid/)
422
- lambda { @obj.mystring = 98 }.should_not raise_error
423
- end
421
+ it "should reject values that don't match" do
422
+ lambda { @obj.mystring = ' 0 ' }.should raise_error(/invalid/)
423
+ lambda { @obj.mystring = 0 }.should raise_error(/invalid/)
424
+ lambda { @obj.mystring = -1 }.should raise_error(/invalid/)
425
+ lambda { @obj.mystring = 98 }.should_not raise_error
426
+ end
424
427
 
425
- it "should handle multiple names" do
426
- @class.attr_string %r%^[A-Z][a-z]+%, :ourstring, :theirstring
427
- @obj.respond_to?(:ourstring=).should be_true
428
- @obj.respond_to?(:theirstring).should be_true
428
+ it "should handle multiple names" do
429
+ @class.attr_string %r%^[A-Z][a-z]+%, :ourstring, :theirstring
430
+ @obj.respond_to?(:ourstring=).should be_true
431
+ @obj.respond_to?(:theirstring).should be_true
432
+ end
429
433
  end
430
434
  end
431
435
  end
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.7.3
4
+ version: 1.8.0
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: 2013-09-20 00:00:00.000000000 Z
12
+ date: 2013-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dbf
@@ -174,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
174
  version: '0'
175
175
  segments:
176
176
  - 0
177
- hash: 4531625935937498551
177
+ hash: 906985998380119772
178
178
  required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  none: false
180
180
  requirements:
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  segments:
185
185
  - 0
186
- hash: 4531625935937498551
186
+ hash: 906985998380119772
187
187
  requirements: []
188
188
  rubyforge_project: icu_tournament
189
189
  rubygems_version: 1.8.23