google-cloud-spanner 1.13.0 → 1.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/CONTRIBUTING.md +6 -6
  4. data/lib/google/cloud/spanner/admin/database.rb +1 -1
  5. data/lib/google/cloud/spanner/admin/database/v1.rb +1 -1
  6. data/lib/google/cloud/spanner/admin/database/v1/credentials.rb +1 -1
  7. data/lib/google/cloud/spanner/admin/database/v1/database_admin_client.rb +1 -1
  8. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/iam_policy.rb +1 -1
  9. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/options.rb +1 -1
  10. data/lib/google/cloud/spanner/admin/database/v1/doc/google/iam/v1/policy.rb +1 -1
  11. data/lib/google/cloud/spanner/admin/database/v1/doc/google/longrunning/operations.rb +2 -2
  12. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/any.rb +1 -1
  13. data/lib/google/cloud/spanner/admin/database/v1/doc/google/protobuf/empty.rb +1 -1
  14. data/lib/google/cloud/spanner/admin/database/v1/doc/google/rpc/status.rb +7 -55
  15. data/lib/google/cloud/spanner/admin/database/v1/doc/google/spanner/admin/database/v1/spanner_database_admin.rb +1 -1
  16. data/lib/google/cloud/spanner/admin/database/v1/doc/google/type/expr.rb +1 -1
  17. data/lib/google/cloud/spanner/admin/instance.rb +1 -1
  18. data/lib/google/cloud/spanner/admin/instance/v1.rb +1 -1
  19. data/lib/google/cloud/spanner/admin/instance/v1/credentials.rb +1 -1
  20. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/iam_policy.rb +1 -1
  21. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/options.rb +1 -1
  22. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/iam/v1/policy.rb +1 -1
  23. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/longrunning/operations.rb +2 -2
  24. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/any.rb +1 -1
  25. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/empty.rb +1 -1
  26. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/protobuf/field_mask.rb +1 -1
  27. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/rpc/status.rb +7 -55
  28. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/spanner/admin/instance/v1/spanner_instance_admin.rb +1 -1
  29. data/lib/google/cloud/spanner/admin/instance/v1/doc/google/type/expr.rb +1 -1
  30. data/lib/google/cloud/spanner/admin/instance/v1/instance_admin_client.rb +1 -1
  31. data/lib/google/cloud/spanner/client.rb +7 -0
  32. data/lib/google/cloud/spanner/pool.rb +5 -1
  33. data/lib/google/cloud/spanner/service.rb +23 -3
  34. data/lib/google/cloud/spanner/v1/credentials.rb +1 -1
  35. data/lib/google/cloud/spanner/v1/doc/google/protobuf/any.rb +1 -1
  36. data/lib/google/cloud/spanner/v1/doc/google/protobuf/duration.rb +1 -1
  37. data/lib/google/cloud/spanner/v1/doc/google/protobuf/empty.rb +1 -1
  38. data/lib/google/cloud/spanner/v1/doc/google/protobuf/struct.rb +1 -1
  39. data/lib/google/cloud/spanner/v1/doc/google/protobuf/timestamp.rb +1 -1
  40. data/lib/google/cloud/spanner/v1/doc/google/rpc/status.rb +7 -55
  41. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/keys.rb +1 -1
  42. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/mutation.rb +1 -1
  43. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/query_plan.rb +1 -1
  44. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/result_set.rb +1 -1
  45. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/spanner.rb +1 -1
  46. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/transaction.rb +1 -1
  47. data/lib/google/cloud/spanner/v1/doc/google/spanner/v1/type.rb +1 -1
  48. data/lib/google/cloud/spanner/v1/spanner_client.rb +1 -1
  49. data/lib/google/cloud/spanner/version.rb +1 -1
  50. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eba832c0a32045d9ae260e11fe32ef991974465d9bf7dac3b49d6ea4a977d95f
4
- data.tar.gz: 8c818d7beef38f54a3de61eed3f42c918b68bd0cdf5a89c83973b5b32d142ac0
3
+ metadata.gz: 7bba4c8dab3ed8067ad0e2d59049021c7a5fce7d87fd1ed0f20226314fd8a214
4
+ data.tar.gz: '08033542e0725a4eb7424291a02ae6f1cc1495d1a407d91d84d95d8b23fe02a1'
5
5
  SHA512:
