google-cloud-datastore-admin 0.1.0 → 0.2.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: 50f6aeedfd9e003bbb2d4889c88342db068f1a8170ecc43b2c2ab73098a39b02
4
- data.tar.gz: d9119acefe0ba32935aa902f2f2fbc6c7b37232fe9af09f50156a2ba54817d1e
3
+ metadata.gz: ff72861861ec7c2be413d952c6c4e14538e21c0e6f8ba1d1a345f824fe31f041
4
+ data.tar.gz: 6db28b0140e44c5a4ea7a88e186173a12673f9e77417e1c7dd43c19b3cf34b56
5
5
  SHA512:
6
- metadata.gz: c40b3f7d4809109de1e6668d7c97c4c80705764178786fb71ea5dd16e83eeb35f997ff8161c29b2190c64e8d46b38b28ee98fd8f79f1f7462bb1011b2343ac3a
7
- data.tar.gz: fb58c73b7a32ef40a72784aa28262deceefcfa4c3f7835e7e0d3ec05a2662db7a8e7379878c168b91ad22ca135285b644fa4ddc4d70b1fc0324fa85c96a38709
6
+ metadata.gz: f4bc865b3a776a6211243bfe1522c60ed8aae91c00bee1132d1b4c282b9e8519c11fbcd303aed49cb92a96ed4455da2bb8a5b8a96600a6686e6dbdbd60744c80
7
+ data.tar.gz: 585b2e1578d58811085e72bd4569144df80dd3797d56b7c6b6bd12ad6fd54c78b0aaf30f28eed21bebdbecb5710dcfd1c18cd739539d3d2ace815469084b11bc
data/README.md CHANGED
@@ -34,32 +34,6 @@ 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/datastore.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://googleapis.dev/ruby/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
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Datastore
23
23
  module Admin
24
- VERSION = "0.1.0"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
@@ -55,6 +55,8 @@ module Google
55
55
  # `version` parameter. If the DatastoreAdmin service is
56
56
  # supported by that API version, and the corresponding gem is available, the
57
57
  # appropriate versioned client will be returned.
58
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
59
+ # the `transport` parameter.
58
60
  #
59
61
  # ## About DatastoreAdmin
60
62
  #
@@ -122,9 +124,10 @@ module Google
122
124
  #
123
125
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
124
126
  # Defaults to `:v1`.
127
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
125
128
  # @return [::Object] A client object for the specified version.
126
129
  #
127
- def self.datastore_admin version: :v1, &block
130
+ def self.datastore_admin version: :v1, transport: :grpc, &block
128
131
  require "google/cloud/datastore/admin/#{version.to_s.downcase}"
129
132
 
130
133
  package_name = Google::Cloud::Datastore::Admin
@@ -132,6 +135,7 @@ module Google
132
135
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
133
136
  .first
134
137
  service_module = Google::Cloud::Datastore::Admin.const_get(package_name).const_get(:DatastoreAdmin)
138
+ service_module = service_module.const_get(:Rest) if transport == :rest
135
139
  service_module.const_get(:Client).new(&block)
136
140
  end
137
141
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-datastore-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-12 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.0'
33
+ version: '0.8'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.0'
43
+ version: '0.8'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a