countryconvert 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/countryconvert.rb +3 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 718ad0c63e9bfc39826283c13b4695b080087350
4
- data.tar.gz: 4816b47d416ecd42d5bc29346f83db81b596e492
3
+ metadata.gz: 43c1051855b09e3c4164835b948e2f462b6fb270
4
+ data.tar.gz: 64c6097724d7fd94ad4b4214753c830062780d90
5
5
  SHA512:
6
- metadata.gz: 107d4f71930248a9ec1572479500937c0afbc26bd0fd4776d5c5d0c22655b80dbb0127185bd337eaf21643c7df59e5bba04a48ed5e37cde0c572cbf394e24399
7
- data.tar.gz: b5bd36297f91bb4f50b77f933e04ff8ed4150d00be82c0acaefc4d7dd1e40918dec23d3dd40d939a5aa9112b98092795e67f975d8d8d3a1cae38d6edc885339c
6
+ metadata.gz: 43be338db71dc34a19a61f0ccee16e75f01d505e51b8f28ca1fa4e4d32ab8ff574fa01599e36106e2d3f43f649aa1fbf5b1b04e89c725ec7f6ec315f3b3df7d2
7
+ data.tar.gz: c5328c34e1850487d20f5e0b08df6acc521d6bddc93f552e3219cada559df70a78bc18c96e473aa3f7da5b0a1d4ab16e5d1e7ce88f5bb7c678b820e1a3efc932
@@ -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.3
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-03 00:00:00.000000000 Z
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