6
- metadata.gz: 4405ca2cb9c051ecadbc3b2dcdfb3880620f59fbc511a04ad1fe097db418cbf93c452bdc907ee8e9fe9b9bdb54d640c539ceca703f892a5ccf0888524e4f36f5
7
- data.tar.gz: 9e72b1fa85cbdc8c89fb0713ecf7fc965736b552e7d53e688dcc214491e35ba158c45ef73b596b74105b2afd6839a7d0fb435f68256432e3e1fe9ffdb5efd7e9
6
+ metadata.gz: 5a839007b3e28db0b4d206af5249410d506ada44956bce6ff899ed1c6e18cd9445a5b7e6930e80fc6ee7c7d930d87ddb4d3375b3a213371a2f42bd857788ac41
7
+ data.tar.gz: 410e358dd4451e98f3527ee027f19b14e5b8306924176a2fe6bdb2469f116c1b0110ecde7280abbc7ae35368ed57253113f27b64ac2b88053bc5abd4bb270d0c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Release History
2
2
 
3
+ ### 1.13.1 / 2020-01-22
4
+
5
+ #### Documentation
6
+
7
+ * fix incorrect doc links in CONTRIBUTING.md
8
+ * Update copyright year
9
+ * Update Status documentation
10
+
3
11
  ### 1.13.0 / 2020-01-08
4
12
 
5
13
  #### Features
data/CONTRIBUTING.md CHANGED
@@ -53,7 +53,7 @@ there is a small amount of setup:
53
53
  In order to run code interactively, you can automatically load
54
54
  google-cloud-spanner and its dependencies in IRB. This requires that your
55
55
  developer environment has already been configured by following the steps
56
- described in the {file:AUTHENTICATION.md Authentication Guide}. An IRB console
56
+ described in the [Authentication Guide](AUTHENTICATION.md). An IRB console
57
57
  can be created with:
58
58
 
