google-cloud-core 1.5.0 → 1.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8335e0770899a3b55e53c76dd3d971f44aa00609b25131147063f86a27cef04d
4
- data.tar.gz: fb986a63f272e2f6071e477bcedaa6e4d9cc01b7750b3164dce7f83404fb2e90
3
+ metadata.gz: 0da3f7e70a825960a1eefff5508fadf4e4e58005a16c1ee0cf3f1c9f04af65bb
4
+ data.tar.gz: 82b1d53b8a7339152f8a65a2c0ded58ac4edc1549c24eeff03c9bdaae0f10c56
5
5
  SHA512:
6
- metadata.gz: 5c1666693b48cedae86d152f695249a3ca0d793aaea0fac53321c45743e49ff98d1fe13334b49fae3e1edbd7efdb4742f3919ca47cb242d18364e5ca0c6794ac
7
- data.tar.gz: c5986aba8797b57094a9cf7129175c61f4e02d07364141ffd2fdc1c93b0738edc315bfc4dd9c8dc7e344b146d180f46ffcf7c7297324e3137042d2135e8f7929
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.4+. You may choose to
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 exec rake bundleupdate
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.4+.
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.4 and
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.
@@ -434,10 +434,10 @@ module Google
434
434
  str = data.strip
435
435
  return str if ::File.file? str
436
436
  json = begin
437
- ::JSON.parse str
438
- rescue ::StandardError
439
- nil
440
- end
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 = ::Proc.new { true }
492
+ OPEN_VALIDATOR = proc { true }
493
493
 
494
494
  ##
495
495
  # @private a list of key names that are technically illegal because
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Core
19
- VERSION = "1.5.0".freeze
19
+ VERSION = "1.6.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -48,9 +48,10 @@ module Google
48
48
 
49
49
  def initialize keyfile, scope: nil
50
50
  verify_keyfile_provided! keyfile
51
- if keyfile.is_a? Signet::OAuth2::Client
51
+ case keyfile
52
+ when Signet::OAuth2::Client
52
53
  @client = keyfile
53
- elsif keyfile.is_a? Hash
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
- Hash[hash.map { |k, v| [k.to_s, v] }]
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.5.0
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: 2020-01-09 00:00:00.000000000 Z
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.24.0
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.24.0
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.10'
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.10'
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.4'
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.0.6
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