conecta_address_br 0.1.3 → 0.1.4
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.
- checksums.yaml +4 -4
- data/README.md +11 -9
- data/lib/conecta_address_br.rb +28 -28
- data/lib/conecta_address_br/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: d010055bddf0dd13a483427e59193d28786ae28ae738e3c12dbde3b57c60f61f
|
4
|
+
data.tar.gz: d0dee1bc9c60d838c6859611fef417ac6f8fb6ac130638b9dc58251f3dbb00c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17895f5394e50446cfa5f01363051e8bb2fd9c41885c8ccd4c7c403edcf639162017140b0069937b598a23556599c0c862a13ac0845a3ccecb7a60dd0a3b6521
|
7
|
+
data.tar.gz: e91dd810d8b2d202cac71d4b5be29b97a57a60c86ed024338839b4ac1277c059404fe766468ddb2e98ce9507455b8816a4ee79bf2732add751ec6cfc7051bab0
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
<img alt="Logo Conecta" data-src="https://www.conectaai.com/wp-content/themes/conecta/assets/images/conecta.svg" class="img-fluid none-mobile lazyloaded" src="https://www.conectaai.com/wp-content/themes/conecta/assets/images/conecta.svg">
|
2
2
|
|
3
|
-
|
3
|
+
# Address BR
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -19,15 +19,17 @@ Or install it yourself as:
|
|
19
19
|
$ gem install conecta_address_br
|
20
20
|
|
21
21
|
## Usage
|
22
|
+
Versão 0.1.4
|
22
23
|
|
23
|
-
|
24
|
+
Três funções foram implementadas nesta versão, organizadas em um único arquivo:
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
+
```ruby
|
27
|
+
require 'conecta_address_br'
|
28
28
|
|
29
|
-
|
29
|
+
ConectaAddressBr::States.all # Retorna todos os estados do Brasil
|
30
30
|
|
31
|
-
|
31
|
+
ConectaAddressBr::Cities.all # Retorna todas as cidades do Brasil
|
32
32
|
|
33
|
-
|
33
|
+
sigla_do_estado = "RJ"
|
34
|
+
ConectaAddressBr::Cities.by_state(sigla_do_estado) # Retorna todas as cidades de um estado
|
35
|
+
```
|
data/lib/conecta_address_br.rb
CHANGED
@@ -4,34 +4,34 @@ module ConectaAddressBr
|
|
4
4
|
class ConectaAddressBr::States
|
5
5
|
def self.all()
|
6
6
|
return [
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
7
|
+
%w[Acre AC],
|
8
|
+
%w[Alagoas AL],
|
9
|
+
%w[Amapá AP],
|
10
|
+
%w[Amazonas AM],
|
11
|
+
%w[Bahia BA],
|
12
|
+
%w[Ceará CE],
|
13
|
+
['Distrito Federal', 'DF'],
|
14
|
+
['Espírito Santo', 'ES'],
|
15
|
+
%w[Goiás GO],
|
16
|
+
%w[Maranhão MA],
|
17
|
+
['Mato Grosso', 'MT'],
|
18
|
+
['Mato Grosso do Sul', 'MS'],
|
19
|
+
['Minas Gerais', 'MG'],
|
20
|
+
%w[Pará PA],
|
21
|
+
%w[Paraíba PB],
|
22
|
+
%w[Paraná PR],
|
23
|
+
%w[Pernambuco PE],
|
24
|
+
%w[Piauí PI],
|
25
|
+
['Rio de Janeiro', 'RJ'],
|
26
|
+
['Rio Grande do Norte', 'RN'],
|
27
|
+
['Rio Grande do Sul', 'RS'],
|
28
|
+
%w[Rondônia RO],
|
29
|
+
%w[Roraima RR],
|
30
|
+
['Santa Catarina', 'SC'],
|
31
|
+
['São Paulo', 'SP'],
|
32
|
+
%w[Sergipe SE],
|
33
|
+
%w[Tocantins TO]
|
34
|
+
]
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: conecta_address_br
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lessa, Eduardo Martins
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-11-
|
12
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|