google-cloud-oracle_database 0.1.0 → 0.2.1

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: ab72355f8934573d5224cb700ed6b90899832ac7b2531e0fd205e53f9f6b0f5c
4
- data.tar.gz: 6f98f44581e69c13c1bb2677ec31ee708e7be915a4c2aca9595698437e00556d
3
+ metadata.gz: ca2b4b0c8f233c04ab5a893d5a0666438ea65a92e253b6ab47314d1dade33a3d
4
+ data.tar.gz: b3ce7dbb6b7ae8bb4848613d4debd787be62d909b8f3304ed4321b1df09cb6e7
5
5
  SHA512:
6
- metadata.gz: 878b61c8e08494b1f29a3e0aaf20dee48103796133aa2de76d1bfb960c60eba204d00db2fdb4c007ea89548f01d9c54822a4580dce0553d2ec82a744b2149ced
7
- data.tar.gz: 57f0683da2c29a32546ac715d425b87b3ee81a95895433ecc4536c9f3f9f82b8cd8f7f0ad0d84f5954e210c20a4cc0dee7e3b22841dcc1cb338f66fb6c52724d
6
+ metadata.gz: 3391d8eaac2c44363cf26501cd3e160b4de46b6f4ccf0ac201eed9a7510b98457172ea996278be820d452cda6941cbf1381d2dcafa66e35721251433ac782b63
7
+ data.tar.gz: c24f9f737d9091370d50ea739424ee4e46bc25a5ae462145c983a7ddfc43394c4a7fa30bd0f5810701d8e085e2a7a36ab24be667deaa685993a0271142384f88
data/README.md CHANGED
@@ -7,7 +7,7 @@ The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle dat
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-cloud-oracle_database-v*`.
9
9
  The gem `google-cloud-oracle_database` is the main client library that brings the
10
- verisoned gems in as dependencies, and provides high-level methods for
10
+ versioned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
@@ -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/oracledatabase.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-cloud-oracle_database-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-oracle_database-v1/latest).
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
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module OracleDatabase
23
- VERSION = "0.1.0"
23
+ VERSION = "0.2.1"
24
24
  end
25
25
  end
26
26
  end
@@ -55,6 +55,11 @@ module Google
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
57
  #
58
+ # Raises an exception if the currently installed versioned client gem for the
59
+ # given API version does not support the OracleDatabase service.
60
+ # You can determine whether the method will succeed by calling
61
+ # {Google::Cloud::OracleDatabase.oracle_database_available?}.
62
+ #
58
63
  # ## About OracleDatabase
59
64
  #
60
65
  # Service describing handlers for resources
@@ -74,6 +79,34 @@ module Google
74
79
  service_module.const_get(:Rest).const_get(:Client).new(&block)
75
80
  end
76
81
 
82
+ ##
83
+ # Determines whether the OracleDatabase service is supported by the current client.
84
+ # If true, you can retrieve a client object by calling {Google::Cloud::OracleDatabase.oracle_database}.
85
+ # If false, that method will raise an exception. This could happen if the given
86
+ # API version does not exist or does not support the OracleDatabase service,
87
+ # or if the versioned client gem needs an update to support the OracleDatabase service.
88
+ #
89
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
90
+ # Defaults to `:v1`.
91
+ # @return [boolean] Whether the service is available.
92
+ #
93
+ def self.oracle_database_available? version: :v1
94
+ require "google/cloud/oracle_database/#{version.to_s.downcase}"
95
+ package_name = Google::Cloud::OracleDatabase
96
+ .constants
97
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
98
+ .first
99
+ return false unless package_name
100
+ service_module = Google::Cloud::OracleDatabase.const_get package_name
101
+ return false unless service_module.const_defined? :OracleDatabase
102
+ service_module = service_module.const_get :OracleDatabase
103
+ return false unless service_module.const_defined? :Rest
104
+ service_module = service_module.const_get :Rest
105
+ service_module.const_defined? :Client
106
+ rescue ::LoadError
107
+ false
108
+ end
109
+
77
110
  ##
78
111
  # Configure the google-cloud-oracle_database library.
79
112
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-oracle_database
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -62,7 +61,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
61
  licenses:
63
62
  - Apache-2.0
64
63
  metadata: {}
65
- post_install_message:
66
64
  rdoc_options: []
67
65
  require_paths:
68
66
  - lib
@@ -70,15 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
68
  requirements:
71
69
  - - ">="
72
70
  - !ruby/object:Gem::Version
73
- version: '2.7'
71
+ version: '3.0'
74
72
  required_rubygems_version: !ruby/object:Gem::Requirement
75
73
  requirements:
76
74
  - - ">="
77
75
  - !ruby/object:Gem::Version
78
76
  version: '0'
79
77
  requirements: []
80
- rubygems_version: 3.5.6
81
- signing_key:
78
+ rubygems_version: 3.6.8
82
79
  specification_version: 4
83
80
  summary: The Oracle Database@Google Cloud API provides a set of APIs to manage Oracle
84
81
  database services, such as Exadata and Autonomous Databases.