icu_tournament 1.5.12 → 1.5.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,9 @@ module ICU
26
26
  def self.read_utf8(name)
27
27
  File.open(name, "r:ASCII-8BIT") do |f|
28
28
  data = f.read
29
- to_utf8(data)
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
30
32
  end
31
33
  end
32
34
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ICU
4
4
  class Tournament
5
- VERSION = "1.5.12"
5
+ VERSION = "1.5.13"
6
6
  end
7
7
  end
@@ -806,6 +806,11 @@ KRAUSE
806
806
  file = "#{@s}/irish_junior_champs_2011.tab"
807
807
  lambda { @p.parse_file!(file) }.should_not raise_error
808
808
  end
809
+
810
+ it "should handle a file with a BOM" do
811
+ file = "#{@s}/armstrong_2012_with_bom.tab"
812
+ lambda { @p.parse_file!(file) }.should_not raise_error
813
+ end
809
814
  end
810
815
  end
811
816
  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.5.12
4
+ version: 1.5.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-25 00:00:00.000000000Z
12
+ date: 2012-05-02 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dbf
16
- requirement: &70299843457940 !ruby/object:Gem::Requirement
16
+ requirement: &70135277126160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70299843457940
24
+ version_requirements: *70135277126160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rubyzip
27
- requirement: &70299843457240 !ruby/object:Gem::Requirement
27
+ requirement: &70135277125480 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70299843457240
35
+ version_requirements: *70135277125480
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: icu_name
38
- requirement: &70299843456580 !ruby/object:Gem::Requirement
38
+ requirement: &70135277124700 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70299843456580
46
+ version_requirements: *70135277124700
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70299843455920 !ruby/object:Gem::Requirement
49
+ requirement: &70135277123960 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70299843455920
57
+ version_requirements: *70135277123960
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rake
60
- requirement: &70299843455260 !ruby/object:Gem::Requirement
60
+ requirement: &70135277112660 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70299843455260
68
+ version_requirements: *70135277112660
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
- requirement: &70299843454480 !ruby/object:Gem::Requirement
71
+ requirement: &70135277111900 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70299843454480
79
+ version_requirements: *70135277111900
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rdoc
82
- requirement: &70299843453860 !ruby/object:Gem::Requirement
82
+ requirement: &70135277111340 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70299843453860
90
+ version_requirements: *70135277111340
91
91
  description: Convert files of chess tournament data in different formats to ruby classes
92
92
  and vice-versa.
93
93
  email: mark.j.l.orr@googlemail.com
@@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  segments:
140
140
  - 0
141
- hash: 4579537518805362550
141
+ hash: -1249342061197821456
142
142
  required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  none: false
144
144
  requirements:
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  segments:
149
149
  - 0
150
- hash: 4579537518805362550
150
+ hash: -1249342061197821456
151
151
  requirements: []
152
152
  rubyforge_project: icu_tournament
153
153
  rubygems_version: 1.8.10