google-maps-fleet_engine-delivery 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b3918364fc8047bd3c86781e52f31ed21b30c3381cd109aab67c59f96c3c918
4
- data.tar.gz: 60da7e5c587197f05d7b382fb2baf9491b1b2c4b775da5cf5f0be3a4eaa23a31
3
+ metadata.gz: cd0e391ffefbb1efe75aa45277fe8f7f24c89dbce7c2cfc3b1318d74e0869fd2
4
+ data.tar.gz: 196e11f0aef4946a415adbd74328fb798e60b3af64b0d6206fb7d01299101f10
5
5
  SHA512:
6
- metadata.gz: ec27db9c92934e04ce34beea4246bc92d2d2106de1105c3ba20e57d0925f86d95f672481d342878d173aefa1cee99e24a00b1ae555786a2afae471f9f2287a90
7
- data.tar.gz: 70ef438939fae9b207655185c37358b279448a2d195b24f9a7cc07f4b2dd3db3d33fb7d634bf7ead5f5dc8078a43054af6f5f49a250c849fdef1e309d371de36
6
+ metadata.gz: 221bbab78de71c4b6764f2a50743d07ef7cf4e000fc26abea5dcd751c12d6afedd95699773cb4460d9d29b007d71dd0ccceacdec93f636a942f160defa6101db
7
+ data.tar.gz: e17ee382b08b6dfe80d7b2066bebb3f4c3aa343ecbd6a7bee32ab8abe3fca39357e71f8b4d06ca3f9f3952f8309dd4fe2e1c78801c7e490b9436e640b2cfb818
data/README.md CHANGED
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/fleetengine.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-maps-fleet_engine-delivery-v1](https://rubydoc.info/gems/google-maps-fleet_engine-delivery-v1).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -21,7 +21,7 @@ module Google
21
21
  module Maps
22
22
  module FleetEngine
23
23
  module Delivery
24
- VERSION = "1.0.1"
24
+ VERSION = "1.1.0"
25
25
  end
26
26
  end
27
27
  end
@@ -41,6 +41,11 @@ module Google
41
41
  # You can also specify a different transport by passing `:rest` or `:grpc` in
42
42
  # the `transport` parameter.
43
43
  #
44
+ # Raises an exception if the currently installed versioned client gem for the
45
+ # given API version does not support the given transport of the DeliveryService service.
46
+ # You can determine whether the method will succeed by calling
47
+ # {Google::Maps::FleetEngine::Delivery.delivery_service_available?}.
48
+ #
44
49
  # ## About DeliveryService
45
50
  #
46
51
  # The Last Mile Delivery service.
@@ -61,6 +66,37 @@ module Google
61
66
  service_module = service_module.const_get(:Rest) if transport == :rest
62
67
  service_module.const_get(:Client).new(&block)
63
68
  end
69
+
70
+ ##
71
+ # Determines whether the DeliveryService service is supported by the current client.
72
+ # If true, you can retrieve a client object by calling {Google::Maps::FleetEngine::Delivery.delivery_service}.
73
+ # If false, that method will raise an exception. This could happen if the given
74
+ # API version does not exist or does not support the DeliveryService service,
75
+ # or if the versioned client gem needs an update to support the DeliveryService service.
76
+ #
77
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
78
+ # Defaults to `:v1`.
79
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
80
+ # @return [boolean] Whether the service is available.
81
+ #
82
+ def self.delivery_service_available? version: :v1, transport: :grpc
83
+ require "google/maps/fleet_engine/delivery/#{version.to_s.downcase}"
84
+ package_name = Google::Maps::FleetEngine::Delivery
85
+ .constants
86
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
87
+ .first
88
+ return false unless package_name
89
+ service_module = Google::Maps::FleetEngine::Delivery.const_get package_name
90
+ return false unless service_module.const_defined? :DeliveryService
91
+ service_module = service_module.const_get :DeliveryService
92
+ if transport == :rest
93
+ return false unless service_module.const_defined? :Rest
94
+ service_module = service_module.const_get :Rest
95
+ end
96
+ service_module.const_defined? :Client
97
+ rescue ::LoadError
98
+ false
99
+ end
64
100
  end
65
101
  end
66
102
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-maps-fleet_engine-delivery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-12 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -64,7 +63,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
64
63
  licenses:
65
64
  - Apache-2.0
66
65
  metadata: {}
67
- post_install_message:
68
66
  rdoc_options: []
69
67
  require_paths:
70
68
  - lib
@@ -72,15 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
70
  requirements:
73
71
  - - ">="
74
72
  - !ruby/object:Gem::Version
75
- version: '2.7'
73
+ version: '3.0'
76
74
  required_rubygems_version: !ruby/object:Gem::Requirement
77
75
  requirements:
78
76
  - - ">="
79
77
  - !ruby/object:Gem::Version
80
78
  version: '0'
81
79
  requirements: []
82
- rubygems_version: 3.5.6
83
- signing_key:
80
+ rubygems_version: 3.6.2
84
81
  specification_version: 4
85
82
  summary: Enables Fleet Engine for access to the On Demand Rides and Deliveries and
86
83
  Last Mile Fleet Solution APIs. Customer's use of Google Maps Content in the Cloud