attribute_normalizer-extras 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddcd0c30e6e3ec3f8401bdb847d9fe39963e3795
4
- data.tar.gz: 27875feb4d576ef3671aa8f147fdf3409094326b
3
+ metadata.gz: beb68db8e9ad83583260876034337efe70bd1e7e
4
+ data.tar.gz: f4a7f569158487f8bbbd1b3173a47ebd7d1160ad
5
5
  SHA512:
6
- metadata.gz: 19c8b88ec229a25a5e4c09daf737556acd661e7d4c5e80ec89edef2169da74da13c283254a828fe3904be0b2409b6ae21ee82ed0fd84fb21c7ab367ebf81fb5b
7
- data.tar.gz: f3936cf030cdde8160d72f33e8662fd5336b5b867dccea368df93fbacae0a42e3b6a3d1858bdc360d4c477bc19d52e3570d7a6a801042e15d67a974b19de507c
6
+ metadata.gz: 06804e8594de2739324784966cf364f5826e899677109c3eaad443c03b4d5f80d82320b71428448a855aa6a6d36b6d1d1eea989dc1f5fe92880472110708f2be
7
+ data.tar.gz: f0d0cbd95948eb656a10b57d154eba5697ac38670f24690d56623dff44164b189a4f37e46da3fa03f9c244fac36e64f7083bf87e81c175b32a3cdb2277a91db9
@@ -1,5 +1,5 @@
1
1
  module AttributeNormalizer
2
2
  module Extras
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -2,7 +2,7 @@ module AttributeNormalizer
2
2
  module Normalizers
3
3
  module PostalCodeNormalizer
4
4
  def self.normalize(value, options)
5
- GsubNormalizer.normalize value.upcase, pattern: /\W+|_/, replacement: ''
5
+ GsubNormalizer.normalize value.upcase, pattern: /\W+|_/, replacement: '' unless value==nil
6
6
  end
7
7
  end
8
8
  end
@@ -19,6 +19,10 @@ describe AttributeNormalizer::Normalizers::PostalCodeNormalizer do
19
19
  expect(subject.normalize "t6h1v2", {}).to eq "T6H1V2"
20
20
  end
21
21
 
22
+ it 'returns nil if value is nil' do
23
+ expect(subject.normalize nil, {}).to be_nil
24
+ end
25
+
22
26
  end
23
27
 
24
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attribute_normalizer-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darko Dosenovic
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2015-08-10 00:00:00.000000000 Z
17
+ date: 2015-11-09 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: bundler
@@ -133,6 +133,7 @@ files:
133
133
  - LICENSE.txt
134
134
  - README.md
135
135
  - Rakefile
136
+ - attribute_normalizer-extras-0.0.2.gem
136
137
  - attribute_normalizer-extras.gemspec
137
138
  - lib/attribute_normalizer/extras.rb
138
139
  - lib/attribute_normalizer/extras/version.rb