google-cloud-core 1.3.2 → 1.4.0
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 +4 -4
- data/CONTRIBUTING.md +1 -1
- data/README.md +2 -2
- data/lib/google/cloud.rb +1 -3
- data/lib/google/cloud/config.rb +10 -16
- data/lib/google/cloud/core/version.rb +1 -1
- data/lib/google/cloud/credentials.rb +10 -10
- data/lib/google/cloud/errors.rb +7 -7
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06e4c0f0513566e3ab2667045198352e4dd6f56b2155a400394ff4987df112df
|
4
|
+
data.tar.gz: 1284d07b4f29cbc91e833517b1d0e8c33160279b4909b4fa939f18d8c7630fb5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0cb1499dac6f48b3885c7471d2a1e3143b95efa95206cbac4b8e0faca6dc343806d03744877e04e6e50e8d84374c5b866be890fc7043f7c39977619ab8b4874
|
7
|
+
data.tar.gz: 0d08bb49694d5a5111d3e7a12747d4479ec64f0e1acad667623d91c55d4c08b4be84fc7d7cd36a62ebc419992d23bf8cc733bd4d1e5f90456db149b041ef656a
|
data/CONTRIBUTING.md
CHANGED
@@ -24,7 +24,7 @@ be able to accept your pull requests.
|
|
24
24
|
In order to use the google-cloud console and run the project's tests,
|
25
25
|
there is a small amount of setup:
|
26
26
|
|
27
|
-
1. Install Ruby. google-cloud requires Ruby 2.
|
27
|
+
1. Install Ruby. google-cloud requires Ruby 2.4+. You may choose to
|
28
28
|
manage your Ruby and gem installations with [RVM](https://rvm.io/),
|
29
29
|
[rbenv](https://github.com/rbenv/rbenv), or
|
30
30
|
[chruby](https://github.com/postmodern/chruby).
|
data/README.md
CHANGED
@@ -9,11 +9,11 @@ information about the individual google-cloud gems.
|
|
9
9
|
|
10
10
|
## Supported Ruby Versions
|
11
11
|
|
12
|
-
This library is supported on Ruby 2.
|
12
|
+
This library is supported on Ruby 2.4+.
|
13
13
|
|
14
14
|
Google provides official support for Ruby versions that are actively supported
|
15
15
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or in
|
16
|
-
security maintenance, and not end of life. Currently, this means Ruby 2.
|
16
|
+
security maintenance, and not end of life. Currently, this means Ruby 2.4 and
|
17
17
|
later. Older versions of Ruby _may_ still work, but are unsupported and not
|
18
18
|
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
|
19
19
|
about the Ruby support schedule.
|
data/lib/google/cloud.rb
CHANGED
@@ -223,9 +223,7 @@ module Google
|
|
223
223
|
# @private
|
224
224
|
#
|
225
225
|
def self.auto_load_files
|
226
|
-
if Gem.respond_to? :find_latest_files
|
227
|
-
return Gem.find_latest_files "google-cloud-*.rb"
|
228
|
-
end
|
226
|
+
return Gem.find_latest_files "google-cloud-*.rb" if Gem.respond_to? :find_latest_files
|
229
227
|
# Ruby 2.0 does not have Gem.find_latest_files
|
230
228
|
Gem.find_files "google-cloud-*.rb"
|
231
229
|
end
|
data/lib/google/cloud/config.rb
CHANGED
@@ -308,9 +308,7 @@ module Google
|
|
308
308
|
#
|
309
309
|
def [] key
|
310
310
|
key = resolve_key! key
|
311
|
-
unless @validators.key? key
|
312
|
-
warn! "Key #{key.inspect} does not exist. Returning nil."
|
313
|
-
end
|
311
|
+
warn! "Key #{key.inspect} does not exist. Returning nil." unless @validators.key? key
|
314
312
|
value = @values[key]
|
315
313
|
value = value.call if Config::DeferredValue === value
|
316
314
|
value
|
@@ -495,16 +493,14 @@ module Google
|
|
495
493
|
# @private a list of key names that are technically illegal because
|
496
494
|
# they clash with method names.
|
497
495
|
#
|
498
|
-
ILLEGAL_KEYS =
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
singleton_method_undefined
|
507
|
-
].freeze
|
496
|
+
ILLEGAL_KEYS = [:add_options,
|
497
|
+
:initialize,
|
498
|
+
:instance_eval,
|
499
|
+
:instance_exec,
|
500
|
+
:method_missing,
|
501
|
+
:singleton_method_added,
|
502
|
+
:singleton_method_removed,
|
503
|
+
:singleton_method_undefined].freeze
|
508
504
|
|
509
505
|
##
|
510
506
|
# @private sentinel indicating a subconfig in the validators hash
|
@@ -524,9 +520,7 @@ module Google
|
|
524
520
|
warn! "Illegal key name: #{key_str.inspect}. Method dispatch will" \
|
525
521
|
" not work for this key."
|
526
522
|
end
|
527
|
-
if @validators.key? key
|
528
|
-
warn! "Key #{key.inspect} already exists. It will be replaced."
|
529
|
-
end
|
523
|
+
warn! "Key #{key.inspect} already exists. It will be replaced." if @validators.key? key
|
530
524
|
key
|
531
525
|
end
|
532
526
|
|
@@ -30,12 +30,12 @@ module Google
|
|
30
30
|
# This class is intended to be inherited by API-specific classes
|
31
31
|
# which overrides the SCOPE constant.
|
32
32
|
class Credentials
|
33
|
-
TOKEN_CREDENTIAL_URI = "https://oauth2.googleapis.com/token"
|
34
|
-
AUDIENCE = "https://oauth2.googleapis.com/token"
|
35
|
-
SCOPE = []
|
36
|
-
PATH_ENV_VARS =
|
37
|
-
JSON_ENV_VARS =
|
38
|
-
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
|
33
|
+
TOKEN_CREDENTIAL_URI = "https://oauth2.googleapis.com/token".freeze
|
34
|
+
AUDIENCE = "https://oauth2.googleapis.com/token".freeze
|
35
|
+
SCOPE = [].freeze
|
36
|
+
PATH_ENV_VARS = ["GOOGLE_CLOUD_KEYFILE", "GCLOUD_KEYFILE"].freeze
|
37
|
+
JSON_ENV_VARS = ["GOOGLE_CLOUD_KEYFILE_JSON", "GCLOUD_KEYFILE_JSON"].freeze
|
38
|
+
DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"].freeze
|
39
39
|
|
40
40
|
attr_accessor :client
|
41
41
|
|
@@ -125,10 +125,10 @@ module Google
|
|
125
125
|
|
126
126
|
# client options for initializing signet client
|
127
127
|
{ token_credential_uri: options["token_credential_uri"],
|
128
|
-
audience:
|
129
|
-
scope:
|
130
|
-
issuer:
|
131
|
-
signing_key:
|
128
|
+
audience: options["audience"],
|
129
|
+
scope: Array(options["scope"]),
|
130
|
+
issuer: options["client_email"],
|
131
|
+
signing_key: OpenSSL::PKey::RSA.new(options["private_key"]) }
|
132
132
|
end
|
133
133
|
end
|
134
134
|
end
|
data/lib/google/cloud/errors.rb
CHANGED
@@ -48,7 +48,7 @@ module Google
|
|
48
48
|
#
|
49
49
|
# @return [Object, nil]
|
50
50
|
def status_code
|
51
|
-
return nil unless cause
|
51
|
+
return nil unless cause&.respond_to? :status_code
|
52
52
|
cause.status_code
|
53
53
|
end
|
54
54
|
|
@@ -61,7 +61,7 @@ module Google
|
|
61
61
|
#
|
62
62
|
# @return [Object, nil]
|
63
63
|
def body
|
64
|
-
return nil unless cause
|
64
|
+
return nil unless cause&.respond_to? :body
|
65
65
|
cause.body
|
66
66
|
end
|
67
67
|
|
@@ -74,7 +74,7 @@ module Google
|
|
74
74
|
#
|
75
75
|
# @return [Object, nil]
|
76
76
|
def header
|
77
|
-
return nil unless cause
|
77
|
+
return nil unless cause&.respond_to? :header
|
78
78
|
cause.header
|
79
79
|
end
|
80
80
|
|
@@ -87,7 +87,7 @@ module Google
|
|
87
87
|
#
|
88
88
|
# @return [Object, nil]
|
89
89
|
def code
|
90
|
-
return nil unless cause
|
90
|
+
return nil unless cause&.respond_to? :code
|
91
91
|
cause.code
|
92
92
|
end
|
93
93
|
|
@@ -100,7 +100,7 @@ module Google
|
|
100
100
|
#
|
101
101
|
# @return [Object, nil]
|
102
102
|
def details
|
103
|
-
return nil unless cause
|
103
|
+
return nil unless cause&.respond_to? :details
|
104
104
|
cause.details
|
105
105
|
end
|
106
106
|
|
@@ -113,7 +113,7 @@ module Google
|
|
113
113
|
#
|
114
114
|
# @return [Object, nil]
|
115
115
|
def metadata
|
116
|
-
return nil unless cause
|
116
|
+
return nil unless cause&.respond_to? :metadata
|
117
117
|
cause.metadata
|
118
118
|
end
|
119
119
|
|
@@ -126,7 +126,7 @@ module Google
|
|
126
126
|
#
|
127
127
|
# @return [Object, nil]
|
128
128
|
def status_details
|
129
|
-
return nil unless cause
|
129
|
+
return nil unless cause&.respond_to? :status_details
|
130
130
|
cause.status_details
|
131
131
|
end
|
132
132
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
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: 2019-10-
|
12
|
+
date: 2019-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-env
|
@@ -26,63 +26,63 @@ dependencies:
|
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: autotest-suffix
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '1.1'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '1.1'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: google-style
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: 1.24.0
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 1.24.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name: minitest
|
57
|
+
name: minitest
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '5.10'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '5.10'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name: minitest-
|
71
|
+
name: minitest-autotest
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '1.0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '1.0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
85
|
+
name: minitest-focus
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
@@ -96,33 +96,33 @@ dependencies:
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '1.1'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: minitest-rg
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
104
|
+
version: '5.2'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
109
|
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '
|
111
|
+
version: '5.2'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
113
|
+
name: redcarpet
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
118
|
+
version: '3.0'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
125
|
+
version: '3.0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: simplecov
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,14 +196,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
196
|
requirements:
|
197
197
|
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: 2.
|
199
|
+
version: '2.4'
|
200
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
201
|
requirements:
|
202
202
|
- - ">="
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
|
-
rubygems_version: 3.0.
|
206
|
+
rubygems_version: 3.0.6
|
207
207
|
signing_key:
|
208
208
|
specification_version: 4
|
209
209
|
summary: Internal shared library for google-cloud-ruby
|