validates_cpf 2.0.0.rc2 → 2.0.0

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.
@@ -10,7 +10,7 @@ module ValidatesCpf
10
10
  end
11
11
 
12
12
  def valid?
13
- return true if @number.nil?
13
+ return true if @number.blank?
14
14
  return false unless @pure_number
15
15
  check_cpf
16
16
  end
@@ -51,4 +51,4 @@ module ValidatesCpf
51
51
  @number = "#{$1}.#{$2}.#{$3}-#{$4}"
52
52
  end
53
53
  end
54
- end
54
+ end
@@ -1,3 +1,3 @@
1
1
  module ValidatesCpf
2
- VERSION = '2.0.0.rc2'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -2,10 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  describe ValidatesCpf::Cpf do
4
4
  context "should be invalid with" do
5
- it "blank number" do
6
- ValidatesCpf::Cpf.new('').should_not be_valid
7
- end
8
-
9
5
  it "345.65.67.3 as number" do
10
6
  ValidatesCpf::Cpf.new('345.65.67.3').should_not be_valid
11
7
  end
@@ -56,6 +52,10 @@ describe ValidatesCpf::Cpf do
56
52
  end
57
53
 
58
54
  context "should be valid with" do
55
+ it "blank number" do
56
+ ValidatesCpf::Cpf.new('').should be_valid
57
+ end
58
+
59
59
  it "nil as number" do
60
60
  ValidatesCpf::Cpf.new(nil).should be_valid
61
61
  end
@@ -92,4 +92,4 @@ describe ValidatesCpf::Cpf do
92
92
  ValidatesCpf::Cpf.new('123456').number.should == '123456'
93
93
  end
94
94
  end
95
- end
95
+ end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_cpf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc2
5
- prerelease: 6
4
+ version: 2.0.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paulo Henrique Lopes Ribeiro
@@ -135,13 +135,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  segments:
137
137
  - 0
138
- hash: -2004613854951674804
138
+ hash: 853946709571986594
139
139
  required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
- - - ! '>'
142
+ - - ! '>='
143
143
  - !ruby/object:Gem::Version
144
- version: 1.3.1
144
+ version: '0'
145
+ segments:
146
+ - 0
147
+ hash: 853946709571986594
145
148
  requirements: []
146
149
  rubyforge_project:
147
150
  rubygems_version: 1.8.25