br_zip_code 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e79ef9c1f531d2282eb08fd11b2fe38adceef8d
4
- data.tar.gz: 944ff38d24c9906ff34094dcaf060ac7fe6f5e80
3
+ metadata.gz: 6f3c5a411b0fa89f42d91f21f1985c564d465576
4
+ data.tar.gz: 21c843c843fd88c1522446222716cfef27cc6667
5
5
  SHA512:
6
- metadata.gz: 41e98cc17f1b208db793b303066df1e65119eeed29eed641ae2ed36d35266777beea4fb84ebff84661abecf9875e524d75e94163e24bc47c0b27b36ee5031ac3
7
- data.tar.gz: fb93eeb12e8c44f5c38b3f7e6ee122aab9ef445249eef59619a862049ac7271bd7b36a263835825f226fa2e51c05ff93aa466785a539f6962cbfc2874c3ab826
6
+ metadata.gz: d256e8b645d00cb600381bc7eebe1dc0e34b157ec2af6616e846e237b0aa1f2105eb297fd21ffb93bd6c4e345a021dd751a1c6e868c45bf5bd8122f73f646a9b
7
+ data.tar.gz: 118455b03a61583785f5c2b630dcbdf8ffe04baa64c0eec8e269fb7cf4fbe6ea86541edc7f5537ef78f2abe5075a4ba081b863db155f9f6c3104187d86185685
@@ -38,7 +38,7 @@ module BrZipCode
38
38
  end
39
39
 
40
40
  def to_hash
41
- return nil unless self.valid? and not self.response_body.nil?
41
+ return nil unless self.valid?
42
42
 
43
43
  cep_body = response_body['ceplivre']['cep']
44
44
 
@@ -2,7 +2,7 @@ module BrZipCode
2
2
  class Service
3
3
  class CorreioControl < BrZipCode::Service
4
4
  def to_hash
5
- return nil unless self.valid? and not self.response_body.nil?
5
+ return nil unless self.valid?
6
6
 
7
7
  {
8
8
  street: self.response_body['logradouro'],
@@ -2,7 +2,7 @@ module BrZipCode
2
2
  class Service
3
3
  class Postmon < BrZipCode::Service
4
4
  def to_hash
5
- return nil unless self.valid? and not self.response_body.nil?
5
+ return nil unless self.valid?
6
6
 
7
7
  {
8
8
  street: self.response_body['logradouro'],
@@ -2,7 +2,7 @@ module BrZipCode
2
2
  class Service
3
3
  class RepublicaVirtual < BrZipCode::Service
4
4
  def to_hash
5
- return nil unless self.valid? and not self.response_body.nil?
5
+ return nil unless self.valid?
6
6
 
7
7
  {
8
8
  street: [self.response_body['tipo_logradouro'],self.response_body['logradouro']].join(' '),
@@ -2,7 +2,7 @@ module BrZipCode
2
2
  class Service
3
3
  class Viacep < BrZipCode::Service
4
4
  def to_hash
5
- return nil unless self.valid? and not self.response_body.nil?
5
+ return nil unless self.valid?
6
6
 
7
7
  {
8
8
  street: self.response_body['logradouro'],
@@ -1,3 +1,3 @@
1
1
  module BrZipCode
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
data/lib/br_zip_code.rb CHANGED
@@ -29,7 +29,7 @@ module BrZipCode
29
29
  end
30
30
 
31
31
  def self.timeout
32
- self.configuration.timeout || 3
32
+ self.configuration.timeout || 5
33
33
  end
34
34
 
35
35
  def self.attempts
@@ -66,9 +66,9 @@ module BrZipCode
66
66
  class_names = [
67
67
  'Postmon',
68
68
  'Viacep',
69
- 'CorreioControl',
70
69
  'RepublicaVirtual',
71
- 'CepLivre'
70
+ 'CepLivre',
71
+ 'CorreioControl'
72
72
  ]
73
73
 
74
74
  class_names.delete('CepLivre') if ENV['CEP_LIVRE_TOKEN'].nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: br_zip_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariel Schvartz
@@ -135,5 +135,5 @@ rubyforge_project:
135
135
  rubygems_version: 2.4.6
136
136
  signing_key:
137
137
  specification_version: 4
138
- summary: BR Zip Code - 1.0.2
138
+ summary: BR Zip Code - 1.0.3
139
139
  test_files: []