lib/api_proxy/config.rb in api_proxy-0.1.3 vs lib/api_proxy/config.rb in api_proxy-0.2.3
- old
+ new
@@ -2,31 +2,27 @@
module ApiProxy
class Config
attr_accessor :api_key,
:api_secret,
- :url_scheme,
- :api_host,
- :api_port,
- :api_prefix,
+ :api_url,
:request_starts_with,
:request_allowed,
:custom_headers,
:reject_params
def initialize
load_defaults
end
+ private
+
def load_defaults
@api_key = 'key'
@api_secret = 'secret'
- @url_scheme = 'http'
- @api_host = 'localhost'
- @api_port = 3000
+ @api_url = 'http://localhost:3000/api/v1'
- @api_prefix = '/api/v1/'
@request_starts_with = '/_ts'
@request_allowed = ->(_env) { true }
@custom_headers = ->(_env) { {} }