google-cloud-dlp 1.6.2 → 1.8.0

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: c9a237ff9ae39e4ed4b5b0a21bc2a041e6e53e2ad7223d589bda30d46324d7e3
4
- data.tar.gz: 1fd59051a80003497e58d5e8bcd210bef412ca9ac4bec2af09c48540418e9c78
3
+ metadata.gz: c93d948cb57e016cdcd8490224c9585c0e702df051ae62db4c38e33030691a3a
4
+ data.tar.gz: a698f04f2aec8d1ae6ee8d7744fa93b527dd2220af0b578aee6eeb79aef27ea0
5
5
  SHA512:
6
- metadata.gz: c3be86e35bc8645745e89676446c005283b1a6b05bb6973ce8fee1bac01528751e851d63f3ca37ec9bb2747f137185b637136f6f7b9a792e777a8c4d83a24aa8
7
- data.tar.gz: 3f9daa1de989ab23a1595680166003e362329b19efad6b5fbaaadb5c75acb7767dfd668b7c4e58433190055f0cdb090b63433ae9203918eee199afc61fdaae21
6
+ metadata.gz: 5315b457c8a605f98fc1f56a008a0393f857bc7ea7d77b059aae2f0d16c581747123f2f894da83f16b1f160d9fa1c96f8be9bab1e9a9987e5becc0c8b46b0b76
7
+ data.tar.gz: e40c8dc5f7af8e82b32fc01460bac717162eb80bdbcf7cb75829e97e5b7e9573726b8d250ad6e3f486da736427605c9071d09e5254bdc554b0a98b50404cd95a
data/README.md CHANGED
@@ -42,9 +42,39 @@ and includes substantial interface changes. Existing code written for earlier
42
42
  versions of this library will likely require updates to use this version.
43
43
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
44
44
 
45
+ ## Debug Logging
46
+
47
+ This library comes with opt-in Debug Logging that can help you troubleshoot
48
+ your application's integration with the API. When logging is activated, key
49
+ events such as requests and responses, along with data payloads and metadata
50
+ such as headers and client configuration, are logged to the standard error
51
+ stream.
52
+
53
+ **WARNING:** Client Library Debug Logging includes your data payloads in
54
+ plaintext, which could include sensitive data such as PII for yourself or your
55
+ customers, private keys, or other security data that could be compromising if
56
+ leaked. Always practice good data hygiene with your application logs, and follow
57
+ the principle of least access. Google also recommends that Client Library Debug
58
+ Logging be enabled only temporarily during active debugging, and not used
59
+ permanently in production.
60
+
61
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
62
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
63
+ list of client library gem names. This will select the default logging behavior,
64
+ which writes logs to the standard error stream. On a local workstation, this may
65
+ result in logs appearing on the console. When running on a Google Cloud hosting
66
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
67
+ results in logs appearing alongside your application logs in the
68
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
69
+
70
+ Debug logging also requires that the versioned clients for this service be
71
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
72
+ working, try updating the versioned clients in your bundle or installed gems:
73
+ [google-cloud-dlp-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-dlp-v2/latest).
74
+
45
75
  ## Supported Ruby Versions
46
76
 
47
- This library is supported on Ruby 2.7+.
77
+ This library is supported on Ruby 3.0+.
48
78
 
49
79
  Google provides official support for Ruby versions that are actively supported
50
80
  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 Dlp
23
- VERSION = "1.6.2"
23
+ VERSION = "1.8.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,15 +58,16 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
- # ## About DlpService
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the DlpService service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::Dlp.dlp_service_available?}.
62
65
  #
63
- # The Cloud Data Loss Prevention (DLP) API is a service that allows clients
64
- # to detect the presence of Personally Identifiable Information (PII) and other
65
- # privacy-sensitive data in user-supplied, unstructured data streams, like text
66
- # blocks or images.
67
- # The service also includes methods for sensitive data redaction and
68
- # scheduling of data scans on Google Cloud Platform based data sets.
66
+ # ## About DlpService
69
67
  #
68
+ # Sensitive Data Protection provides access to a powerful sensitive data
69
+ # inspection, classification, and de-identification platform that works
70
+ # on text, images, and Google Cloud storage repositories.
70
71
  # To learn more about concepts and find how-to guides see
71
72
  # https://cloud.google.com/sensitive-data-protection/docs/.
72
73
  #
@@ -87,6 +88,37 @@ module Google
87
88
  service_module.const_get(:Client).new(&block)
88
89
  end
89
90
 
91
+ ##
92
+ # Determines whether the DlpService service is supported by the current client.
93
+ # If true, you can retrieve a client object by calling {Google::Cloud::Dlp.dlp_service}.
94
+ # If false, that method will raise an exception. This could happen if the given
95
+ # API version does not exist or does not support the DlpService service,
96
+ # or if the versioned client gem needs an update to support the DlpService service.
97
+ #
98
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
99
+ # Defaults to `:v2`.
100
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
101
+ # @return [boolean] Whether the service is available.
102
+ #
103
+ def self.dlp_service_available? version: :v2, transport: :grpc
104
+ require "google/cloud/dlp/#{version.to_s.downcase}"
105
+ package_name = Google::Cloud::Dlp
106
+ .constants
107
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
108
+ .first
109
+ return false unless package_name
110
+ service_module = Google::Cloud::Dlp.const_get package_name
111
+ return false unless service_module.const_defined? :DlpService
112
+ service_module = service_module.const_get :DlpService
113
+ if transport == :rest
114
+ return false unless service_module.const_defined? :Rest
115
+ service_module = service_module.const_get :Rest
116
+ end
117
+ service_module.const_defined? :Client
118
+ rescue ::LoadError
119
+ false
120
+ end
121
+
90
122
  ##
91
123
  # Configure the google-cloud-dlp library.
92
124
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-dlp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.8.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-09 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
@@ -63,7 +62,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
63
62
  licenses:
64
63
  - Apache-2.0
65
64
  metadata: {}
66
- post_install_message:
67
65
  rdoc_options: []
68
66
  require_paths:
69
67
  - lib
@@ -71,15 +69,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
69
  requirements:
72
70
  - - ">="
73
71
  - !ruby/object:Gem::Version
74
- version: '2.7'
72
+ version: '3.0'
75
73
  required_rubygems_version: !ruby/object:Gem::Requirement
76
74
  requirements:
77
75
  - - ">="
78
76
  - !ruby/object:Gem::Version
79
77
  version: '0'
80
78
  requirements: []
81
- rubygems_version: 3.5.6
82
- signing_key:
79
+ rubygems_version: 3.6.2
83
80
  specification_version: 4
84
81
  summary: API Client library for the Cloud Data Loss Prevention (DLP) API
85
82
  test_files: []