google-cloud-storage 1.29.0 → 1.29.1

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: fe9e2b825a237558161e2fa35c196f56342b43ea1119c15b527fdd1b26445711
4
- data.tar.gz: 2c76342e276c10250c9ddcbf14edfc143474ccf4b29e1d869bc3a8a639d4f608
3
+ metadata.gz: 9d4a2aa4fb9f98b7c0e842d436fe23e66d44af1f47afaba5cb3feea37dc7a04e
4
+ data.tar.gz: 53e4761ea01664572d9e5f39d90d41ef2726cf9879ef8cda51b77c395e5fa4a2
5
5
  SHA512:
6
- metadata.gz: a9ff8d6eb43731e588b0b32df5bb093dc042443543cc63d3e1f060bffd09d011180085254c849ef0393b27447550bb01690b129255e0c02a3e657e8e73e1bd4e
7
- data.tar.gz: 991a423b8db899c16adeeb93d095ec9f3176a32cae5d78ab459c9b2bc7f07a52398f7387a7a89336dd2d86e9aeb1beb067853a2b474042b2740333bc6ff3daf7
6
+ metadata.gz: 378453a678dd7d46d92454773c8c564a206dfbfdaa7ac35b828f889e7c0b378d7beaf951d631dd0a8714bb105db9221d53a8536d2ed8a89a323799f932bf1cb7
7
+ data.tar.gz: 9707109d71ed6e4f0fb07d0260cfb5ece5f5f1018731b0b2a9ff3a369dd84804c4e154572589d34329fb962b3ee62fa120e8b4faad274ab6635c98ee5f760f4d
@@ -1,5 +1,17 @@
1
1
  # Release History
2
2
 
3
+ ### 1.29.1 / 2020-10-05
4
+
5
+ #### Bug Fixes
6
+
7
+ * Fix encoding of space characters in file names in signed_url v4
8
+
9
+ #### Documentation
10
+
11
+ * Update Bucket#default_kms_key= docs
12
+ * Demonstrate deleting the Cloud KMS encryption key
13
+ * Update customer-supplied encryption key docs and examples ([#7851](https://www.github.com/googleapis/google-cloud-ruby/issues/7851))
14
+
3
15
  ### 1.29.0 / 2020-09-22
4
16
 
5
17
  #### Features
@@ -557,7 +557,8 @@ module Google
557
557
  # Set the Cloud KMS encryption key that will be used to protect files.
558
558
  # For example: `projects/a/locations/b/keyRings/c/cryptoKeys/d`
559
559
  #
560
- # @param [String] new_default_kms_key New Cloud KMS key name.
560
+ # @param [String, nil] new_default_kms_key New Cloud KMS key name, or
561
+ # `nil` to delete the Cloud KMS encryption key.
561
562
  #
562
563
  # @example
563
564
  # require "google/cloud/storage"
@@ -571,6 +572,15 @@ module Google
571
572
  #
572
573
  # bucket.default_kms_key = kms_key_name
573
574
  #
575
+ # @example Delete the default Cloud KMS encryption key:
576
+ # require "google/cloud/storage"
577
+ #
578
+ # storage = Google::Cloud::Storage.new
579
+ #
580
+ # bucket = storage.bucket "my-bucket"
581
+ #
582
+ # bucket.default_kms_key = nil
583
+ #
574
584
  def default_kms_key= new_default_kms_key
575
585
  @gapi.encryption = API::Bucket::Encryption.new \
576
586
  default_kms_key_name: new_default_kms_key
@@ -412,7 +412,8 @@ module Google
412
412
  # You can use this SHA256 hash to uniquely identify the AES-256
413
413
  # encryption key required to decrypt this file.
414
414
  #
415
- # @return [String]
415
+ # @return [String, nil] The encoded SHA256 hash, or `nil` if there is
416
+ # no customer-supplied encryption key for this file.
416
417
  #
417
418
  def encryption_key_sha256
418
419
  return nil unless @gapi.customer_encryption
@@ -1229,7 +1230,7 @@ module Google
1229
1230
  # cipher.encrypt
1230
1231
  # new_key = cipher.random_key
1231
1232
  #
1232
- # file = bucket.file "path/to/my-file.ext"
1233
+ # file = bucket.file "path/to/my-file.ext", encryption_key: old_key
1233
1234
  # file.rewrite "new-destination-bucket",
1234
1235
  # "path/to/destination/file.ext",
1235
1236
  # encryption_key: old_key,
@@ -1250,7 +1251,7 @@ module Google
1250
1251
  # # Old customer-supplied key was stored securely for later use.
1251
1252
  # old_key = "y\x03\"\x0E\xB6\xD3\x9B\x0E\xAB*\x19\xFAv\xDEY\xBEI..."
1252
1253
  #
1253
- # file = bucket.file "path/to/my-file.ext"
1254
+ # file = bucket.file "path/to/my-file.ext", encryption_key: old_key
1254
1255
  # file.rewrite "new-destination-bucket",
1255
1256
  # "path/to/destination/file.ext",
1256
1257
  # encryption_key: old_key,
@@ -273,7 +273,7 @@ module Google
273
273
  # Only the characters in the regex set [A-Za-z0-9.~_-] must be left un-escaped; all others must be
274
274
  # percent-encoded using %XX UTF-8 style.
275
275
  def escape_query_param str
276
- CGI.escape(str.to_s).gsub("%7E", "~").gsub("+", "%20")
276
+ CGI.escape(str.to_s).gsub("%7E", "~").gsub "+", "%20"
277
277
  end
278
278
 
279
279
  def host_name virtual_hosted_style, bucket_bound_hostname
@@ -287,7 +287,7 @@ module Google
287
287
  path = []
288
288
  path << "/#{@bucket_name}" if path_style
289
289
  path << "/#{String(@file_name)}" if @file_name && !@file_name.empty?
290
- CGI.escape(path.join).gsub "%2F", "/"
290
+ CGI.escape(path.join).gsub("%2F", "/").gsub "+", "%20"
291
291
  end
292
292
 
293
293
  ##
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Storage
19
- VERSION = "1.29.0".freeze
19
+ VERSION = "1.29.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-storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.29.0
4
+ version: 1.29.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-09-22 00:00:00.000000000 Z
12
+ date: 2020-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core