rail-locator-api 1.0.32 → 1.0.34

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: 7315b4af22141e0e9be322f9dbbb0a2d8c131cc580e97a62b7e03a574c72d5c3
4
- data.tar.gz: 5540469e2cb100a198f44c6e350669f86c9c388e18179f8035753dfd2770f271
3
+ metadata.gz: ccb40fb17c07a91468660c4bf642e94c902c6468395c9f66a91a01bd186e122d
4
+ data.tar.gz: d06c77b47de8ee341e08945dcd229440efc615fd6456d80832c7e1178344cdf1
5
5
  SHA512:
6
- metadata.gz: 2a613fd0f13680554df097b4a1bebb75cc269ea597310288537bfa48b625a756ac9f94ce34be255e93e6e46a626bd0e9e8488899ea40f5b937702b66a744b529
7
- data.tar.gz: 6ab777ea3b88afa63cd62b7c89d59039fbbdbec79436888c0e57b58aab7232330a885445afc4ff643a85015d8cd63be8c8e825de3719a235d7cfe4aaa1c31e2d
6
+ metadata.gz: 5ed439487c1336378a567afdccb504fbdfc4e979a5d3d71328eef300bdc7fe871ba589a109769cb4e135c204ed0b0e1d2a9b91432e909920bf4205e8059891ee
7
+ data.tar.gz: eb0964dcc6902a1758602daad125b961a5a8dca96d3e65d018dd638e24ecae19426bfd1fcaa48015db3772e6b36bfd16b96b021a0be7866264828d82a8cdd06a
@@ -8,6 +8,7 @@ module RailLocatorApi
8
8
  def post(params: nil, headers: nil, format: nil, body: {})
9
9
  validate_api_key
10
10
  begin
11
+ headers ||= {}
11
12
  if is_multipart?(body)
12
13
  if self.api_auth_method == :base64
13
14
  headers['Authorization'] = "Basic " + Base64::encode64("#{self.api_user_email}:#{self.api_user_password}")
@@ -273,6 +274,7 @@ module RailLocatorApi
273
274
  end
274
275
 
275
276
  def is_multipart?(body, result=false)
277
+ return false if body == {}
276
278
  if body.is_a?(Hash)
277
279
  body.inject({}) do |acc, kv|
278
280
  result = is_multipart?(kv.last, result)
@@ -1,3 +1,3 @@
1
1
  module RailLocatorApi
2
- VERSION = "1.0.32"
2
+ VERSION = "1.0.34"
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: 1.0.32
4
+ version: 1.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov