normalize 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,2 +1 @@
1
1
  Gemfile.lock
2
- *.gem
data/lib/normalize.rb CHANGED
@@ -4,11 +4,7 @@ module Normalize
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  def normalize_value(value, normalizer)
7
- if value.blank?
8
- value
9
- else
10
- normalizer.call(value)
11
- end
7
+ normalizer.call(value)
12
8
  end
13
9
 
14
10
  module ClassMethods
data/normalize.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'normalize'
5
- s.version = '0.0.2'
5
+ s.version = '0.0.3'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ['Tom-Eric Gerritsen']
8
- s.email = 'ik@tom-eric.info'
9
- s.homepage = 'https://github.com/tomeric/normalize'
8
+ s.email = 'tomeric@eet.nu'
9
+ s.homepage = 'https://github.com/eet-nu/normalize'
10
10
  s.summary = 'The attribute normalizer.'
11
11
  s.description = 'The attribute normalizer.'
12
12
  s.files = `git ls-files`.split("\n")
@@ -16,20 +16,6 @@ describe Normalize do
16
16
  it 'normalizes the given value with the given normalizer' do
17
17
  normalizer.normalize_value("string", -> input { input.upcase }).should == "STRING"
18
18
  end
19
-
20
- it 'does not normalize the value if it is empty' do
21
- normalization = mock
22
- normalization.should_not_receive(:call)
23
-
24
- normalizer.normalize_value('', normalization)
25
- end
26
-
27
- it 'does not normalize the value if it is nil' do
28
- normalization = mock
29
- normalization.should_not_receive(:call)
30
-
31
- normalizer.normalize_value(nil, normalization)
32
- end
33
19
  end
34
20
  end
35
21
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: normalize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-19 00:00:00.000000000 Z
12
+ date: 2011-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70204692924000 !ruby/object:Gem::Requirement
16
+ requirement: &70333889832940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,9 +21,9 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70204692924000
24
+ version_requirements: *70333889832940
25
25
  description: The attribute normalizer.
26
- email: ik@tom-eric.info
26
+ email: tomeric@eet.nu
27
27
  executables: []
28
28
  extensions: []
29
29
  extra_rdoc_files: []
@@ -37,7 +37,7 @@ files:
37
37
  - normalize.gemspec
38
38
  - spec/lib/normalize_spec.rb
39
39
  - spec/spec_helper.rb
40
- homepage: https://github.com/tomeric/normalize
40
+ homepage: https://github.com/eet-nu/normalize
41
41
  licenses: []
42
42
  post_install_message:
43
43
  rdoc_options: []