codigo_postal 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/test/test_codigo_postal.rb +15 -0
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4deb6bb397a6028c2a5fe5580657d07c472e19414e3fb28a7e1adc2d2e91e84e
4
- data.tar.gz: dcfd84d88b2eab52daa469b1e1a2cc2d19fa43144e65518b60cd0283ac8199e1
3
+ metadata.gz: 536da4c492a360855083bf03ae79f47f495942a70d99b934348acd64321f06de
4
+ data.tar.gz: 23fe9f9b9ba1450a84bc7eeb2c40bc73f615dbec53b652195a2130d9246f2be4
5
5
  SHA512:
6
- metadata.gz: 99c6a2741a4c0a702dc791f8c2835af1349aafbc44644c3cd09b44afcbb8dd7c59a203f5c55a8f7ea2ba2d77e8ffb12ecb51110f981354418646ccf02c6bcf38
7
- data.tar.gz: ac1c6ada139b2f5dae63fe657267c0abe7e8ac940f995ae2a74a743f9d3b385b1694926d119de5a21e824627a5cd43676460206be85d5e984895fc715fee16fc
6
+ metadata.gz: 1936163c6ec941e12983459c48d3684411800e6597bc1f849e398fcdf6396330b25617cae8e8fb611ed0a07c8b05ed9541ebdcd22f3a9f51a366a798255bbc7d
7
+ data.tar.gz: e863f297d288bb095bc74d22cff7e0df6ac0439a6e332ac5f6652ce0047d98ee5b9162779fbb28c91f8ef991a0083690771e67161e6e0b473f0e013811d68025
@@ -108,5 +108,20 @@ end
108
108
 
109
109
  end
110
110
 
111
+ def test_readme_examples
112
+ assert_output("SP\nSão Paulo\n01001-000\n") do
113
+ cep = CodigoPostal.new(1001000)
114
+ puts cep.state_code # => 'SP'
115
+ puts cep.state_name # => 'São Paulo'
116
+ puts cep.to_s # => '01001-000'
117
+ end
118
+
119
+ assert_output("true\n") do
120
+ cep1 = CodigoPostal.new(4094050)
121
+ cep2 = CodigoPostal.new("04.094-050")
122
+ puts cep1 == cep2 # => true
123
+ end
124
+ end
125
+
111
126
  end
112
127
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codigo_postal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Mesquita
@@ -24,7 +24,8 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.0'
27
- description: This gem provides a simple way to find Brazilian states by postal code.
27
+ description: Validate, format and get the corresponding Brazilian state for a CEP
28
+ without making HTTP requests.
28
29
  email: felipemesquita@hey.com
29
30
  executables: []
30
31
  extensions: []
@@ -54,6 +55,6 @@ requirements: []
54
55
  rubygems_version: 3.4.12
55
56
  signing_key:
56
57
  specification_version: 4
57
- summary: A gem to find Brazilian states by postal code
58
+ summary: An offline gem to find Brazilian states by postal code
58
59
  test_files:
59
60
  - test/test_codigo_postal.rb