google-cloud-core 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ce6958cad5f8a7e52c3f7c6f411113755f2e4e71a5ec9b645b3041f8c82de2e
4
- data.tar.gz: e425219b5a6e323da8c36a0cfc65c4a56928d105134d5df52538fa72f5d35132
3
+ metadata.gz: 06e4c0f0513566e3ab2667045198352e4dd6f56b2155a400394ff4987df112df
4
+ data.tar.gz: 1284d07b4f29cbc91e833517b1d0e8c33160279b4909b4fa939f18d8c7630fb5
5
5
  SHA512:
6
- metadata.gz: 1145e74e8189e4d712c815d5b375d147ec7acae685c66a7130c9178f4e235fa1d38b6cd2181fa93084a956fb5a4af64302d71c72b485f52c8cab3c98dcdde2b7
7
- data.tar.gz: 1355ea91e769c18d3ca7c08c2843a7356852ddd29fc471def712ea24316220c1ef6914aa3ef9dbb831dc1757c33d4b27de4f12bf9eaeb845383b70205cbaf68a
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.3+. You may choose to
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.3+.
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.3 and
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
@@ -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 = %i[
499
- add_options
500
- initialize
501
- instance_eval
502
- instance_exec
503
- method_missing
504
- singleton_method_added
505
- singleton_method_removed
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
 
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Core
19
- VERSION = "1.3.2".freeze
19
+ VERSION = "1.4.0".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -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 = %w[GOOGLE_CLOUD_KEYFILE GCLOUD_KEYFILE]
37
- JSON_ENV_VARS = %w[GOOGLE_CLOUD_KEYFILE_JSON GCLOUD_KEYFILE_JSON]
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: options["audience"],
129
- scope: Array(options["scope"]),
130
- issuer: options["client_email"],
131
- signing_key: OpenSSL::PKey::RSA.new(options["private_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
@@ -48,7 +48,7 @@ module Google
48
48
  #
49
49
  # @return [Object, nil]
50
50
  def status_code
51
- return nil unless cause && cause.respond_to?(:status_code)
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 && cause.respond_to?(:body)
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 && cause.respond_to?(:header)
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 && cause.respond_to?(:code)
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 && cause.respond_to?(:details)
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 && cause.respond_to?(:metadata)
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 && cause.respond_to?(:status_details)
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.3.2
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-15 00:00:00.000000000 Z
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: minitest
29
+ name: autotest-suffix
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '5.10'
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: '5.10'
41
+ version: '1.1'
42
42
  - !ruby/object:Gem::Dependency
43
- name: minitest-autotest
43
+ name: google-style
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '1.0'
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: '1.0'
55
+ version: 1.24.0
56
56
  - !ruby/object:Gem::Dependency
57
- name: minitest-focus
57
+ name: minitest
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '1.1'
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: '1.1'
69
+ version: '5.10'
70
70
  - !ruby/object:Gem::Dependency
71
- name: minitest-rg
71
+ name: minitest-autotest
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '5.2'
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: '5.2'
83
+ version: '1.0'
84
84
  - !ruby/object:Gem::Dependency
85
- name: autotest-suffix
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: redcarpet
99
+ name: minitest-rg
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '3.0'
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: '3.0'
111
+ version: '5.2'
112
112
  - !ruby/object:Gem::Dependency
113
- name: rubocop
113
+ name: redcarpet
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: 0.64.0
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: 0.64.0
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.0.0
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.4
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