google-cloud-cloud_dms 1.3.0 → 1.4.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: e08fb0243a82dc49d6a11b2155e3cfe6362c770200dbfb4cf008da4828a76407
4
- data.tar.gz: 601d42a8f80b85a5cfa46c223ed3c50ff7661a423fc1ad7fd7b7165dcc16bae7
3
+ metadata.gz: 66235c96c477db6368e078b95c3c0aa68b9683fdb3844d986cef52b99d890b96
4
+ data.tar.gz: 7f2d87f1b0a0696f300055d3dcfc21036bc5c44a45755ffad9e43a3462741fd1
5
5
  SHA512:
6
- metadata.gz: a72e9ea7b7d2ddb42f42fbb81b6c0519df8b730976c0f5e723f8424e087c77e1f96c95eec79d06785c0dc9a42ff883c450b3cbe05367890ae1198aaf7ba11a53
7
- data.tar.gz: 852301a462eeb3d89c12e9528101e6abb7ba0677bd25f7887971538633a5be2dd6c3efd3e566c09a3d8781b90f7c8e9f8a1c71040905626a61f05385ad5b0885
6
+ metadata.gz: 1b9790a98a2ada16dfac172cb892288a8f4cd704074231a209a69201f0bc6b6f218fef3cd840b09222affd19bd9821d199daea5f0d59d2fb3bbd6fea582c838e
7
+ data.tar.gz: 2bb00c9f4f949beeff504bbb0641ab53926add7c1f13b6821d520961b58b6c06a80bf51db5df69254d86ccd74bcdf361f491bddf66c8aa8a65aff24b9cd21c0c
data/README.md CHANGED
@@ -34,35 +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/datamigration.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
42
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
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-cloud-cloud_dms-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_dms-v1/latest).
62
66
 
63
67
  ## Supported Ruby Versions
64
68
 
65
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
66
70
 
67
71
  Google provides official support for Ruby versions that are actively supported
68
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module CloudDMS
23
- VERSION = "1.3.0"
23
+ VERSION = "1.4.0"
24
24
  end
25
25
  end
26
26
  end
@@ -56,6 +56,11 @@ module Google
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
58
  #
59
+ # Raises an exception if the currently installed versioned client gem for the
60
+ # given API version does not support the DataMigrationService service.
61
+ # You can determine whether the method will succeed by calling
62
+ # {Google::Cloud::CloudDMS.data_migration_service_available?}.
63
+ #
59
64
  # ## About DataMigrationService
60
65
  #
61
66
  # Database Migration service
@@ -75,6 +80,32 @@ module Google
75
80
  service_module.const_get(:Client).new(&block)
76
81
  end
77
82
 
83
+ ##
84
+ # Determines whether the DataMigrationService service is supported by the current client.
85
+ # If true, you can retrieve a client object by calling {Google::Cloud::CloudDMS.data_migration_service}.
86
+ # If false, that method will raise an exception. This could happen if the given
87
+ # API version does not exist or does not support the DataMigrationService service,
88
+ # or if the versioned client gem needs an update to support the DataMigrationService service.
89
+ #
90
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
91
+ # Defaults to `:v1`.
92
+ # @return [boolean] Whether the service is available.
93
+ #
94
+ def self.data_migration_service_available? version: :v1
95
+ require "google/cloud/cloud_dms/#{version.to_s.downcase}"
96
+ package_name = Google::Cloud::CloudDMS
97
+ .constants
98
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
99
+ .first
100
+ return false unless package_name
101
+ service_module = Google::Cloud::CloudDMS.const_get package_name
102
+ return false unless service_module.const_defined? :DataMigrationService
103
+ service_module = service_module.const_get :DataMigrationService
104
+ service_module.const_defined? :Client
105
+ rescue ::LoadError
106
+ false
107
+ end
108
+
78
109
  ##
79
110
  # Configure the google-cloud-cloud_dms library.
80
111
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-cloud_dms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.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-02-26 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-cloud_dms-v1
@@ -65,7 +64,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
65
64
  licenses:
66
65
  - Apache-2.0
67
66
  metadata: {}
68
- post_install_message:
69
67
  rdoc_options: []
70
68
  require_paths:
71
69
  - lib
@@ -73,15 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
71
  requirements:
74
72
  - - ">="
75
73
  - !ruby/object:Gem::Version
76
- version: '2.7'
74
+ version: '3.0'
77
75
  required_rubygems_version: !ruby/object:Gem::Requirement
78
76
  requirements:
79
77
  - - ">="
80
78
  - !ruby/object:Gem::Version
81
79
  version: '0'
82
80
  requirements: []
83
- rubygems_version: 3.5.6
84
- signing_key:
81
+ rubygems_version: 3.6.2
85
82
  specification_version: 4
86
83
  summary: API Client library for the Cloud Database Migration Service API
87
84
  test_files: []