icu_utils 1.3.0 → 1.3.2

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
2
  SHA1:
3
- metadata.gz: 7668755e991290df6af596e6c05408034d58c3be
4
- data.tar.gz: b31cd5a91b2496e222d6bedc0c19d839ef4d74df
3
+ metadata.gz: 2798f78435a0212f7b2e30e21163c8051ab2de90
4
+ data.tar.gz: a373db7005f2648eeaec752735a0d8e649c55e6c
5
5
  SHA512:
6
- metadata.gz: b0f83fbfb64fa0d4bae742a46958f93ff91036ac08186808caedea907cc2192da25bad7ef76f2a5660d61bf50368820e25c9cc875ec0abb68435cc75d6fe1401
7
- data.tar.gz: 51fa35e87b289129c8204834e147ebeaabb6345f8521d1c643a003fb8015da369b3c8ca44293d210ffab280eb5f1bcf33f38d0caf404740b01e2f8559ce125db
6
+ metadata.gz: 50cdbc6b7f8a6e25bd61c715cb3b5e37bbcc6c2ae9eb226c2e51406c9b691025281de7591fb94f8519f3e0a7a4d49442996045e8c31c434a0fe1a660ef47f5c6
7
+ data.tar.gz: a15e7ea6761576ef8e62ce17198b1842397159fc99a14d25e44d1c811f231e59c28caf8a96b43ae7aac03ff61bac1f017c3650bc4ac09db956098f9ffa05250f
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2.6
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- icu_utils (1.3.0)
4
+ icu_utils (1.3.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -32,3 +32,6 @@ DEPENDENCIES
32
32
  rake (~> 10.4)
33
33
  rdoc (~> 4.2)
34
34
  rspec (~> 3.2)
35
+
36
+ BUNDLED WITH
37
+ 1.14.6
data/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ # New Home
2
+
3
+ This repository was forked in late 2015 and is now maintained at
4
+ https://github.com/ninkibah/icu_utils.
5
+
1
6
  # IcuUtils
2
7
 
3
8
  A place for utilities shared across the various ICU apps and gems.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ version = ICU::Utils::VERSION
9
9
  desc "Build a new gem for version #{version}"
10
10
  task :build do
11
11
  system "gem build icu_utils.gemspec"
12
- system "mv {,pkg/}icu_utils-#{version}.gem"
12
+ system "mv icu_utils-#{version}.gem pkg"
13
13
  end
14
14
 
15
15
  desc "Release gem version #{version} to rubygems.org"
@@ -173,15 +173,19 @@ module ICU
173
173
  ['IVB', 'British Virgin Islands'],
174
174
  ['BRU', 'Brunei Darussalam'],
175
175
  ['BUL', 'Bulgaria'],
176
+ ['BUR', 'Burkina Faso'],
176
177
  ['BDI', 'Burundi'],
177
178
  ['CAM', 'Cambodia'],
178
179
  ['CMR', 'Cameroon'],
179
180
  ['CAN', 'Canada'],
181
+ ['CPV', 'Cape Verde'],
182
+ ['CAR', 'Central African Republic'],
180
183
  ['CHA', 'Chad'],
181
184
  ['CHI', 'Chile'],
182
185
  ['CHN', 'China'],
183
186
  ['TPE', 'Chinese Taipei'],
184
187
  ['COL', 'Colombia'],
188
+ ['COM', 'Comoros Islands'],
185
189
  ['CRC', 'Costa Rica'],
186
190
  ['CRO', 'Croatia'],
187
191
  ['CUB', 'Cuba'],
@@ -195,6 +199,7 @@ module ICU
195
199
  ['EGY', 'Egypt'],
196
200
  ['ESA', 'El Salvador'],
197
201
  ['ENG', 'England'],
202
+ ['ERI', 'Eritrea'],
198
203
  ['EST', 'Estonia'],
199
204
  ['ETH', 'Ethiopia'],
200
205
  ['FAI', 'Faroe Islands'],
@@ -230,12 +235,14 @@ module ICU
230
235
  ['JOR', 'Jordan'],
231
236
  ['KAZ', 'Kazakhstan'],
232
237
  ['KEN', 'Kenya'],
238
+ ['KOS', 'Kosovo'],
233
239
  ['KUW', 'Kuwait'],
234
240
  ['KGZ', 'Kyrgyzstan'],
235
241
  ['LAO', 'Laos'],
236
242
  ['LAT', 'Latvia'],
237
243
  ['LIB', 'Lebanon'],
238
244
  ['LES', 'Lesotho'],
245
+ ['LBR', 'Liberia'],
239
246
  ['LBA', 'Libya'],
240
247
  ['LIE', 'Liechtenstein'],
241
248
  ['LTU', 'Lithuania'],
@@ -259,6 +266,7 @@ module ICU
259
266
  ['MOZ', 'Mozambique'],
260
267
  ['MYA', 'Myanmar'],
261
268
  ['NAM', 'Namibia'],
269
+ ['NRU', 'Nauru'],
262
270
  ['NEP', 'Nepal'],
263
271
  ['NED', 'Netherlands'],
264
272
  ['AHO', 'Netherlands Antilles'],
@@ -266,6 +274,7 @@ module ICU
266
274
  ['NCA', 'Nicaragua'],
267
275
  ['NGR', 'Nigeria'],
268
276
  ['NOR', 'Norway'],
277
+ ['OMA', 'Oman'],
269
278
  ['PAK', 'Pakistan'],
270
279
  ['PLW', 'Palau'],
271
280
  ['PLE', 'Palestine'],
@@ -296,6 +305,7 @@ module ICU
296
305
  ['SOM', 'Somalia'],
297
306
  ['RSA', 'South Africa'],
298
307
  ['KOR', 'South Korea'],
308
+ ['SSD', 'South Sudan'],
299
309
  ['ESP', 'Spain'],
300
310
  ['SRI', 'Sri Lanka'],
301
311
  ['SUD', 'Sudan'],
@@ -307,6 +317,7 @@ module ICU
307
317
  ['TJK', 'Tajikistan'],
308
318
  ['TAN', 'Tanzania'],
309
319
  ['THA', 'Thailand'],
320
+ ['TLS', 'Timor-Leste'],
310
321
  ['TOG', 'Togo'],
311
322
  ['TRI', 'Trinidad and Tobago'],
312
323
  ['TUN', 'Tunisia'],
@@ -325,6 +336,8 @@ module ICU
325
336
  ['YEM', 'Yemen'],
326
337
  ['ZAM', 'Zambia'],
327
338
  ['ZIM', 'Zimbabwe'],
339
+
340
+ ['FID', 'Unregistered'], # Used by FIDE to mark unregistered players
328
341
  ]
