burocracias 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fe1af5f582990e1ca3355404e5cc79955cf98f81
4
+ data.tar.gz: 88a5b55d6c8c1ed12da5862c173245feda5a203a
5
+ SHA512:
6
+ metadata.gz: 8a7530c892af1c09e662a55f581673341572dd02d53a45f71a7579fc7b9d7fa81539cc5ec265e9cd5b7064eedf39a1b2495840debcca20ceb76ab1554816ba9d
7
+ data.tar.gz: 556262eba1544e12e2f52756bc3f7416ba20d249b53f468bb96a7501588ddd247b1d078e2fce132052b37606755f878877ddd9c5e24e46a6e8c8768c5c0c73f7
@@ -1,3 +1,3 @@
1
1
  module Burocracias
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/burocracias.rb CHANGED
@@ -21,7 +21,7 @@ module Burocracias
21
21
 
22
22
  def self.format_cep(string)
23
23
  if string.length <= 8
24
- string.to_s.rjust(8, '0').insert(5, '-').insert(2, '.')
24
+ string.to_s.rjust(8, '0').insert(5, '-')
25
25
  else
26
26
  string
27
27
  end
@@ -50,13 +50,13 @@ module Burocracias
50
50
  context 'string has length of 8 characters' do
51
51
  it 'returns string as 99.999-999' do
52
52
  cep = '20921005'
53
- Masks.format_cep(cep).should eq '20.921-005'
53
+ Masks.format_cep(cep).should eq '20921-005'
54
54
  end
55
55
  end
56
56
  context 'string has less than 8 characters' do
57
57
  it 'adds zeroes to fill 8 characters and masks it' do
58
58
  cep = '20921'
59
- Masks.format_cep(cep).should eq '00.020-921'
59
+ Masks.format_cep(cep).should eq '00020-921'
60
60
  end
61
61
  end
62
62
  context 'string has more than 8 characters' do
data/spec/string_spec.rb CHANGED
@@ -13,7 +13,7 @@ describe String do
13
13
 
14
14
  describe '#as_cep' do
15
15
  it 'formats string as CEP' do
16
- '12345678'.as_cep.should eq '12.345-678'
16
+ '12345678'.as_cep.should eq '12345-678'
17
17
  end
18
18
  end
19
19
 
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burocracias
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Neil Carvalho
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-05 00:00:00.000000000 Z
11
+ date: 2013-11-12 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: Métodos para facilitar o tratamento de CEP, CPF, CNPJ e outras burocracias
@@ -65,33 +60,26 @@ files:
65
60
  - spec/string_spec.rb
66
61
  homepage: ''
67
62
  licenses: []
63
+ metadata: {}
68
64
  post_install_message:
69
65
  rdoc_options: []
70
66
  require_paths:
71
67
  - lib
72
68
  required_ruby_version: !ruby/object:Gem::Requirement
73
- none: false
74
69
  requirements:
75
- - - ! '>='
70
+ - - '>='
76
71
  - !ruby/object:Gem::Version
77
72
  version: '0'
78
- segments:
79
- - 0
80
- hash: -1813684070975990625
81
73
  required_rubygems_version: !ruby/object:Gem::Requirement
82
- none: false
83
74
  requirements:
84
- - - ! '>='
75
+ - - '>='
85
76
  - !ruby/object:Gem::Version
86
77
  version: '0'
87
- segments:
88
- - 0
89
- hash: -1813684070975990625
90
78
  requirements: []
91
79
  rubyforge_project:
92
- rubygems_version: 1.8.24
80
+ rubygems_version: 2.0.3
93
81
  signing_key:
94
- specification_version: 3
82
+ specification_version: 4
95
83
  summary: Burocracias do nosso Brasil
96
84
  test_files:
97
85
  - spec/burocracias_spec.rb