google-cloud-datastore 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +178 -0
- data/CHANGELOG.md +100 -0
- data/CODE_OF_CONDUCT.md +40 -0
- data/CONTRIBUTING.md +209 -0
- data/EMULATOR.md +57 -0
- data/LOGGING.md +32 -0
- data/OVERVIEW.md +494 -0
- data/TROUBLESHOOTING.md +37 -0
- data/lib/google/cloud/datastore/v1/doc/google/protobuf/struct.rb +74 -0
- data/lib/google/cloud/datastore/v1/doc/google/protobuf/timestamp.rb +109 -0
- data/lib/google/cloud/datastore/v1/doc/google/type/latlng.rb +65 -0
- data/lib/google/cloud/datastore/version.rb +1 -1
- metadata +13 -3
- data/README.md +0 -111
data/TROUBLESHOOTING.md
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Troubleshooting
|
2
|
+
|
3
|
+
## Where can I get more help?
|
4
|
+
|
5
|
+
### Ask the Community
|
6
|
+
|
7
|
+
If you have a question about how to use a Google Cloud client library in your
|
8
|
+
project or are stuck in the Developer's console and don't know where to turn,
|
9
|
+
it's possible your questions have already been addressed by the community.
|
10
|
+
|
11
|
+
First, check out the appropriate tags on StackOverflow:
|
12
|
+
- [`google-cloud-platform+ruby+datastore`][so-ruby]
|
13
|
+
|
14
|
+
Next, try searching through the issues on GitHub:
|
15
|
+
|
16
|
+
- [`api:datastore` issues][gh-search-ruby]
|
17
|
+
|
18
|
+
Still nothing?
|
19
|
+
|
20
|
+
### Ask the Developers
|
21
|
+
|
22
|
+
If you're experiencing a bug with the code, or have an idea for how it can be
|
23
|
+
improved, *please* create a new issue on GitHub so we can talk about it.
|
24
|
+
|
25
|
+
- [New issue][gh-ruby]
|
26
|
+
|
27
|
+
Or, you can ask questions on the [Google Cloud Platform Slack][slack-ruby]. You
|
28
|
+
can use the "ruby" channel for general Ruby questions, or use the
|
29
|
+
"google-cloud-ruby" channel if you have questions about this gem in particular.
|
30
|
+
|
31
|
+
[so-ruby]: http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby+datastore
|
32
|
+
|
33
|
+
[gh-search-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues?q=label%3A%22api%3A+datastore%22
|
34
|
+
|
35
|
+
[gh-ruby]: https://github.com/googlecloudplatform/google-cloud-ruby/issues/new
|
36
|
+
|
37
|
+
[slack-ruby]: https://gcp-slack.appspot.com/
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
module Google
|
17
|
+
module Protobuf
|
18
|
+
# `Struct` represents a structured data value, consisting of fields
|
19
|
+
# which map to dynamically typed values. In some languages, `Struct`
|
20
|
+
# might be supported by a native representation. For example, in
|
21
|
+
# scripting languages like JS a struct is represented as an
|
22
|
+
# object. The details of that representation are described together
|
23
|
+
# with the proto support for the language.
|
24
|
+
#
|
25
|
+
# The JSON representation for `Struct` is JSON object.
|
26
|
+
# @!attribute [rw] fields
|
27
|
+
# @return [Hash{String => Google::Protobuf::Value}]
|
28
|
+
# Unordered map of dynamically typed values.
|
29
|
+
class Struct; end
|
30
|
+
|
31
|
+
# `Value` represents a dynamically typed value which can be either
|
32
|
+
# null, a number, a string, a boolean, a recursive struct value, or a
|
33
|
+
# list of values. A producer of value is expected to set one of that
|
34
|
+
# variants, absence of any variant indicates an error.
|
35
|
+
#
|
36
|
+
# The JSON representation for `Value` is JSON value.
|
37
|
+
# @!attribute [rw] null_value
|
38
|
+
# @return [Google::Protobuf::NullValue]
|
39
|
+
# Represents a null value.
|
40
|
+
# @!attribute [rw] number_value
|
41
|
+
# @return [Float]
|
42
|
+
# Represents a double value.
|
43
|
+
# @!attribute [rw] string_value
|
44
|
+
# @return [String]
|
45
|
+
# Represents a string value.
|
46
|
+
# @!attribute [rw] bool_value
|
47
|
+
# @return [true, false]
|
48
|
+
# Represents a boolean value.
|
49
|
+
# @!attribute [rw] struct_value
|
50
|
+
# @return [Google::Protobuf::Struct]
|
51
|
+
# Represents a structured value.
|
52
|
+
# @!attribute [rw] list_value
|
53
|
+
# @return [Google::Protobuf::ListValue]
|
54
|
+
# Represents a repeated +Value+.
|
55
|
+
class Value; end
|
56
|
+
|
57
|
+
# `ListValue` is a wrapper around a repeated field of values.
|
58
|
+
#
|
59
|
+
# The JSON representation for `ListValue` is JSON array.
|
60
|
+
# @!attribute [rw] values
|
61
|
+
# @return [Array<Google::Protobuf::Value>]
|
62
|
+
# Repeated field of dynamically typed values.
|
63
|
+
class ListValue; end
|
64
|
+
|
65
|
+
# `NullValue` is a singleton enumeration to represent the null value for the
|
66
|
+
# `Value` type union.
|
67
|
+
#
|
68
|
+
# The JSON representation for `NullValue` is JSON +null+.
|
69
|
+
module NullValue
|
70
|
+
# Null value.
|
71
|
+
NULL_VALUE = 0
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
module Google
|
17
|
+
module Protobuf
|
18
|
+
# A Timestamp represents a point in time independent of any time zone
|
19
|
+
# or calendar, represented as seconds and fractions of seconds at
|
20
|
+
# nanosecond resolution in UTC Epoch time. It is encoded using the
|
21
|
+
# Proleptic Gregorian Calendar which extends the Gregorian calendar
|
22
|
+
# backwards to year one. It is encoded assuming all minutes are 60
|
23
|
+
# seconds long, i.e. leap seconds are "smeared" so that no leap second
|
24
|
+
# table is needed for interpretation. Range is from
|
25
|
+
# 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
|
26
|
+
# By restricting to that range, we ensure that we can convert to
|
27
|
+
# and from RFC 3339 date strings.
|
28
|
+
# See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
|
29
|
+
#
|
30
|
+
# = Examples
|
31
|
+
#
|
32
|
+
# Example 1: Compute Timestamp from POSIX `time()`.
|
33
|
+
#
|
34
|
+
# Timestamp timestamp;
|
35
|
+
# timestamp.set_seconds(time(NULL));
|
36
|
+
# timestamp.set_nanos(0);
|
37
|
+
#
|
38
|
+
# Example 2: Compute Timestamp from POSIX `gettimeofday()`.
|
39
|
+
#
|
40
|
+
# struct timeval tv;
|
41
|
+
# gettimeofday(&tv, NULL);
|
42
|
+
#
|
43
|
+
# Timestamp timestamp;
|
44
|
+
# timestamp.set_seconds(tv.tv_sec);
|
45
|
+
# timestamp.set_nanos(tv.tv_usec * 1000);
|
46
|
+
#
|
47
|
+
# Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
|
48
|
+
#
|
49
|
+
# FILETIME ft;
|
50
|
+
# GetSystemTimeAsFileTime(&ft);
|
51
|
+
# UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
|
52
|
+
#
|
53
|
+
# // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
|
54
|
+
# // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
|
55
|
+
# Timestamp timestamp;
|
56
|
+
# timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
|
57
|
+
# timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
|
58
|
+
#
|
59
|
+
# Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
|
60
|
+
#
|
61
|
+
# long millis = System.currentTimeMillis();
|
62
|
+
#
|
63
|
+
# Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
|
64
|
+
# .setNanos((int) ((millis % 1000) * 1000000)).build();
|
65
|
+
#
|
66
|
+
#
|
67
|
+
# Example 5: Compute Timestamp from current time in Python.
|
68
|
+
#
|
69
|
+
# timestamp = Timestamp()
|
70
|
+
# timestamp.GetCurrentTime()
|
71
|
+
#
|
72
|
+
# = JSON Mapping
|
73
|
+
#
|
74
|
+
# In JSON format, the Timestamp type is encoded as a string in the
|
75
|
+
# [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
76
|
+
# format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z"
|
77
|
+
# where \\{year} is always expressed using four digits while \\{month}, \\{day},
|
78
|
+
# \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional
|
79
|
+
# seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
80
|
+
# are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
81
|
+
# is required. A proto3 JSON serializer should always use UTC (as indicated by
|
82
|
+
# "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
83
|
+
# able to accept both UTC and other timezones (as indicated by an offset).
|
84
|
+
#
|
85
|
+
# For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
86
|
+
# 01:30 UTC on January 15, 2017.
|
87
|
+
#
|
88
|
+
# In JavaScript, one can convert a Date object to this format using the
|
89
|
+
# standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
|
90
|
+
# method. In Python, a standard `datetime.datetime` object can be converted
|
91
|
+
# to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
|
92
|
+
# with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
|
93
|
+
# can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
94
|
+
# http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
|
95
|
+
# ) to obtain a formatter capable of generating timestamps in this format.
|
96
|
+
# @!attribute [rw] seconds
|
97
|
+
# @return [Integer]
|
98
|
+
# Represents seconds of UTC time since Unix epoch
|
99
|
+
# 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
100
|
+
# 9999-12-31T23:59:59Z inclusive.
|
101
|
+
# @!attribute [rw] nanos
|
102
|
+
# @return [Integer]
|
103
|
+
# Non-negative fractions of a second at nanosecond resolution. Negative
|
104
|
+
# second values with fractions must still have non-negative nanos values
|
105
|
+
# that count forward in time. Must be from 0 to 999,999,999
|
106
|
+
# inclusive.
|
107
|
+
class Timestamp; end
|
108
|
+
end
|
109
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Copyright 2018 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
module Google
|
17
|
+
module Type
|
18
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
19
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
20
|
+
# specified otherwise, this must conform to the
|
21
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
22
|
+
# standard</a>. Values must be within normalized ranges.
|
23
|
+
#
|
24
|
+
# Example of normalization code in Python:
|
25
|
+
#
|
26
|
+
# def NormalizeLongitude(longitude):
|
27
|
+
# """Wraps decimal degrees longitude to [-180.0, 180.0]."""
|
28
|
+
# q, r = divmod(longitude, 360.0)
|
29
|
+
# if r > 180.0 or (r == 180.0 and q <= -1.0):
|
30
|
+
# return r - 360.0
|
31
|
+
# return r
|
32
|
+
#
|
33
|
+
# def NormalizeLatLng(latitude, longitude):
|
34
|
+
# """Wraps decimal degrees latitude and longitude to
|
35
|
+
# [-90.0, 90.0] and [-180.0, 180.0], respectively."""
|
36
|
+
# r = latitude % 360.0
|
37
|
+
# if r <= 90.0:
|
38
|
+
# return r, NormalizeLongitude(longitude)
|
39
|
+
# elif r >= 270.0:
|
40
|
+
# return r - 360, NormalizeLongitude(longitude)
|
41
|
+
# else:
|
42
|
+
# return 180 - r, NormalizeLongitude(longitude + 180.0)
|
43
|
+
#
|
44
|
+
# assert 180.0 == NormalizeLongitude(180.0)
|
45
|
+
# assert -180.0 == NormalizeLongitude(-180.0)
|
46
|
+
# assert -179.0 == NormalizeLongitude(181.0)
|
47
|
+
# assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
|
48
|
+
# assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
|
49
|
+
# assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
|
50
|
+
# assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
|
51
|
+
# assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
|
52
|
+
# assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
|
53
|
+
# assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
|
54
|
+
# assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
|
55
|
+
# assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
|
56
|
+
# assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
|
57
|
+
# @!attribute [rw] latitude
|
58
|
+
# @return [Float]
|
59
|
+
# The latitude in degrees. It must be in the range `[-90.0, +90.0]`.
|
60
|
+
# @!attribute [rw] longitude
|
61
|
+
# @return [Float]
|
62
|
+
# The longitude in degrees. It must be in the range `[-180.0, +180.0]`.
|
63
|
+
class LatLng; end
|
64
|
+
end
|
65
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-datastore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-09-
|
12
|
+
date: 2018-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -202,8 +202,15 @@ extensions: []
|
|
202
202
|
extra_rdoc_files: []
|
203
203
|
files:
|
204
204
|
- ".yardopts"
|
205
|
+
- AUTHENTICATION.md
|
206
|
+
- CHANGELOG.md
|
207
|
+
- CODE_OF_CONDUCT.md
|
208
|
+
- CONTRIBUTING.md
|
209
|
+
- EMULATOR.md
|
205
210
|
- LICENSE
|
206
|
-
-
|
211
|
+
- LOGGING.md
|
212
|
+
- OVERVIEW.md
|
213
|
+
- TROUBLESHOOTING.md
|
207
214
|
- lib/google-cloud-datastore.rb
|
208
215
|
- lib/google/cloud/datastore.rb
|
209
216
|
- lib/google/cloud/datastore/commit.rb
|
@@ -229,7 +236,10 @@ files:
|
|
229
236
|
- lib/google/cloud/datastore/v1/doc/google/datastore/v1/datastore.rb
|
230
237
|
- lib/google/cloud/datastore/v1/doc/google/datastore/v1/entity.rb
|
231
238
|
- lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb
|
239
|
+
- lib/google/cloud/datastore/v1/doc/google/protobuf/struct.rb
|
240
|
+
- lib/google/cloud/datastore/v1/doc/google/protobuf/timestamp.rb
|
232
241
|
- lib/google/cloud/datastore/v1/doc/google/protobuf/wrappers.rb
|
242
|
+
- lib/google/cloud/datastore/v1/doc/google/type/latlng.rb
|
233
243
|
- lib/google/cloud/datastore/version.rb
|
234
244
|
- lib/google/datastore/v1/datastore_pb.rb
|
235
245
|
- lib/google/datastore/v1/datastore_services_pb.rb
|
data/README.md
DELETED
@@ -1,111 +0,0 @@
|
|
1
|
-
# google-cloud-datastore
|
2
|
-
|
3
|
-
[Google Cloud Datastore](https://cloud.google.com/datastore/) ([docs](https://cloud.google.com/datastore/docs)) is a fully managed, schemaless database for storing non-relational data. Cloud Datastore automatically scales with your users and supports ACID transactions, high availability of reads and writes, strong consistency for reads and ancestor queries, and eventual consistency for all other queries.
|
4
|
-
|
5
|
-
Follow the [activation instructions](https://cloud.google.com/datastore/docs/activate) to use the Google Cloud Datastore API with your project.
|
6
|
-
|
7
|
-
- [google-cloud-datastore API documentation](http://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-datastore/latest)
|
8
|
-
- [google-cloud-datastore on RubyGems](https://rubygems.org/gems/google-cloud-datastore)
|
9
|
-
- [Google Cloud Datastore documentation](https://cloud.google.com/datastore/docs)
|
10
|
-
|
11
|
-
## Quick Start
|
12
|
-
|
13
|
-
```sh
|
14
|
-
$ gem install google-cloud-datastore
|
15
|
-
```
|
16
|
-
|
17
|
-
## Authentication
|
18
|
-
|
19
|
-
This library uses Service Account credentials to connect to Google Cloud services. When running on Compute Engine the credentials will be discovered automatically. When running on other environments the Service Account credentials can be specified by providing the path to the JSON file, or the JSON itself, in environment variables.
|
20
|
-
|
21
|
-
Instructions and configuration options are covered in the [Authentication Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-datastore/latest/file.AUTHENTICATION).
|
22
|
-
|
23
|
-
## Example
|
24
|
-
|
25
|
-
```ruby
|
26
|
-
require "google/cloud/datastore"
|
27
|
-
|
28
|
-
datastore = Google::Cloud::Datastore.new(
|
29
|
-
project_id: "my-todo-project",
|
30
|
-
credentials: "/path/to/keyfile.json"
|
31
|
-
)
|
32
|
-
|
33
|
-
# Create a new task to demo datastore
|
34
|
-
task = datastore.entity "Task", "sampleTask" do |t|
|
35
|
-
t["type"] = "Personal"
|
36
|
-
t["done"] = false
|
37
|
-
t["priority"] = 4
|
38
|
-
t["description"] = "Learn Cloud Datastore"
|
39
|
-
end
|
40
|
-
|
41
|
-
# Save the new task
|
42
|
-
datastore.save task
|
43
|
-
|
44
|
-
# Run a query for all completed tasks
|
45
|
-
query = datastore.query("Task").
|
46
|
-
where("done", "=", false)
|
47
|
-
tasks = datastore.run query
|
48
|
-
```
|
49
|
-
|
50
|
-
## Enabling Logging
|
51
|
-
|
52
|
-
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library. The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below, or a [`Google::Cloud::Logging::Logger`](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-logging/latest/Google/Cloud/Logging/Logger) that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb) and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
53
|
-
|
54
|
-
Configuring a Ruby stdlib logger:
|
55
|
-
|
56
|
-
```ruby
|
57
|
-
require "logger"
|
58
|
-
|
59
|
-
module MyLogger
|
60
|
-
LOGGER = Logger.new $stderr, level: Logger::WARN
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
69
|
-
end
|
70
|
-
```
|
71
|
-
|
72
|
-
## Supported Ruby Versions
|
73
|
-
|
74
|
-
This library is supported on Ruby 2.3+.
|
75
|
-
|
76
|
-
Google provides official support for Ruby versions that are actively supported
|
77
|
-
by Ruby Core—that is, Ruby versions that are either in normal maintenance or in
|
78
|
-
security maintenance, and not end of life. Currently, this means Ruby 2.3 and
|
79
|
-
later. Older versions of Ruby _may_ still work, but are unsupported and not
|
80
|
-
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
81
|
-
about the Ruby support schedule.
|
82
|
-
|
83
|
-
## Versioning
|
84
|
-
|
85
|
-
This library follows [Semantic Versioning](http://semver.org/).
|
86
|
-
|
87
|
-
## Contributing
|
88
|
-
|
89
|
-
Contributions to this library are always welcome and highly encouraged.
|
90
|
-
|
91
|
-
See the [Contributing
|
92
|
-
Guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-datastore/latest/file.CONTRIBUTING)
|
93
|
-
for more information on how to get started.
|
94
|
-
|
95
|
-
Please note that this project is released with a Contributor Code of Conduct. By
|
96
|
-
participating in this project you agree to abide by its terms. See [Code of
|
97
|
-
Conduct](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-datastore/latest/file.CODE_OF_CONDUCT)
|
98
|
-
for more information.
|
99
|
-
|
100
|
-
## License
|
101
|
-
|
102
|
-
This library is licensed under Apache 2.0. Full license text is available in
|
103
|
-
[LICENSE](https://googlecloudplatform.github.io/google-cloud-ruby/docs/google-cloud-datastore/latest/file.LICENSE).
|
104
|
-
|
105
|
-
## Support
|
106
|
-
|
107
|
-
Please [report bugs at the project on
|
108
|
-
Github](https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues). Don't
|
109
|
-
hesitate to [ask
|
110
|
-
questions](http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby)
|
111
|
-
about the client or APIs on [StackOverflow](http://stackoverflow.com).
|