conecta_address_br 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7316467263f465499bda0d83f7c39bd60c79e5ba8e7eba7c6c02cd24fb7d7564
4
- data.tar.gz: 8f611db27b7c74a5c5bc9ca5249b4b92e32595d2e1a48b745b418def24b442ce
3
+ metadata.gz: d010055bddf0dd13a483427e59193d28786ae28ae738e3c12dbde3b57c60f61f
4
+ data.tar.gz: d0dee1bc9c60d838c6859611fef417ac6f8fb6ac130638b9dc58251f3dbb00c3
5
5
  SHA512:
6
- metadata.gz: 23604b717b4220a820334ecd20982ae94a711f3fbee4dda8f9578789955f3f10ea32f4ff0a1a3f2706c967175beb2eb7133fbb55b3251b120179bd7a85218fd3
7
- data.tar.gz: 9d3fb49c2783f5eaeb1e72a32d3c3467eb98de8061ec6aea8e99f519392febc2a1342dfb0a99ad29953caa1b93ebcbf68cc96168845ee050a525cac0ede0d297
6
+ metadata.gz: 17895f5394e50446cfa5f01363051e8bb2fd9c41885c8ccd4c7c403edcf639162017140b0069937b598a23556599c0c862a13ac0845a3ccecb7a60dd0a3b6521
7
+ data.tar.gz: e91dd810d8b2d202cac71d4b5be29b97a57a60c86ed024338839b4ac1277c059404fe766468ddb2e98ce9507455b8816a4ee79bf2732add751ec6cfc7051bab0
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Conecta Address BR
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
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/conecta_address_br`. To experiment with that code, run `bin/console` for an interactive prompt.
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
- TODO: Write usage instructions here
24
+ Três funções foram implementadas nesta versão, organizadas em um único arquivo:
24
25
 
25
- ## Development
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
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
29
+ ConectaAddressBr::States.all # Retorna todos os estados do Brasil
30
30
 
31
- ## Contributing
31
+ ConectaAddressBr::Cities.all # Retorna todas as cidades do Brasil
32
32
 
33
- Bug reports and pull requests are welcome on GitHub at https://github.com/conectaai/conecta_address_br.
33
+ sigla_do_estado = "RJ"
34
+ ConectaAddressBr::Cities.by_state(sigla_do_estado) # Retorna todas as cidades de um estado
35
+ ```
@@ -4,34 +4,34 @@ module ConectaAddressBr
4
4
  class ConectaAddressBr::States
5
5
  def self.all()
6
6
  return [
7
- "Acre",
8
- "Alagoas",
9
- "Amapá",
10
- "Amazonas",
11
- "Bahia",
12
- "Ceará",
13
- "Distrito Federal",
14
- "Espírito Santo",
15
- "Goiás",
16
- "Maranhão",
17
- "Mato Grosso",
18
- "Mato Grosso do Sul",
19
- "Minas Gerais",
20
- "Paraíba",
21
- "Paraná",
22
- "Pará",
23
- "Pernambuco",
24
- "Piauí",
25
- "Rio de Janeiro",
26
- "Rio Grande do Norte",
27
- "Rio Grande do Sul",
28
- "Rondônia",
29
- "Roraima",
30
- "Santa Catarina",
31
- "São Paulo",
32
- "Sergipe",
33
- "Tocantins"
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
 
@@ -1,3 +1,3 @@
1
1
  module ConectaAddressBr
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-11 00:00:00.000000000 Z
12
+ date: 2019-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler