cep_facil 1.0.4 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -6
- data/README.md +15 -63
- data/cep_facil.gemspec +20 -15
- data/lib/cep_facil.rb +25 -1
- data/lib/cep_facil/api.rb +69 -45
- data/lib/cep_facil/version.rb +2 -2
- data/spec/cep_facil_spec.rb +29 -20
- metadata +35 -22
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: fe9a453688bb9eb7202f39bf0d11078bc334b6c1
|
4
|
+
data.tar.gz: 672fc5c2844e410a6d466a96628ddd5aba329866
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: aaa2bf1a6ffc9b9ec2c439c89cac0ee6fe31a2684bbab1d5c5a75a776d49ad453b5ef1fabcb0c4418f0b64f6c67b2c9995fa78ec529acb7d98ab2bbb9865d00e
|
7
|
+
data.tar.gz: 2fe227adb42b28c4a1cc94afb47a4b2d748d944b68530df25f52a81b4d3ddf2427da1a809740df2719ccc52768c5df2fdf9db90a2163d8481c9f60d69b89d9ee
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
# CepFacil
|
2
2
|
|
3
|
-
Ruby
|
3
|
+
Wrapper Ruby para a API do [CepFácil]
|
4
4
|
|
5
5
|
[![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/rodrigoalvesvieira/cep_facil)
|
6
6
|
[![Build Status](https://secure.travis-ci.org/rodrigoalvesvieira/cep_facil.png?branch=master)](http://travis-ci.org/rodrigoalvesvieira/cep_facil)
|
7
|
+
* [![Dependencies](https://gemnasium.com/rodrigoalvesvieira/cepfacil.png?travis)](https://gemnasium.com/rodrigoalvesvieira/cepfacil)
|
7
8
|
|
8
9
|
## Instalação
|
9
10
|
|
@@ -13,7 +14,6 @@ No `Gemfile`:
|
|
13
14
|
|
14
15
|
```ruby
|
15
16
|
gem "cep_facil"
|
16
|
-
|
17
17
|
```
|
18
18
|
|
19
19
|
Ou via RubyGems, diretamente:
|
@@ -27,32 +27,23 @@ Ou via RubyGems, diretamente:
|
|
27
27
|
Para usar a API do [CepFácil], você precisa obter um token do serviço. Você obtém esse token gratuitamente em cepfacil.com.br
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
|
31
30
|
require "cep_facil"
|
32
31
|
|
33
|
-
|
32
|
+
# Autenticando
|
34
33
|
|
35
34
|
token = "1234567890"
|
35
|
+
conn = CepFacil::API.new token
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
### Acesso rápido via método de classe
|
40
|
-
|
41
|
-
address = CepFacil::API.get(cep, token) # Hash Notation => CepFacil::API.get(cep: cep, token: token)
|
42
|
-
|
43
|
-
# Argumentos como Hashes
|
44
|
-
|
45
|
-
address = CepFacil::API.new(cep: cep, token: token, format: "texto")
|
37
|
+
# Obtendo endereços
|
46
38
|
|
39
|
+
zip_code = "53416540"
|
40
|
+
address = conn.get_address(zip_code)
|
47
41
|
```
|
48
42
|
|
49
|
-
#### Retorna o endereço referente àquele CEP
|
43
|
+
#### Retorna o endereço (objeto `CepFacil::Address`) referente àquele CEP
|
50
44
|
|
51
|
-
O retorno é um objeto `CepFacil::API` que contem os seguintes métodos (propriedades) :
|
52
45
|
|
53
46
|
```ruby
|
54
|
-
|
55
|
-
|
56
47
|
address.cep # => "53417540"
|
57
48
|
|
58
49
|
address.type # => "Rua"
|
@@ -64,62 +55,25 @@ address.city # => "Paulista"
|
|
64
55
|
address.neighborhood # => "Artur Lundgren II"
|
65
56
|
|
66
57
|
address.street # => "Panelas"
|
67
|
-
|
68
|
-
# Também é possivel acessar utilizando metodos em português
|
69
|
-
|
70
|
-
address.tipo # => "Avenida"
|
71
|
-
|
72
|
-
address.rua # => "Francisco Navarro"
|
73
|
-
|
74
|
-
address.cidade # => "Varginha"
|
75
|
-
|
76
|
-
address.bairro # => "Centro"
|
77
|
-
|
78
|
-
address.estado # => "MG"
|
79
|
-
|
80
|
-
address.uf # => "MG"
|
81
|
-
|
82
58
|
```
|
83
59
|
|
84
60
|
Embora isso deva parecer óbvio, informo que essas propriedades são todas **READONLY**.
|
85
|
-
|
86
61
|
Você pode checar se o endereço retornado é válido utilizando o método `valid?`:
|
87
62
|
|
88
63
|
```ruby
|
89
64
|
|
90
|
-
address = CepFacil::API.new "53020-140", token
|
91
|
-
|
92
65
|
address.valid? # true
|
93
|
-
|
94
66
|
```
|
95
67
|
|
96
|
-
|
68
|
+
Adicionalmente, seu objeto `CepFacil::Address` possui um método `full_format` que o descreve por extenso:
|
97
69
|
|
98
70
|
```ruby
|
99
|
-
|
100
|
-
address = CepFacil::API.new "53417-540", token
|
101
|
-
|
102
|
-
address.found? # true
|
103
|
-
|
104
|
-
address = CepFacil::API.new "00000000", token
|
105
|
-
|
106
|
-
address.valid? # false
|
107
|
-
|
71
|
+
address.full_format # => "RUA PANELAS, PAULISTA - PE 53416540, Brasil"
|
108
72
|
```
|
109
73
|
|
110
|
-
Adicionalmente, seu objeto `CepFacil::API` possui um método `full_format` e seu alias (`full_address`) que o descreve por extenso:
|
111
|
-
|
112
|
-
```ruby
|
113
|
-
|
114
|
-
address.full_format # => "Rua Panelas, Paulista - PE, Brasil"
|
115
|
-
|
116
|
-
address.full_address # => Avenida Francisco Navarro, Varginha - MG, Brasil" # Alias
|
117
|
-
|
118
|
-
```
|
119
74
|
Você pode passar o CEP como uma string qualquer, letras, caracteres especiais (pontos, hífens) são removidos automaticamente.
|
120
75
|
|
121
76
|
```ruby
|
122
|
-
|
123
77
|
"12345-678"
|
124
78
|
"123.45.678"
|
125
79
|
"123-456.78"
|
@@ -132,19 +86,17 @@ Você pode passar o CEP como uma string qualquer, letras, caracteres especiais (
|
|
132
86
|
A gem [Geocoder] é ótima para uso e manipulação de dados geográficos em projetos Ruby. Para integrá-la com o CepFacil, faça assim:
|
133
87
|
|
134
88
|
```ruby
|
135
|
-
|
136
89
|
geocoded_by address.full_format
|
137
|
-
|
138
90
|
```
|
139
91
|
|
140
92
|
## Autor
|
141
93
|
|
142
|
-
* Rodrigo Alves
|
94
|
+
* Rodrigo Alves
|
143
95
|
|
144
96
|
## Contribuidores
|
145
97
|
|
146
|
-
* Adriano Bacha
|
147
|
-
* Rafael Fidelis
|
98
|
+
* Adriano Bacha
|
99
|
+
* Rafael Fidelis
|
148
100
|
|
149
101
|
## Agradecimentos
|
150
102
|
|
@@ -154,11 +106,11 @@ Obrigado também aos [Contribuidores] desse projeto.
|
|
154
106
|
|
155
107
|
## Licença
|
156
108
|
|
157
|
-
CepFacil é liberado sob a [licença do MIT] com atribuições a Rodrigo Alves
|
109
|
+
CepFacil é liberado sob a [licença do MIT] com atribuições a Rodrigo Alves. Para detalhes veja o arquivo LICENSE.txt
|
158
110
|
|
159
111
|
[0x]: https://github.com/rodrigoalvesvieira/cep_facil/tree/0x
|
160
112
|
[Geocoder]: https://github.com/alexreisner/geocoder
|
161
113
|
[CepFácil]: http://cepfacil.com.br
|
162
114
|
[cepfacil.com.br]: http://cepfacil.com.br
|
163
115
|
[Contribuidores]: #contribuidores
|
164
|
-
[licença do MIT]: http://pt.wikipedia.org/wiki/Licen%C3%A7a_MIT#Texto_da_licen.C3.A7a
|
116
|
+
[licença do MIT]: http://pt.wikipedia.org/wiki/Licen%C3%A7a_MIT#Texto_da_licen.C3.A7a
|
data/cep_facil.gemspec
CHANGED
@@ -1,20 +1,25 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
$:.push File.expand_path("../lib", __FILE__)
|
3
2
|
require "cep_facil/version"
|
4
3
|
|
5
4
|
Gem::Specification.new do |s|
|
6
|
-
s.name
|
7
|
-
s.version
|
8
|
-
s.authors
|
9
|
-
s.email
|
10
|
-
s.homepage
|
11
|
-
s.summary
|
12
|
-
s.description
|
5
|
+
s.name = "cep_facil"
|
6
|
+
s.version = CepFacil::VERSION
|
7
|
+
s.authors = ["Rodrigo Alves"]
|
8
|
+
s.email = ["rodrigovieira1994@gmail.com"]
|
9
|
+
s.homepage = "http://github.com/rodrigoalvesvieira/cep_facil"
|
10
|
+
s.summary = %q{Wrapper para o serviço cepfacil.com.br}
|
11
|
+
s.description = %q{Wrapper Ruby para o serviço cepfacil.com.br}
|
13
12
|
s.rubyforge_project = "cep_facil"
|
14
|
-
s.files
|
15
|
-
s.test_files
|
16
|
-
s.executables
|
17
|
-
s.require_paths
|
18
|
-
|
19
|
-
s.
|
20
|
-
|
13
|
+
s.files = `git ls-files`.split("\n")
|
14
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
15
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
16
|
+
s.require_paths = ["lib"]
|
17
|
+
|
18
|
+
s.rdoc_options = ["--title", "Wrapper Ruby para a API do CepFacil", "--main", "README.md"]
|
19
|
+
s.licenses = ["MIT"]
|
20
|
+
|
21
|
+
s.add_dependency("rake", "~> 10.1.0")
|
22
|
+
s.add_dependency("json", "~> 1.8.0")
|
23
|
+
|
24
|
+
s.add_development_dependency("rspec", "~> 2.13.0")
|
25
|
+
end
|
data/lib/cep_facil.rb
CHANGED
@@ -1,4 +1,28 @@
|
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2012-2013 Rodrigo Alves
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
23
|
+
|
1
24
|
require "cep_facil/version"
|
25
|
+
|
2
26
|
module CepFacil
|
3
27
|
autoload :API, "cep_facil/api"
|
4
|
-
end
|
28
|
+
end
|
data/lib/cep_facil/api.rb
CHANGED
@@ -1,66 +1,90 @@
|
|
1
|
-
|
1
|
+
#--
|
2
|
+
# Copyright (c) 2012-2013 Rodrigo Alves
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
# a copy of this software and associated documentation files (the
|
6
|
+
# "Software"), to deal in the Software without restriction, including
|
7
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
# the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be
|
13
|
+
# included in all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
#++
|
23
|
+
|
2
24
|
require "net/http"
|
25
|
+
require "json"
|
3
26
|
|
4
27
|
module CepFacil
|
5
|
-
class
|
6
|
-
|
7
|
-
|
8
|
-
BASE_URL = "http://www.cepfacil.com.br/service/?filiacao=%s&cep=%s&formato=%s"
|
9
|
-
METHODS_PLACEHOLDER = {estado: :uf , type: :tipo , state: :uf , city: :cidade , neighborhood: :bairro , street: :descricao , rua: :descricao}
|
10
|
-
|
11
|
-
class << self
|
12
|
-
##
|
13
|
-
# Removes all non-numeric caracters and limit to 8 caracters
|
14
|
-
def parse_zip_code(zip_code)
|
15
|
-
return zip_code.to_s.gsub(/([^0-9]+)/,"")[0...8]
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def initialize(*args)
|
20
|
-
args = (args[0].is_a?(Hash) ? args[0] : Hash[[:cep,:token,:format].zip(args)])
|
21
|
-
args[:format] ||= "texto"
|
22
|
-
args[:cep] = CepFacil::API.parse_zip_code(args[:cep])
|
23
|
-
|
24
|
-
uri = URI(BASE_URL % [args[:token], args[:cep], args[:format]])
|
25
|
-
@read = Net::HTTP.get(uri)
|
26
|
-
@data = args[:format].to_s == "texto" ? Hash[@read.split("&").map { |i| i.split("=") } ] : @read
|
28
|
+
class Address
|
29
|
+
attr_accessor :zip_code, :type, :city, :state, :neighborhood, :street
|
27
30
|
|
28
|
-
|
29
|
-
|
31
|
+
def initialize(zip_code, type, city, state, neighborhood, street)
|
32
|
+
@zip_code = zip_code
|
33
|
+
@type = type
|
34
|
+
@city = city
|
35
|
+
@state = state
|
36
|
+
@neighborhood = neighborhood
|
37
|
+
@street = street
|
30
38
|
end
|
31
39
|
|
32
|
-
##
|
33
|
-
# Returns true if the address in question is a valid one
|
34
|
-
# returns false otherwise
|
35
40
|
def valid?
|
36
|
-
|
41
|
+
answ = false
|
42
|
+
answ = true if (self.zip_code && type && city)
|
43
|
+
return true
|
37
44
|
end
|
38
45
|
|
39
|
-
#
|
40
46
|
# Returns the address in its extense format
|
41
47
|
def full_format
|
42
|
-
"#{type} #{street}, #{city} - #{state}, Brasil"
|
48
|
+
"#{self.type} #{self.street}, #{self.city} - #{self.state} #{self.zip_code}, Brasil"
|
43
49
|
end
|
50
|
+
end
|
51
|
+
|
52
|
+
class API
|
53
|
+
attr_accessor :token
|
44
54
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
55
|
+
BASE_URL = "http://www.cepfacil.com.br/service/?filiacao=%s&cep=%s&formato=json"
|
56
|
+
PLACEHOLDER_METHODS = {
|
57
|
+
estado: :uf,
|
58
|
+
type: :tipo,
|
59
|
+
state: :uf,
|
60
|
+
city: :cidade,
|
61
|
+
neighborhood: :bairro,
|
62
|
+
street: :descricao,
|
63
|
+
rua: :descricao
|
64
|
+
}
|
65
|
+
|
66
|
+
class << self
|
67
|
+
# Removes all non-numeric caracters from the zip_code argument
|
68
|
+
# and limit it to 8 caracters
|
69
|
+
def parse_zip_code(zip_code)
|
70
|
+
return zip_code.to_s.gsub(/([^0-9]+)/,"")[0...8]
|
71
|
+
end
|
50
72
|
end
|
51
73
|
|
52
|
-
def
|
53
|
-
|
74
|
+
def initialize(token)
|
75
|
+
@token = token
|
54
76
|
end
|
55
77
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
78
|
+
def get_address(zip_code)
|
79
|
+
uri = URI(BASE_URL % [self.token, CepFacil::API.parse_zip_code(zip_code)])
|
80
|
+
content = Net::HTTP.get(uri)
|
81
|
+
|
82
|
+
result = JSON.parse content
|
83
|
+
|
84
|
+
address = CepFacil::Address.new(
|
85
|
+
result["CEP"], result["LogradouroTipo"],
|
86
|
+
result["Cidade"], result["UF"], result["Bairro"], result["Logradouro"])
|
62
87
|
end
|
63
88
|
|
64
|
-
alias :address :full_format
|
65
89
|
end
|
66
90
|
end
|
data/lib/cep_facil/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module CepFacil
|
2
|
-
VERSION = "
|
3
|
-
end
|
2
|
+
VERSION = "2.0.0" #:nodoc:
|
3
|
+
end
|
data/spec/cep_facil_spec.rb
CHANGED
@@ -4,65 +4,74 @@ require File.expand_path('spec/spec_helper')
|
|
4
4
|
describe CepFacil do
|
5
5
|
before(:each) do
|
6
6
|
@token = "0E2ACA03-FC7F-4E87-9046-A8C46637BA9D"
|
7
|
+
@conn = CepFacil::API.new @token
|
7
8
|
end
|
8
9
|
|
9
10
|
it "has a version" do
|
10
11
|
CepFacil::VERSION.should =~ /^\d+\.\d+\.\d+$/
|
11
12
|
end
|
12
13
|
|
14
|
+
it "can authenticate" do
|
15
|
+
@conn.should_not be_nil
|
16
|
+
end
|
17
|
+
|
13
18
|
it "can fetch an address from a CEP" do
|
14
|
-
cep = "
|
19
|
+
cep = "53416-540"
|
15
20
|
|
16
|
-
address =
|
21
|
+
address = @conn.get_address(cep)
|
17
22
|
address.should_not be_nil
|
18
23
|
|
19
|
-
address.type.should eql("
|
20
|
-
address.city.should eql("
|
24
|
+
address.type.should eql("RUA")
|
25
|
+
address.city.should eql("PAULISTA")
|
21
26
|
end
|
22
27
|
|
23
28
|
it "works with non formatted zip codes (CEPs)" do
|
24
|
-
cep = "
|
25
|
-
address =
|
29
|
+
cep = "53416540"
|
30
|
+
address = @conn.get_address(cep)
|
26
31
|
address.should_not be_nil
|
27
32
|
end
|
28
33
|
|
29
34
|
it "works even with zip codes (CEPs) stored as integers" do
|
30
35
|
cep = 53417540
|
31
|
-
address =
|
36
|
+
address = @conn.get_address(cep)
|
32
37
|
address.should_not be_nil
|
33
38
|
end
|
34
39
|
|
35
40
|
it "can get all 6 attributes (cep, type, state, city, neighborhood, street) from a given CEP" do
|
36
41
|
cep = "52060-010"
|
37
|
-
address =
|
42
|
+
address = @conn.get_address(cep)
|
38
43
|
|
39
|
-
address.
|
40
|
-
address.type.should eql("
|
44
|
+
address.zip_code.should eql("52060010")
|
45
|
+
address.type.should eql("RUA")
|
41
46
|
address.state.should eql("PE")
|
42
|
-
address.city.should eql("
|
43
|
-
address.neighborhood.should eql("
|
44
|
-
address.street.should include("
|
47
|
+
address.city.should eql("RECIFE")
|
48
|
+
address.neighborhood.should eql("PARNAMIRIM")
|
49
|
+
address.street.should include("JOÃO TUDE DE MELO")
|
45
50
|
end
|
46
51
|
|
47
52
|
it "can return a string with the full address" do
|
48
53
|
cep = "53417-540"
|
49
54
|
|
50
|
-
address =
|
51
|
-
|
55
|
+
address = @conn.get_address(cep)
|
52
56
|
full_version = address.full_format
|
53
57
|
|
54
58
|
full_version.should_not be_nil
|
55
|
-
full_version.should eql("Rua Panelas, Paulista - PE, Brasil")
|
56
59
|
end
|
57
60
|
|
58
61
|
it "handles correct encoding" do
|
59
62
|
cep = "79005-340"
|
60
63
|
|
61
|
-
address =
|
64
|
+
address = @conn.get_address(cep)
|
62
65
|
|
63
|
-
address.neighborhood.should eql("
|
64
|
-
address.street.should eql("
|
66
|
+
address.neighborhood.should eql("AMAMBAÍ")
|
67
|
+
address.street.should eql("CORONEL CAMISÃO")
|
65
68
|
end
|
66
69
|
|
67
|
-
|
70
|
+
it "can tell if a address is valid" do
|
71
|
+
cep = "79005-340"
|
72
|
+
|
73
|
+
address = @conn.get_address(cep)
|
74
|
+
address.valid?.should be_true
|
75
|
+
end
|
68
76
|
|
77
|
+
end
|
metadata
CHANGED
@@ -1,48 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cep_facil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
- Rodrigo Alves
|
7
|
+
- Rodrigo Alves
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-07-06 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 10.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
20
25
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
26
|
+
version: 10.1.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.8.0
|
22
34
|
type: :runtime
|
23
35
|
prerelease: false
|
24
36
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
37
|
requirements:
|
27
|
-
- -
|
38
|
+
- - ~>
|
28
39
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
40
|
+
version: 1.8.0
|
30
41
|
- !ruby/object:Gem::Dependency
|
31
42
|
name: rspec
|
32
43
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
44
|
requirements:
|
35
45
|
- - ~>
|
36
46
|
- !ruby/object:Gem::Version
|
37
|
-
version: 2.
|
47
|
+
version: 2.13.0
|
38
48
|
type: :development
|
39
49
|
prerelease: false
|
40
50
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
51
|
requirements:
|
43
52
|
- - ~>
|
44
53
|
- !ruby/object:Gem::Version
|
45
|
-
version: 2.
|
54
|
+
version: 2.13.0
|
46
55
|
description: Wrapper Ruby para o serviço cepfacil.com.br
|
47
56
|
email:
|
48
57
|
- rodrigovieira1994@gmail.com
|
@@ -61,28 +70,32 @@ files:
|
|
61
70
|
- spec/cep_facil_spec.rb
|
62
71
|
- spec/spec_helper.rb
|
63
72
|
homepage: http://github.com/rodrigoalvesvieira/cep_facil
|
64
|
-
licenses:
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
65
76
|
post_install_message:
|
66
|
-
rdoc_options:
|
77
|
+
rdoc_options:
|
78
|
+
- --title
|
79
|
+
- Wrapper Ruby para a API do CepFacil
|
80
|
+
- --main
|
81
|
+
- README.md
|
67
82
|
require_paths:
|
68
83
|
- lib
|
69
84
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
85
|
requirements:
|
72
|
-
- -
|
86
|
+
- - '>='
|
73
87
|
- !ruby/object:Gem::Version
|
74
88
|
version: '0'
|
75
89
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
90
|
requirements:
|
78
|
-
- -
|
91
|
+
- - '>='
|
79
92
|
- !ruby/object:Gem::Version
|
80
93
|
version: '0'
|
81
94
|
requirements: []
|
82
95
|
rubyforge_project: cep_facil
|
83
|
-
rubygems_version:
|
96
|
+
rubygems_version: 2.0.3
|
84
97
|
signing_key:
|
85
|
-
specification_version:
|
98
|
+
specification_version: 4
|
86
99
|
summary: Wrapper para o serviço cepfacil.com.br
|
87
100
|
test_files:
|
88
101
|
- spec/cep_facil_spec.rb
|