rail-locator-api 0.1.31 → 0.1.33

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
  SHA256:
3
- metadata.gz: 33574469b6b170067b3d58342f93cb05e37e489f4fa545c509596865ab18db61
4
- data.tar.gz: 28f32f1bca4499066ef8616c28a19d034ec02de3847f859fd477e7a8fb3242d5
3
+ metadata.gz: f44c8ebe2596d7f03175522989e26bd54d1115e289330cfae7ec4b667439defb
4
+ data.tar.gz: 7ee33751cf6e02ad85ffd02e27c5026a90ce0e510f459476a26f62714377acbf
5
5
  SHA512:
6
- metadata.gz: 94ee04c1e1bfdc5571ba120ae75a4d3dd33a7193caad81de585c12bbb69e62a67bc54ed4da4628b102a1dece81bb404862bc1c0075e123dc26850c1a75f0eae8
7
- data.tar.gz: b29102d243faad074bfb6f61222c6d8479553e72110d8da9332cb0976c401f178a457e858626b0042765e233c2b8c3e88c6447d8a2cc7a7677a663899a00d231
6
+ metadata.gz: d03c4b4eb7811f69c619148319638554a8a16c2df41ac4544bc9169712850ebe3ab120933d202297512cd994e0b8f53561263974a1e18b6f1a5b0bc20493dcfb
7
+ data.tar.gz: 0bea1677fe6c007835ad62e10116930350adba98d4e0956d9926e7bd09089b54190c546a5ea187d2a15955330971000b6198068dbc4055197f7a5c41aaf6b21c
@@ -8,7 +8,7 @@ RailLocatorApi.setup do |config|
8
8
  config::register k.underscore.to_sym, v
9
9
  end
10
10
 
11
- config::Request.api_key ||= ENV['API_KEY']
11
+ #config::Request.api_key ||= ENV['API_KEY']
12
12
 
13
13
  config::Request.api_user_email ||= ENV['API_USER_EMAIL']
14
14
  config::Request.api_user_password ||= ENV['API_USER_PASSWORD']
@@ -17,5 +17,6 @@ RailLocatorApi.setup do |config|
17
17
  config::Request.open_timeout = 60
18
18
  config::Request.symbolize_keys = true
19
19
  config::Request.debug = false
20
+ config::Request.debug_options = { headers: true, bodies: false, errors: false, log_level: :info } # https://lostisland.github.io/faraday/middleware/logger
20
21
  end
21
22
  end
@@ -177,7 +177,7 @@ module RailLocatorApi
177
177
  faraday.response :raise_error
178
178
  faraday.adapter adapter
179
179
  if @request_builder.debug
180
- faraday.response :logger, @request_builder.logger, bodies: true
180
+ faraday.response :logger, @request_builder.logger, @request_builder.debug_options
181
181
  end
182
182
  end
183
183
  client
@@ -11,7 +11,9 @@ module RailLocatorApi
11
11
 
12
12
  def initialize(access_token: nil, refresh_token: nil, api_user_id: nil, api_key: nil, api_user_email: nil, api_user_password: nil,
13
13
  api_endpoint: nil, api_auth_method: nil, timeout: nil, open_timeout: nil, proxy: nil, ssl_options: nil,
14
- faraday_adapter: nil, symbolize_keys: false, debug: false, without_ratelimit: false, is_allow_access_to_coordinates: false,
14
+ faraday_adapter: nil, symbolize_keys: false, debug: false,
15
+ debug_options: { headers: true, bodies: false, errors: false, log_level: :info },
16
+ without_ratelimit: false, is_allow_access_to_coordinates: false,
15
17
  logger: nil, test: false)
16
18
 
17
19
  @path_parts = []
@@ -34,7 +36,7 @@ module RailLocatorApi
34
36
  @api_user_password = api_user_password || ENV['API_USER_PASSWORD'] || ""
35
37
  @api_endpoint = api_endpoint || self.class.api_endpoint
36
38
  @api_endpoint = RailLocatorApi::api_endpoint if @api_endpoint.nil?
37
- @api_auth_method = api_auth_method || DEFAULT_AUTH_METHOD
39
+ @api_auth_method = api_auth_method || RailLocatorApi::api_auth_method || DEFAULT_AUTH_METHOD
38
40
  @timeout = timeout || self.class.timeout || DEFAULT_TIMEOUT
39
41
  @open_timeout = open_timeout || self.class.open_timeout || DEFAULT_OPEN_TIMEOUT
40
42
  @proxy = proxy || self.class.proxy || ENV['RAIL_LOCATOR_API_PROXY']
@@ -42,6 +44,7 @@ module RailLocatorApi
42
44
  @faraday_adapter = faraday_adapter || self.class.faraday_adapter || Faraday.default_adapter
43
45
  @symbolize_keys = symbolize_keys || self.class.symbolize_keys || false
44
46
  @debug = debug || self.class.debug || false
47
+ @debug_options = debug_options || self.class.debug_options || { headers: true, bodies: false, errors: false, log_level: :info }
45
48
  @without_ratelimit = without_ratelimit || self.class.without_ratelimit
46
49
  @is_allow_access_to_coordinates = is_allow_access_to_coordinates || self.class.is_allow_access_to_coordinates
47
50
  @test = test || self.class.test || false
@@ -1,3 +1,3 @@
1
1
  module RailLocatorApi
2
- VERSION = "0.1.31"
2
+ VERSION = "0.1.33"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rail-locator-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.31
4
+ version: 0.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov