brval 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -3
- data/lib/brval/cep/via_cep.rb +1 -1
- data/lib/brval/cep/widenet.rb +1 -1
- data/lib/brval/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7260e4530a40cc16c181fc7aa4d12e0bdb359b744dc0862c688475269ac16e01
|
4
|
+
data.tar.gz: 4e4bc2bd3d2c9a35ccab8c33a7422179c8c12c6326e23f82effb54cb49fc77d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 499890bc5c7a1220692c43d668afe8efa8990b55e474161996dd71a54966e4cdc45748ba7f27514e1c5b3b10dd383599a6c6aafceaf86e5d09ed46879436405f
|
7
|
+
data.tar.gz: a761ecc256adf51f505acca1468588f253a711681fa053dbbeaf1eb19a91de7565249a80f62d48aad1570b53ccc52a7d0732c7fec583de1c5a23ad1d17376f78
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ Brval.cep_valid?('70297-400') # => true
|
|
43
43
|
|
44
44
|
### Lista da Funções
|
45
45
|
### Functions List
|
46
|
-
Above is the list with all the functions and validations avaible on Brval gem
|
46
|
+
Above is the list with all the functions and validations avaible on Brval gem.
|
47
47
|
|
48
48
|
| Function | Return | Description |
|
49
49
|
|-------------------------|--------------|-----------|
|
@@ -60,7 +60,7 @@ Above is the list with all the functions and validations avaible on Brval gem, a
|
|
60
60
|
|
61
61
|
|
62
62
|
### CEP Validation
|
63
|
-
Brazilian postal code, CEP, doesn't has any formula or calculation to check
|
63
|
+
Brazilian postal code, CEP, doesn't has any formula or calculation to check if some CEP is valid or not, the only way to know that is searching in a database with all CEP's in Brazil
|
64
64
|
|
65
65
|
Apparently Correios doesn't provides any database with all CEP's of Brazil, so some devs developer their own services to search for a CEP info, some of those services are public API's and anyone can use it.
|
66
66
|
|
@@ -74,7 +74,7 @@ Considering this, Brval does the CEP validation following this flow:
|
|
74
74
|
|
75
75
|
The gem uses the same procedure to get the info of some CEP with the function: `Brval.cep_info(00000000)`
|
76
76
|
|
77
|
-
**OBS:** the gem "only" search in three API's,
|
77
|
+
**OBS:** the gem "only" search in three API's, if a CEP exists but any of these API's doesn't have it, the gem will return a false negative.
|
78
78
|
|
79
79
|
|
80
80
|
## Contributing
|
@@ -85,6 +85,16 @@ If you want to contribute with some code create an issue so we can discuss about
|
|
85
85
|
|
86
86
|
Don't forget the tests, Brval use Rspec to test. Update the README with the new info. Also, try to follow the gem pattern to implement your contribution.
|
87
87
|
|
88
|
+
### Run the gem from local project
|
89
|
+
You can run the gem with: `rake console`
|
90
|
+
|
91
|
+
And before send your PR make a simulation installing the gem locally with your changes, just run the `./build.sh` script.
|
92
|
+
|
93
|
+
```
|
94
|
+
chmod +x build.sh
|
95
|
+
./build.sh
|
96
|
+
```
|
97
|
+
|
88
98
|
Thanks!
|
89
99
|
|
90
100
|
## License
|
data/lib/brval/cep/via_cep.rb
CHANGED
data/lib/brval/cep/widenet.rb
CHANGED
data/lib/brval/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brval
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Andrade
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|