329
342
  end
330
343
  end
@@ -1,5 +1,5 @@
1
1
  module ICU
2
2
  class Utils
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+ require 'date'
2
3
 
3
4
  module ICU
4
5
  describe Date do
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  module ICU
4
4
  describe Federation do
5
- let(:total) { 181 }
5
+ let(:total) { 193 } # This number has to be updated to be the number of elements in Federation.@@data
6
6
 
7
7
  context "#find using codes" do
8
8
  it "should find a federation given a valid code" do
@@ -136,7 +136,7 @@ module ICU
136
136
  expect(codes.index('IRQ,IRL,ISR')).not_to be_nil
137
137
  end
138
138
 
139
- it "should be configuarble to order the list by codes" do
139
+ it "should be configurable to order the list by codes" do
140
140
  menu = Federation.menu(:order => "code")
141
141
  expect(menu.size).to eq(total)
142
142
  names = menu.map{|m| m.first}.join(',')
@@ -147,7 +147,7 @@ module ICU
147
147
  expect(codes.index('IRL,IRQ,ISL')).not_to be_nil
148
148
  end
149
149
 
150
- it "should be configuarble to have a selected country at the top" do
150
+ it "should be configurable to have a selected country at the top" do
151
151
  menu = Federation.menu(:top => 'IRL')
