fixed_width_file_parser 0.1.3 → 0.1.4

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: cf95cd36cb7b92195d33900fd56fff97477c1a6a
4
- data.tar.gz: 2f08e3b3d175cb2586fe73a7303b8f0855c23a67
3
+ metadata.gz: 5d247b1668e893c35afb637941e3ca01f1949a82
4
+ data.tar.gz: 8aed0fef1f981f2ffd7e6a257bf798f21af63e6c
5
5
  SHA512:
6
- metadata.gz: 705fbc3925a1d6ada7a0c265e81771a0b1eba62443099deb084cc3640aec63a5ece0c2795972ea2b48cab8b881ada200a97cbd505455db52247046768e1eabf2
7
- data.tar.gz: a055eacf68de52ef66fe28cb1e640c36d00a1850453cdd1dbf86de0dbaccce39a09be33ee98ff096af36389907fbe79cdfd22b8650303b9936f1066f7c97ccce
6
+ metadata.gz: 29f528e67ff45166d99ad6295f1715efddc44dfe1caa18440b444fe212dc76c3ec06b599b9da4658f1439508c0f7ea7b1617120cff69aac09c0d72a235a9bf75
7
+ data.tar.gz: 58d1bed56e38186e6881aba7f62fe4801b06c2c839074a002440df32c8ffd75b61091f8118276c342f698bb283295750fccff5cc20882aa8964168d6661d2ded
@@ -55,7 +55,7 @@ module FixedWidthFileParser
55
55
 
56
56
  line_fields = {}
57
57
  fields.each do |field|
58
- line_fields[field[:name].to_sym] = line[ field[:position] ].try(:strip)
58
+ line_fields[field[:name].to_sym] = line[ field[:position] ].nil? ? nil : line[ field[:position] ].strip
59
59
  end
60
60
 
61
61
  yield(line_fields)
@@ -1,3 +1,3 @@
1
1
  module FixedWidthFileParser
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fixed_width_file_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-22 00:00:00.000000000 Z
11
+ date: 2016-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler