countryconvert 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/countryconvert.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43c1051855b09e3c4164835b948e2f462b6fb270
|
4
|
+
data.tar.gz: 64c6097724d7fd94ad4b4214753c830062780d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43be338db71dc34a19a61f0ccee16e75f01d505e51b8f28ca1fa4e4d32ab8ff574fa01599e36106e2d3f43f649aa1fbf5b1b04e89c725ec7f6ec315f3b3df7d2
|
7
|
+
data.tar.gz: c5328c34e1850487d20f5e0b08df6acc521d6bddc93f552e3219cada559df70a78bc18c96e473aa3f7da5b0a1d4ab16e5d1e7ce88f5bb7c678b820e1a3efc932
|
data/lib/countryconvert.rb
CHANGED
@@ -258,11 +258,14 @@ class CountryConvert
|
|
258
258
|
def convert
|
259
259
|
finaldata = Array.new
|
260
260
|
@input.each do |f|
|
261
|
+
begin
|
261
262
|
if @isocodes[f[@countryfield].upcase]
|
262
263
|
threeletter = @isocodes[f[@countryfield].upcase]
|
263
264
|
f[@countryfield] = threeletter
|
264
265
|
finaldata.push(f)
|
265
266
|
end
|
267
|
+
rescue
|
268
|
+
end
|
266
269
|
end
|
267
270
|
return JSON.pretty_generate(finaldata)
|
268
271
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: countryconvert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. C. McGrath
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Converts 2-char ISO country codes to 3-char.
|
14
14
|
email: shidash@shidash.com
|