br_zip_code 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 075383c67c78de0de27d6b44ef06aec351c67d90
4
- data.tar.gz: 0dd1031c8ca914cbae3dd44dd2ebeab8e07addbb
3
+ metadata.gz: 1e79ef9c1f531d2282eb08fd11b2fe38adceef8d
4
+ data.tar.gz: 944ff38d24c9906ff34094dcaf060ac7fe6f5e80
5
5
  SHA512:
6
- metadata.gz: eae3772861ab7b06e759e17f2d7ed79ea965b9a367e8371e5bdeeba84d92583a63de0f64dc37660a2b01b38914a72f619ddd003ece7554d0cc46bee55f2b92ea
7
- data.tar.gz: e4f2fa8a842fc1dfa8e7310fc41ccbaf166a50995722f1500c03ad3862f9ab2b1c2a5ae91609a247bd3ab520499d537eca0b97d4a7f50e600e1c9806d722afee
6
+ metadata.gz: 41e98cc17f1b208db793b303066df1e65119eeed29eed641ae2ed36d35266777beea4fb84ebff84661abecf9875e524d75e94163e24bc47c0b27b36ee5031ac3
7
+ data.tar.gz: fb93eeb12e8c44f5c38b3f7e6ee122aab9ef445249eef59619a862049ac7271bd7b36a263835825f226fa2e51c05ff93aa466785a539f6962cbfc2874c3ab826
@@ -1,7 +1,5 @@
1
- require 'rails'
2
-
3
1
  module BrZipCode
4
- class ZipCodeController < ApplicationController::Base
2
+ class ZipCodeController < ActionController::Base
5
3
  def show
6
4
  begin
7
5
  response = BrZipCode.get(params[:zip_code] || params[:id])
data/lib/br_zip_code.rb CHANGED
@@ -63,13 +63,17 @@ module BrZipCode
63
63
 
64
64
  @services = []
65
65
 
66
- [
66
+ class_names = [
67
67
  'Postmon',
68
68
  'Viacep',
69
69
  'CorreioControl',
70
70
  'RepublicaVirtual',
71
71
  'CepLivre'
72
- ].each do |class_name|
72
+ ]
73
+
74
+ class_names.delete('CepLivre') if ENV['CEP_LIVRE_TOKEN'].nil?
75
+
76
+ class_names.each do |class_name|
73
77
  @services.push Module.const_get("BrZipCode::Service::#{class_name}")
74
78
  end
75
79
 
@@ -1,3 +1,3 @@
1
1
  module BrZipCode
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
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.1
4
+ version: 1.0.2
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.1
138
+ summary: BR Zip Code - 1.0.2
139
139
  test_files: []