google-cloud-core 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +2 -2
- data/README.md +2 -2
- data/lib/google/cloud/config.rb +5 -5
- data/lib/google/cloud/core/version.rb +1 -1
- data/lib/google/cloud/credentials.rb +4 -3
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0da3f7e70a825960a1eefff5508fadf4e4e58005a16c1ee0cf3f1c9f04af65bb
|
4
|
+
data.tar.gz: 82b1d53b8a7339152f8a65a2c0ded58ac4edc1549c24eeff03c9bdaae0f10c56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c29b01b9004f1cbe7a93a56e69286bce35a582f012ba819876f41667dc8b7b19d92c4f1108c314099d56882c9fe1022fe4a38d05dd76a70fda5bd48d78a0365
|
7
|
+
data.tar.gz: af2334493f6309401623c8c3c6b4712f421a3ce12563b1cf6a8ffa5dc03380e8afb043590d0a56fe397ef645aa89458af57df718cf0fd9a01f2ac5291fb09ed1
|
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.5+. 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).
|
@@ -45,7 +45,7 @@ there is a small amount of setup:
|
|
45
45
|
|
46
46
|
```sh
|
47
47
|
$ cd google-cloud-core/
|
48
|
-
$ bundle
|
48
|
+
$ bundle install
|
49
49
|
```
|
50
50
|
|
51
51
|
## Console
|
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.5+.
|
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.5 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/config.rb
CHANGED
@@ -434,10 +434,10 @@ module Google
|
|
434
434
|
str = data.strip
|
435
435
|
return str if ::File.file? str
|
436
436
|
json = begin
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
437
|
+
::JSON.parse str
|
438
|
+
rescue ::StandardError
|
439
|
+
nil
|
440
|
+
end
|
441
441
|
return json if json.is_a? ::Hash
|
442
442
|
end
|
443
443
|
nil
|
@@ -489,7 +489,7 @@ module Google
|
|
489
489
|
##
|
490
490
|
# @private A validator that allows all values
|
491
491
|
#
|
492
|
-
OPEN_VALIDATOR =
|
492
|
+
OPEN_VALIDATOR = proc { true }
|
493
493
|
|
494
494
|
##
|
495
495
|
# @private a list of key names that are technically illegal because
|
@@ -48,9 +48,10 @@ module Google
|
|
48
48
|
|
49
49
|
def initialize keyfile, scope: nil
|
50
50
|
verify_keyfile_provided! keyfile
|
51
|
-
|
51
|
+
case keyfile
|
52
|
+
when Signet::OAuth2::Client
|
52
53
|
@client = keyfile
|
53
|
-
|
54
|
+
when Hash
|
54
55
|
hash = stringify_hash_keys keyfile
|
55
56
|
hash["scope"] ||= scope
|
56
57
|
@client = init_client hash
|
@@ -114,7 +115,7 @@ module Google
|
|
114
115
|
##
|
115
116
|
# returns a new Hash with string keys instead of symbol keys.
|
116
117
|
def stringify_hash_keys hash
|
117
|
-
|
118
|
+
hash.transform_keys(&:to_s)
|
118
119
|
end
|
119
120
|
|
120
121
|
def client_options options
|
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.6.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:
|
12
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-env
|
@@ -59,28 +59,28 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.
|
62
|
+
version: 1.25.1
|
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: 1.
|
69
|
+
version: 1.25.1
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: minitest
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '5.
|
76
|
+
version: '5.14'
|
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: '5.
|
83
|
+
version: '5.14'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: minitest-autotest
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,14 +209,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
209
|
requirements:
|
210
210
|
- - ">="
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version: '2.
|
212
|
+
version: '2.5'
|
213
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
214
|
requirements:
|
215
215
|
- - ">="
|
216
216
|
- !ruby/object:Gem::Version
|
217
217
|
version: '0'
|
218
218
|
requirements: []
|
219
|
-
rubygems_version: 3.
|
219
|
+
rubygems_version: 3.2.13
|
220
220
|
signing_key:
|
221
221
|
specification_version: 4
|
222
222
|
summary: Internal shared library for google-cloud-ruby
|