152
152
  expect(menu.size).to eq(total)
153
153
  names = menu.map{|m| m.first}.join(',')
@@ -158,7 +158,7 @@ module ICU
158
158
  expect(codes.index('IRQ,ISR')).not_to be_nil
159
159
  end
160
160
 
161
- it "should be configuarble to have 'None' entry at the top" do
161
+ it "should be configurable to have 'None' entry at the top" do
162
162
  menu = Federation.menu(:none => 'None')
163
163
  expect(menu.size).to eq(total + 1)
164
164
  names = menu.map{|m| m.first}.join(',')
@@ -167,7 +167,7 @@ module ICU
167
167
  expect(codes.index(',AFG')).to eq(0)
168
168
  end
169
169
 
170
- it "should be able to handle multiple configuarations" do
170
+ it "should be able to handle multiple configurations" do
171
171
  menu = Federation.menu(:top => 'IRL', :order => 'code', :none => 'None')
172
172
  expect(menu.size).to eq(total + 1)
173
173
  names = menu.map{|m| m.first}.join(',')
@@ -189,252 +189,5 @@ module ICU
189
189
  end
190
190
  end
191
191
 
192
- context "IOC codes" do
193
- before(:all) do
194
- ioc_and_fide = # from http://en.wikipedia.org/wiki/List_of_IOC_country_codes in November 2013
195
- {
196
- "AFG" => "Afghanistan",
197
- "AHO" => "Netherlands Antilles",
198
- "ALB" => "Albania",
199
- "ALG" => "Algeria",
200
- "AND" => "Andorra",
201
- "ANG" => "Angola",
202
- "ANT" => "Antigua and Barbuda",
203
- "ARG" => "Argentina",
204
- "ARM" => "Armenia",
205
- "ARU" => "Aruba",
206
- "AUS" => "Australia",
207
- "AUT" => "Austria",
208
- "AZE" => "Azerbaijan",
209
- "BAH" => "Bahamas",
210
- "BAN" => "Bangladesh",
211
- "BAR" => "Barbados",
212
- "BDI" => "Burundi",
213
- "BEL" => "Belgium",
214
- "BEN" => "Benin",
215
- "BER" => "Bermuda",
216
- "BHU" => "Bhutan",
217
- "BIH" => "Bosnia and Herzegovina",
218
- "BIZ" => "Belize",
219
- "BLR" => "Belarus",
220
- "BOL" => "Bolivia",
221
- "BOT" => "Botswana",
222
- "BRA" => "Brazil",
223
- "BRN" => "Bahrain",
224
- "BRU" => "Brunei",
225
- "BUL" => "Bulgaria",
226
- "CAM" => "Cambodia",
227
- "CAN" => "Canada",
228
- "CGO" => "Congo",
229
- "CHA" => "Chad",
230
- "CHI" => "Chile",
231
- "CHN" => "China",
232
- "CIV" => "Ivory Coast",
233
- "CMR" => "Cameroon",
234
- "COL" => "Colombia",
235
- "CRC" => "Costa Rica",
236
- "CRO" => "Croatia",
237
- "CUB" => "Cuba",
238
- "CYP" => "Cyprus",
239
- "CZE" => "Czech Republic",
240
- "DEN" => "Denmark",
241
- "DJI" => "Djibouti",
242
- "DOM" => "Dominican Republic",
243
- "ECU" => "Ecuador",
244
- "EGY" => "Egypt",
245
- "ESA" => "El Salvador",
246
- "ESP" => "Spain",
247
- "EST" => "Estonia",
248
- "ETH" => "Ethiopia",
249
- "FIJ" => "Fiji",
250
- "FIN" => "Finland",
251
- "FRA" => "France",
252
- "FRO" => "Faroe Islands",
253
- "GAB" => "Gabon",
254
- "GAM" => "The Gambia",
255
- "GEO" => "Georgia",
256
- "GER" => "Germany",
257
- "GHA" => "Ghana",
258
- "GRE" => "Greece",
259
- "GUA" => "Guatemala",
260
- "GUM" => "Guam",
261
- "GUY" => "Guyana",
262
- "HAI" => "Haiti",
263
- "HKG" => "Hong Kong",
264
- "HON" => "Honduras",
265
- "HUN" => "Hungary",
266
- "INA" => "Indonesia",
267
- "IND" => "India",
268
- "IRI" => "Iran",
269
- "IRL" => "Ireland",
270
- "IRQ" => "Iraq",
271
- "ISL" => "Iceland",
272
- "ISR" => "Israel",
273
- "ISV" => "Virgin Islands",
274
- "ITA" => "Italy",
275
- "IVB" => "British Virgin Islands",
276
- "JAM" => "Jamaica",
277
- "JOR" => "Jordan",
278
- "JPN" => "Japan",
279
- "KAZ" => "Kazakhstan",
280
- "KEN" => "Kenya",
281
- "KGZ" => "Kyrgyzstan",
282
- "KOR" => "South Korea",
283
- "KSA" => "Saudi Arabia",
284
- "KUW" => "Kuwait",
285
- "LAO" => "Laos",
286
- "LAT" => "Latvia",
287
- "LBA" => "Libya",
288
- "LES" => "Lesotho",
289
- "LIB" => "Lebanon",
290
- "LIE" => "Liechtenstein",
291
- "LTU" => "Lithuania",
292
- "LUX" => "Luxembourg",
293
- "MAC" => "Macau",
294
- "MAD" => "Madagascar",
295
- "MAR" => "Morocco",
296
- "MAS" => "Malaysia",
297
- "MAW" => "Malawi",
298
- "MDA" => "Moldova",
299
- "MDV" => "Maldives",
300
- "MEX" => "Mexico",
301
- "MGL" => "Mongolia",
302
- "MKD" => "Macedonia",
303
- "MLI" => "Mali",
304
- "MLT" => "Malta",
305
- "MNE" => "Montenegro",
306
- "MON" => "Monaco",
307
- "MOZ" => "Mozambique",
308
- "MRI" => "Mauritius",
309
- "MTN" => "Mauritania",
310
- "MYA" => "Myanmar",
311
- "NAM" => "Namibia",
312
- "NCA" => "Nicaragua",
313
- "NED" => "Netherlands",
314
- "NEP" => "Nepal",
315
- "NGR" => "Nigeria",
316
- "NOR" => "Norway",
317
- "NZL" => "New Zealand",
318
- "PAK" => "Pakistan",
319
- "PAN" => "Panama",
320
- "PAR" => "Paraguay",
321
- "PER" => "Peru",
322
- "PHI" => "Philippines",
323
- "PLE" => "Palestine",
324
- "PLW" => "Palau",
325
- "PNG" => "Papua New Guinea",
326
- "POL" => "Poland",
327
- "POR" => "Portugal",
328
- "PUR" => "Puerto Rico",
329
- "QAT" => "Qatar",
330
- "ROU" => "Romania",
331
- "RSA" => "South Africa",
332
- "RUS" => "Russia",
333
- "RWA" => "Rwanda",
334
- "SEN" => "Senegal",
335
- "SEY" => "Seychelles",
336
- "SIN" => "Singapore",
337
- "SLE" => "Sierra Leone",
338
- "SLO" => "Slovenia",
339
- "SMR" => "San Marino",
340
- "SOL" => "Solomon Islands",
341
- "SOM" => "Somalia",
342
- "SRB" => "Serbia",
343
- "SRI" => "Sri Lanka",
344
- "STP" => "Sao Tome and Principe",
345
- "SUD" => "Sudan",
346
- "SUI" => "Switzerland",
347
- "SUR" => "Suriname",
348
- "SVK" => "Slovakia",
349
- "SWE" => "Sweden",
350
- "SWZ" => "Swaziland",
351
- "SYR" => "Syria",
352
- "TAN" => "Tanzania",
353
- "THA" => "Thailand",
354
- "TJK" => "Tajikistan",
355
- "TKM" => "Turkmenistan",
356
- "TOG" => "Togo",
357
- "TPE" => "Chinese Taipei",
358
- "TRI" => "Trinidad and Tobago",
359
- "TUN" => "Tunisia",
360
- "TUR" => "Turkey",
361
- "UAE" => "United Arab Emirates",
362
- "UGA" => "Uganda",
363
- "UKR" => "Ukraine",
364
- "URU" => "Uruguay",
365
- "USA" => "United States",
366
- "UZB" => "Uzbekistan",
367
- "VEN" => "Venezuela",
368
- "VIE" => "Vietnam",
369
- "YEM" => "Yemen",
370
- "ZAM" => "Zambia",
371
- "ZIM" => "Zimbabwe",
372
- }
373
- ioc_but_not_fide =
374
- {
375
- "ASA" => "American Samoa",
376
- "BUR" => "Burkina Faso",
377
- "CAF" => "Central African Republic",
378
- "CAY" => "Cayman Islands",
379
- "COD" => "DR Congo",
380
- "COK" => "Cook Islands",
381
- "COM" => "Comoros",
382
- "CPV" => "Cape Verde",
383
- "DMA" => "Dominica",
384
- "ERI" => "Eritrea",
385
- "FSM" => "Federated States of Micronesia",
386
- "GBR" => "Great Britain",
387
- "GBS" => "Guinea-Bissau",
388
- "GEQ" => "Equatorial Guinea",
389
- "GRN" => "Grenada",
390
- "GUI" => "Guinea",
391
- "KIR" => "Kiribati",
392
- "LBR" => "Liberia",
393
- "LCA" => "Saint Lucia",
394
- "MHL" => "Marshall Islands",
395
- "NIG" => "Niger",
396
- "NRU" => "Nauru",
397
- "OMA" => "Oman",
398
- "PRK" => "North Korea",
399
- "SAM" => "Samoa",
400
- "SKN" => "Saint Kitts and Nevis",
401
- "TGA" => "Tonga",
402
- "TLS" => "Timor-Leste",
403
- "TUV" => "Tuvalu",
404
- "VAN" => "Vanuatu",
405
- "VIN" => "Saint Vincent and the Grenadines",
406
- }
407
- @missing = []
408
- @badname = []
409
- british = %w[ENG SCO WLS GCI JCI]
410
- exceptions = # FIDE => IOC
411
- {
412
- "FAI" => "FRO", # Faroe Islands
413
- "MNC" => "MON", # Monaco
414
- }
415
- got = {}
416
- Federation.menu.each do |name, code|
417
- if ioc_and_fide[code]
418
- @badname << "#{code} #{name} #{ioc_and_fide[code]}" unless ioc_and_fide[code].include?(name) || name.include?(ioc_and_fide[code])
419
- else
420
- @missing << code unless british.include?(code) || exceptions.keys.include?(code)
421
- end
422
- got[code] = true
423
- end
424
- @not_included = ioc_and_fide.keys.reject { |code| got[code] || exceptions.values.include?(code) }
425
- end
426
-
427
- it "codes should be all IOC with some exceptions" do
428
- expect(@missing.join("|")).to eq ""
429
- end
430
-
431
- it "country names should be similar to the IOC name" do
432
- expect(@badname.join("|")).to eq ""
433
- end
434
-
435
- it "all IOC codes that are FIDE members should be present" do
436
- expect(@not_included.join("|")).to eq ""
437
- end
438
- end
439
192
  end
440
193
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icu_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.2
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: bundler
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.4.5
120
+ rubygems_version: 2.6.10
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Shared ICU utilities