google-cloud-memorystore 0.1.0 → 1.0.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: cf313c33c0441a9301908378e43aabdd703589a4793f2eede3f72aaae946c6ce
4
- data.tar.gz: 9f994a4e65082843281f9bf700206d3be645cf8497eb0c2d4921c16e9c15ff0d
3
+ metadata.gz: 538f89ab8e4784c2d7b30176d590d0d5cf3d7b87c4c9fbcad9fab6a21fcbd784
4
+ data.tar.gz: aa420dbea135114a418fcc8284ba6d8ec2c999e8af3c80a7980dfa0485c4ae40
5
5
  SHA512:
6
- metadata.gz: f8dab7369fda993e368b4a95377b0b358a06279516b1566e339c0afbe105ebfed7c8d9c05a6684804dd092dc304106040f6647706befd4ad776a98769d1d966a
7
- data.tar.gz: fa24312bb20508e195a2a6a2ea325953f4b8733bf32411475491330134217f36c7433a6254f5ed8bd2904ea7f90d0697cdae3fbd1f89c67e96a25e45f7f57a18
6
+ metadata.gz: 761ee170f094a78e43b4027e0d3be17f83b3e53dbf9dbd8777eec5f3d6d939355cc9d6e2f498d4dfa402ea3530ba6bf6dd60f38a4f0f67c340e092636634089d
7
+ data.tar.gz: a70984f53aa6c49b45b9e44171380524c71993605b79590f1971c8b6398ffdcb6c6939c0cf128ce776afd3f8358fa411b792c3dad2f0ca0df8db4ee183660ad7
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/memorystore.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-memorystore-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-memorystore-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 Memorystore
23
- VERSION = "0.1.0"
23
+ VERSION = "1.0.0"
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 Memorystore service.
60
+ # You can determine whether the method will succeed by calling
61
+ # {Google::Cloud::Memorystore.memorystore_available?}.
62
+ #
58
63
  # ## About Memorystore
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 Memorystore service is supported by the current client.
84
+ # If true, you can retrieve a client object by calling {Google::Cloud::Memorystore.memorystore}.
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 Memorystore service,
87
+ # or if the versioned client gem needs an update to support the Memorystore 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.memorystore_available? version: :v1
94
+ require "google/cloud/memorystore/#{version.to_s.downcase}"
95
+ package_name = Google::Cloud::Memorystore
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::Memorystore.const_get package_name
101
+ return false unless service_module.const_defined? :Memorystore
102
+ service_module = service_module.const_get :Memorystore
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-memorystore library.
79
112
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-memorystore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.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-12-09 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -28,22 +27,16 @@ dependencies:
28
27
  name: google-cloud-memorystore-v1
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0.0'
34
- - - "<"
30
+ - - "~>"
35
31
  - !ruby/object:Gem::Version
36
- version: 2.a
32
+ version: '1.0'
37
33
  type: :runtime
38
34
  prerelease: false
39
35
  version_requirements: !ruby/object:Gem::Requirement
40
36
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: '0.0'
44
- - - "<"
37
+ - - "~>"
45
38
  - !ruby/object:Gem::Version
46
- version: 2.a
39
+ version: '1.0'
47
40
  description: google-cloud-memorystore is the official client library for the Memorystore
48
41
  API.
49
42
  email: googleapis-packages@google.com
@@ -62,7 +55,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
55
  licenses:
63
56
  - Apache-2.0
64
57
  metadata: {}
65
- post_install_message:
66
58
  rdoc_options: []
67
59
  require_paths:
68
60
  - lib
@@ -70,15 +62,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
62
  requirements:
71
63
  - - ">="
72
64
  - !ruby/object:Gem::Version
73
- version: '2.7'
65
+ version: '3.0'
74
66
  required_rubygems_version: !ruby/object:Gem::Requirement
75
67
  requirements:
76
68
  - - ">="
77
69
  - !ruby/object:Gem::Version
78
70
  version: '0'
79
71
  requirements: []
80
- rubygems_version: 3.5.23
81
- signing_key:
72
+ rubygems_version: 3.6.3
82
73
  specification_version: 4
83
74
  summary: API Client library for the Memorystore API
84
75
  test_files: []