bscf-core 0.4.9 → 0.4.91

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: c14a03202265c747f95062f12f60fc41e2e5bebc1caa9946bf985b99d7abab7e
4
- data.tar.gz: 116fb2ffdbd99d4bb5f83b1c93d9bf7bf9c24a08c37810a9136daf9d45d49ee8
3
+ metadata.gz: ee63abaa5257e9b71f51f6ad8579906148b2c41f83e9f445b46db78f5bd374ef
4
+ data.tar.gz: a9852a7795f3bddba6975aede550472d2e6da1531a37fca4901e75b5354233f7
5
5
  SHA512:
6
- metadata.gz: fd3edce59b7a9601f74161fc59ae5c7b0b557be5c5091663194fee7fec6ac95bcd61b107dfcb985c36d676e7bf57bb4df52b2858c60e0cd819da30ae709c1432
7
- data.tar.gz: fddfacc1d22e9fcec199d9b65c159952b966a878d14068e4630c3d631e284df8e2d3d42dc7c701d4246bdb1b505f6f68caecea8753425e6f060bbd49e13639f7
6
+ metadata.gz: 9c5f71f28c4384b72e5de37041fbf50b8005153df6a0ca56405876c7df5b4283432b086ea0d4bf4cd9477e7af3adccde5fe91c275a47a5361b711dd807039a55
7
+ data.tar.gz: 94cbe632f83df4086dc54c1a39868e962d1587765188065fffd6c28b4803ae21c319aa925189002cf913e9c651ff153de61f665bf0f184b10ef2f37a8f7d04ac
@@ -1,5 +1,3 @@
1
- require "httparty"
2
-
3
1
  module Bscf
4
2
  module Core
5
3
  class GebetaMapsService
@@ -21,8 +19,11 @@ module Bscf
21
19
  destinations_str = destinations.map { |lat, lon| "{#{lat},#{lon}}" }.join(",")
22
20
  json_param = "[#{destinations_str}]"
23
21
 
24
- url = "https://mapapi.gebeta.app/api/route/onm?origin=#{origin_str}&json=#{json_param}&apiKey=#{@api_key}"
25
- response = HTTParty.get(url)
22
+ response = self.class.get("/route/onm", query: {
23
+ origin: origin_str,
24
+ json: json_param,
25
+ apiKey: @api_key
26
+ })
26
27
 
27
28
  handle_response(response)
28
29
  end
@@ -33,7 +34,7 @@ module Bscf
33
34
  if response.success?
34
35
  JSON.parse(response.body)
35
36
  else
36
- Rails.logger.error("Gebeta Maps API error: #{response.code} - #{response.body}")
37
+ Rails.logger.error("[GebetaMapsService] Request failed: #{response.code} - #{response.body}")
37
38
  {}
38
39
  end
39
40
  end
@@ -1,5 +1,5 @@
1
1
  module Bscf
2
2
  module Core
3
- VERSION = "0.4.9"
3
+ VERSION = "0.4.91"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bscf-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Asrat