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.
- checksums.yaml +4 -4
- data/test/test_codigo_postal.rb +15 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 536da4c492a360855083bf03ae79f47f495942a70d99b934348acd64321f06de
|
4
|
+
data.tar.gz: 23fe9f9b9ba1450a84bc7eeb2c40bc73f615dbec53b652195a2130d9246f2be4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1936163c6ec941e12983459c48d3684411800e6597bc1f849e398fcdf6396330b25617cae8e8fb611ed0a07c8b05ed9541ebdcd22f3a9f51a366a798255bbc7d
|
7
|
+
data.tar.gz: e863f297d288bb095bc74d22cff7e0df6ac0439a6e332ac5f6652ce0047d98ee5b9162779fbb28c91f8ef991a0083690771e67161e6e0b473f0e013811d68025
|
data/test/test_codigo_postal.rb
CHANGED
@@ -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.
|
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:
|
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:
|
58
|
+
summary: An offline gem to find Brazilian states by postal code
|
58
59
|
test_files:
|
59
60
|
- test/test_codigo_postal.rb
|