dscf-marketplace 0.6.6 → 0.6.7
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0fb785dc987a200c5acd58677a9ccf1f68fac21f6f675ede6e15bde883d4fcf8
|
|
4
|
+
data.tar.gz: f1042bc614f9be92b3a094498ed8ac576b83f82b14f524f21a60a79560dc6fda
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88db2f8a555cb9b36b8f18a5b3d086ae78887be193d49875bef3a0dd72279eec23402c981320ce13f7356138b05def4190c94b2b7b5a2bcae8509315adb08fdf
|
|
7
|
+
data.tar.gz: ff4a76bfb4405405f64d389e2bfd4f1a9c297671b56b3280b948c34aab82dc50576cd30b18e0b68cf399b14bba9eea3f2ff3cd5115ac741a2eb1ed4bc2b983d8
|
|
@@ -5,7 +5,7 @@ module Dscf
|
|
|
5
5
|
:vehicle_type, :estimated_delivery_price, :actual_delivery_price,
|
|
6
6
|
:estimated_delivery_time, :actual_delivery_time, :delivery_notes,
|
|
7
7
|
:created_at, :updated_at, :total_items, :total_orders, :delivery_duration,
|
|
8
|
-
:on_time?, :all_handoffs_confirmed?, :total_stops
|
|
8
|
+
:on_time?, :all_handoffs_confirmed?, :total_stops, :optimized_route
|
|
9
9
|
|
|
10
10
|
belongs_to :driver
|
|
11
11
|
belongs_to :pickup_address
|
|
@@ -8,7 +8,15 @@ module Dscf
|
|
|
8
8
|
debug_output $stdout if Rails.env.development?
|
|
9
9
|
|
|
10
10
|
def initialize(api_key: ENV["GEBETA_MAPS_API_KEY"])
|
|
11
|
-
|
|
11
|
+
# Sanitize the key: strip whitespace and remove surrounding quotes if any
|
|
12
|
+
@api_key = api_key.to_s.strip.gsub(/\A['"]+|['"]+\z/, "")
|
|
13
|
+
|
|
14
|
+
if @api_key.blank?
|
|
15
|
+
Rails.logger.error "[GebetaService] GEBETA_MAPS_API_KEY is missing or blank"
|
|
16
|
+
else
|
|
17
|
+
masked_key = "#{@api_key[0...4]}...#{@api_key[-4..-1]}" if @api_key.length > 8
|
|
18
|
+
Rails.logger.info "[GebetaService] Initialized with key: #{masked_key || 'too short'}, length: #{@api_key.length}"
|
|
19
|
+
end
|
|
12
20
|
end
|
|
13
21
|
|
|
14
22
|
# Traveling Salesperson Solver
|