59
59
  ```sh
@@ -119,16 +119,16 @@ If you alter an example's title, you may encounter breaking tests.
119
119
  ### Spanner Acceptance Tests
120
120
 
121
121
  The Spanner acceptance tests interact with the live service API. Follow the
122
- instructions in the {file:AUTHENTICATION.md Authentication guide} for enabling
122
+ instructions in the [Authentication Guide](AUTHENTICATION.md) for enabling
123
123
  the Spanner API. Occasionally, some API features may not yet be generally
124
124
  available, making it difficult for some contributors to successfully run the
125
125
  entire acceptance test suite. However, please ensure that you do successfully
126
126
  run acceptance tests for any code areas covered by your pull request.
127
127
 
128
128
  To run the acceptance tests, first create and configure a project in the Google
129
- Developers Console, as described in the {file:AUTHENTICATION.md Authentication
130
- guide}. Be sure to download the JSON KEY file. Make note of the PROJECT_ID and
131
- the KEYFILE location on your system.
129
+ Developers Console, as described in the
130
+ [Authentication Guide](AUTHENTICATION.md). Be sure to download the JSON KEY
131
+ file. Make note of the PROJECT_ID and the KEYFILE location on your system.
132
132
 
133
133
  Before you can run the Spanner acceptance tests, you must first create indexes
134
134
  used in the tests.
@@ -185,4 +185,4 @@ $ bundle exec rake rubocop
185
185
 
186
186
  Please note that this project is released with a Contributor Code of Conduct. By
187
187
  participating in this project you agree to abide by its terms. See
188
- {file:CODE_OF_CONDUCT.md Code of Conduct} for more information.
188
+ [Code of Conduct](CODE_OF_CONDUCT.md) for more information.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ module Google
21
21
  # @return [String]
22
22
  # The server-assigned name, which is only unique within the same service that
23
23
  # originally returns it. If you use the default HTTP mapping, the
24
- # `name` should have the format of `operations/some/unique/name`.
24
+ # `name` should be a resource name ending with `operations/{unique_id}`.
25
25
  # @!attribute [rw] metadata
26
26
  # @return [Google::Protobuf::Any]
27
27
  # Service-specific metadata associated with the operation. It typically
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -17,67 +17,19 @@ module Google
17
17
  module Rpc
18
18
  # The `Status` type defines a logical error model that is suitable for
19
19
  # different programming environments, including REST APIs and RPC APIs. It is
20
- # used by [gRPC](https://github.com/grpc). The error model is designed to be:
20
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
21
+ # three pieces of data: error code, error message, and error details.
21
22
  #
22
- # * Simple to use and understand for most users
23
- # * Flexible enough to meet unexpected needs
24
- #
25
- # = Overview
26
- #
27
- # The `Status` message contains three pieces of data: error code, error
28
- # message, and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes
30
- # if needed. The error message should be a developer-facing English message
31
- # that helps developers *understand* and *resolve* the error. If a localized
32
- # user-facing error message is needed, put the localized message in the error
33
- # details or localize it in the client. The optional error details may contain
34
- # arbitrary information about the error. There is a predefined set of error
35
- # detail types in the package `google.rpc` that can be used for common error
36
- # conditions.
37
- #
38
- # = Language mapping
39
- #
40
- # The `Status` message is the logical representation of the error model, but it
41
- # is not necessarily the actual wire format. When the `Status` message is
42
- # exposed in different client libraries and different wire protocols, it can be
43
- # mapped differently. For example, it will likely be mapped to some exceptions
44
- # in Java, but more likely mapped to some error codes in C.
45
- #
46
- # = Other uses
47
- #
48
- # The error model and the `Status` message can be used in a variety of
49
- # environments, either with or without APIs, to provide a
50
- # consistent developer experience across different environments.
51
- #
52
- # Example uses of this error model include:
53
- #
54
- # * Partial errors. If a service needs to return partial errors to the client,
55
- # it may embed the `Status` in the normal response to indicate the partial
56
- # errors.
57
- #
58
- # * Workflow errors. A typical workflow has multiple steps. Each step may
59
- # have a `Status` message for error reporting.
60
- #
61
- # * Batch operations. If a client uses batch request and batch response, the
62
- # `Status` message should be used directly inside batch response, one for
63
- # each error sub-response.
64
- #
65
- # * Asynchronous operations. If an API call embeds asynchronous operation
66
- # results in its response, the status of those operations should be
67
- # represented directly using the `Status` message.
68
- #
69
- # * Logging. If some API errors are stored in logs, the message `Status` could
70
- # be used directly after any stripping needed for security/privacy reasons.
23
+ # You can find out more about this error model and how to work with it in the
24
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
71
25
  # @!attribute [rw] code
72
26
  # @return [Integer]
73
- # The status code, which should be an enum value of
74
- # {Google::Rpc::Code}.
27
+ # The status code, which should be an enum value of {Google::Rpc::Code}.
75
28
  # @!attribute [rw] message
76
29
  # @return [String]
77
30
  # A developer-facing error message, which should be in English. Any
78
31
  # user-facing error message should be localized and sent in the
79
- # {Google::Rpc::Status#details} field, or localized
80
- # by the client.
32
+ # {Google::Rpc::Status#details} field, or localized by the client.
81
33
  # @!attribute [rw] details
82
34
  # @return [Array<Google::Protobuf::Any>]
83
35
  # A list of messages that carry the error details. There is a common set of
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ module Google
21
21
  # @return [String]
22
22
  # The server-assigned name, which is only unique within the same service that
23
23
  # originally returns it. If you use the default HTTP mapping, the
24
- # `name` should have the format of `operations/some/unique/name`.
24
+ # `name` should be a resource name ending with `operations/{unique_id}`.
25
25
  # @!attribute [rw] metadata
26
26
  # @return [Google::Protobuf::Any]
27
27
  # Service-specific metadata associated with the operation. It typically
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -17,67 +17,19 @@ module Google
17
17
  module Rpc
18
18
  # The `Status` type defines a logical error model that is suitable for
19
19
  # different programming environments, including REST APIs and RPC APIs. It is
20
- # used by [gRPC](https://github.com/grpc). The error model is designed to be:
20
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
21
+ # three pieces of data: error code, error message, and error details.
21
22
  #
22
- # * Simple to use and understand for most users
23
- # * Flexible enough to meet unexpected needs
24
- #
25
- # = Overview
26
- #
27
- # The `Status` message contains three pieces of data: error code, error
28
- # message, and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes
30
- # if needed. The error message should be a developer-facing English message
31
- # that helps developers *understand* and *resolve* the error. If a localized
32
- # user-facing error message is needed, put the localized message in the error
33
- # details or localize it in the client. The optional error details may contain
34
- # arbitrary information about the error. There is a predefined set of error
35
- # detail types in the package `google.rpc` that can be used for common error
36
- # conditions.
37
- #
38
- # = Language mapping
39
- #
40
- # The `Status` message is the logical representation of the error model, but it
41
- # is not necessarily the actual wire format. When the `Status` message is
42
- # exposed in different client libraries and different wire protocols, it can be
43
- # mapped differently. For example, it will likely be mapped to some exceptions
44
- # in Java, but more likely mapped to some error codes in C.
45
- #
46
- # = Other uses
47
- #
48
- # The error model and the `Status` message can be used in a variety of
49
- # environments, either with or without APIs, to provide a
50
- # consistent developer experience across different environments.
51
- #
52
- # Example uses of this error model include:
53
- #
54
- # * Partial errors. If a service needs to return partial errors to the client,
55
- # it may embed the `Status` in the normal response to indicate the partial
56
- # errors.
57
- #
58
- # * Workflow errors. A typical workflow has multiple steps. Each step may
59
- # have a `Status` message for error reporting.
60
- #
61
- # * Batch operations. If a client uses batch request and batch response, the
62
- # `Status` message should be used directly inside batch response, one for
63
- # each error sub-response.
64
- #
65
- # * Asynchronous operations. If an API call embeds asynchronous operation
66
- # results in its response, the status of those operations should be
67
- # represented directly using the `Status` message.
68
- #
69
- # * Logging. If some API errors are stored in logs, the message `Status` could
70
- # be used directly after any stripping needed for security/privacy reasons.
23
+ # You can find out more about this error model and how to work with it in the
24
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
71
25
  # @!attribute [rw] code
72
26
  # @return [Integer]
73
- # The status code, which should be an enum value of
74
- # {Google::Rpc::Code}.
27
+ # The status code, which should be an enum value of {Google::Rpc::Code}.
75
28
  # @!attribute [rw] message
76
29
  # @return [String]
77
30
  # A developer-facing error message, which should be in English. Any
78
31
  # user-facing error message should be localized and sent in the
79
- # {Google::Rpc::Status#details} field, or localized
80
- # by the client.
32
+ # {Google::Rpc::Status#details} field, or localized by the client.
81
33
  # @!attribute [rw] details
82
34
  # @return [Array<Google::Protobuf::Any>]
83
35
  # A list of messages that carry the error details. There is a common set of
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1274,6 +1274,13 @@ module Google
1274
1274
  @pool.close
1275
1275
  end
1276
1276
 
1277
+ ##
1278
+ # Reset the client sessions.
1279
+ #
1280
+ def reset
1281
+ @pool.reset
1282
+ end
1283
+
1277
1284
  ##
1278
1285
  # @private
1279
1286
  # Creates a new session object every time.
@@ -158,9 +158,13 @@ module Google
158
158
  end
159
159
 
160
160
  def reset
161
- shutdown
161
+ close
162
162
  init
163
163
 
164
+ @mutex.synchronize do
165
+ @closed = false
166
+ end
167
+
164
168
  true
165
169
  end
166
170
 
@@ -42,11 +42,27 @@ module Google
42
42
  @client_config = client_config || {}
43
43
  end
44
44
 
45
+ def channel
46
+ require "grpc"
47
+ GRPC::Core::Channel.new host, chan_args, chan_creds
48
+ end
49
+
50
+ def chan_args
51
+ { "grpc.service_config_disable_resolution" => 1 }
52
+ end
53
+
54
+ def chan_creds
55
+ return credentials if insecure?
56
+ require "grpc"
57
+ GRPC::Core::ChannelCredentials.new.compose \
58
+ GRPC::Core::CallCredentials.new credentials.client.updater_proc
59
+ end
60
+
45
61
  def service
46
62
  return mocked_service if mocked_service
47
63
  @service ||= \
48
64
  V1::SpannerClient.new(
49
- credentials: credentials,
65
+ credentials: channel,
50
66
  timeout: timeout,
51
67
  client_config: client_config,
52
68
  service_address: service_address,
@@ -61,7 +77,7 @@ module Google
61
77
  return mocked_instances if mocked_instances
62
78
  @instances ||= \
63
79
  Admin::Instance::V1::InstanceAdminClient.new(
64
- credentials: credentials,
80
+ credentials: channel,
65
81
  timeout: timeout,
66
82
  client_config: client_config,
67
83
  service_address: service_address,
@@ -76,7 +92,7 @@ module Google
76
92
  return mocked_databases if mocked_databases
77
93
  @databases ||= \
78
94
  Admin::Database::V1::DatabaseAdminClient.new(
79
- credentials: credentials,
95
+ credentials: channel,
80
96
  timeout: timeout,
81
97
  client_config: client_config,
82
98
  service_address: service_address,
@@ -87,6 +103,10 @@ module Google
87
103
  end
88
104
  attr_accessor :mocked_databases
89
105
 
106
+ def insecure?
107
+ credentials == :this_channel_is_insecure
108
+ end
109
+
90
110
  def list_instances token: nil, max: nil
91
111
  call_options = nil
92
112
  call_options = Google::Gax::CallOptions.new page_token: token if token
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -17,67 +17,19 @@ module Google
17
17
  module Rpc
18
18
  # The `Status` type defines a logical error model that is suitable for
19
19
  # different programming environments, including REST APIs and RPC APIs. It is
20
- # used by [gRPC](https://github.com/grpc). The error model is designed to be:
20
+ # used by [gRPC](https://github.com/grpc). Each `Status` message contains
21
+ # three pieces of data: error code, error message, and error details.
21
22
  #
22
- # * Simple to use and understand for most users
23
- # * Flexible enough to meet unexpected needs
24
- #
25
- # = Overview
26
- #
27
- # The `Status` message contains three pieces of data: error code, error
28
- # message, and error details. The error code should be an enum value of
29
- # {Google::Rpc::Code}, but it may accept additional error codes
30
- # if needed. The error message should be a developer-facing English message
31
- # that helps developers *understand* and *resolve* the error. If a localized
32
- # user-facing error message is needed, put the localized message in the error
33
- # details or localize it in the client. The optional error details may contain
34
- # arbitrary information about the error. There is a predefined set of error
35
- # detail types in the package `google.rpc` that can be used for common error
36
- # conditions.
37
- #
38
- # = Language mapping
39
- #
40
- # The `Status` message is the logical representation of the error model, but it
41
- # is not necessarily the actual wire format. When the `Status` message is
42
- # exposed in different client libraries and different wire protocols, it can be
43
- # mapped differently. For example, it will likely be mapped to some exceptions
44
- # in Java, but more likely mapped to some error codes in C.
45
- #
46
- # = Other uses
47
- #
48
- # The error model and the `Status` message can be used in a variety of
49
- # environments, either with or without APIs, to provide a
50
- # consistent developer experience across different environments.
51
- #
52
- # Example uses of this error model include:
53
- #
54
- # * Partial errors. If a service needs to return partial errors to the client,
55
- # it may embed the `Status` in the normal response to indicate the partial
56
- # errors.
57
- #
58
- # * Workflow errors. A typical workflow has multiple steps. Each step may
59
- # have a `Status` message for error reporting.
60
- #
61
- # * Batch operations. If a client uses batch request and batch response, the
62
- # `Status` message should be used directly inside batch response, one for
63
- # each error sub-response.
64
- #
65
- # * Asynchronous operations. If an API call embeds asynchronous operation
66
- # results in its response, the status of those operations should be
67
- # represented directly using the `Status` message.
68
- #
69
- # * Logging. If some API errors are stored in logs, the message `Status` could
70
- # be used directly after any stripping needed for security/privacy reasons.
23
+ # You can find out more about this error model and how to work with it in the
24
+ # [API Design Guide](https://cloud.google.com/apis/design/errors).
71
25
  # @!attribute [rw] code
72
26
  # @return [Integer]
73
- # The status code, which should be an enum value of
74
- # {Google::Rpc::Code}.
27
+ # The status code, which should be an enum value of {Google::Rpc::Code}.
75
28
  # @!attribute [rw] message
76
29
  # @return [String]
77
30
  # A developer-facing error message, which should be in English. Any
78
31
  # user-facing error message should be localized and sent in the
79
- # {Google::Rpc::Status#details} field, or localized
80
- # by the client.
32
+ # {Google::Rpc::Status#details} field, or localized by the client.
81
33
  # @!attribute [rw] details
82
34
  # @return [Array<Google::Protobuf::Any>]
83
35
  # A list of messages that carry the error details. There is a common set of
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2019 Google LLC
1
+ # Copyright 2020 Google LLC
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Spanner
19
- VERSION = "1.13.0".freeze
19
+ VERSION = "1.13.1".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.1
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: 2020-01-08 00:00:00.000000000 Z
12
+ date: 2020-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core