google-cloud-storage 0.23.2 → 0.24.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
  SHA1:
3
- metadata.gz: eacda730dbe4335f179257e4ca952498675b931c
4
- data.tar.gz: bb21912a5d50d23f83e92e496954cd78eb6155cf
3
+ metadata.gz: e64f8e7e313f4c8f5dc1bd0229e04436c7594281
4
+ data.tar.gz: 96638f6c5921a7be66cffac75e36d88abbee9337
5
5
  SHA512:
6
- metadata.gz: 0977c4f43a27b33c5de1cbefbcfb648269e0f181430dd186e97d511758797162821c7f8e2999262c1c0c32ef1f7f6555893f29596bffb8b1ddd815aff2b07f08
7
- data.tar.gz: 8e56264bf22deac8a2440cde15e8e9a4507ae717a4fbdcf10250ab155fd08cd6c35c66106b6bad3036a899e6af8120bf8da2402bee8ab6c2dc9e9e3312406127
6
+ metadata.gz: 984d4b6c132149b11cf697b341d5b6e88cb2e7d729597c2e2e93af21801771ac3486da2aa620b007e605bc1dca397a5b3ed2f9af999953d5bdd3d1679b08b1cd
7
+ data.tar.gz: 2cc2fbcaf2be7e8a5381f0791211a44cc6655428786c45dd4076833b10712313f7ee81e693073a9d0e0caf5e268e128557c130e79360f48fb3f8b1f2e6e8b62d
@@ -394,7 +394,7 @@ module Google
394
394
  end
395
395
 
396
396
  def update_predefined_acl! acl_role
397
- patched_file = Google::Apis::StorageV1::Object.new acl: nil
397
+ patched_file = Google::Apis::StorageV1::Object.new acl: []
398
398
  @service.patch_file \
399
399
  @bucket, @file, patched_file, predefined_acl: acl_role
400
400
  clear!
@@ -91,8 +91,8 @@ module Google
91
91
  def patch_bucket bucket_name, bucket_gapi = nil, predefined_acl: nil,
92
92
  predefined_default_acl: nil
93
93
  bucket_gapi ||= Google::Apis::StorageV1::Bucket.new
94
- bucket_gapi.acl = nil if predefined_acl
95
- bucket_gapi.default_object_acl = nil if predefined_default_acl
94
+ bucket_gapi.acl = [] if predefined_acl
95
+ bucket_gapi.default_object_acl = [] if predefined_default_acl
96
96
 
97
97
  execute do
98
98
  service.patch_bucket \
@@ -117,8 +117,8 @@ module Google
117
117
  ##
118
118
  # Creates a new bucket ACL.
119
119
  def insert_bucket_acl bucket_name, entity, role
120
- new_acl = Google::Apis::StorageV1::BucketAccessControl.new \
121
- entity: entity, role: role
120
+ new_acl = Google::Apis::StorageV1::BucketAccessControl.new({
121
+ entity: entity, role: role }.delete_if { |_k, v| v.nil? })
122
122
  execute { service.insert_bucket_access_control bucket_name, new_acl }
123
123
  end
124
124
 
@@ -137,8 +137,8 @@ module Google
137
137
  ##
138
138
  # Creates a new default ACL.
139
139
  def insert_default_acl bucket_name, entity, role
140
- new_acl = Google::Apis::StorageV1::ObjectAccessControl.new \
141
- entity: entity, role: role
140
+ new_acl = Google::Apis::StorageV1::ObjectAccessControl.new({
141
+ entity: entity, role: role }.delete_if { |_k, v| v.nil? })
142
142
  execute do
143
143
  service.insert_default_object_access_control bucket_name, new_acl
144
144
  end
@@ -172,12 +172,12 @@ module Google
172
172
  content_encoding: nil, content_language: nil,
173
173
  content_type: nil, crc32c: nil, md5: nil, metadata: nil,
174
174
  storage_class: nil, key: nil
175
- file_obj = Google::Apis::StorageV1::Object.new \
175
+ file_obj = Google::Apis::StorageV1::Object.new({
176
176
  cache_control: cache_control, content_type: content_type,
177
177
  content_disposition: content_disposition, md5_hash: md5,
178
178
  content_encoding: content_encoding, crc32c: crc32c,
179
179
  content_language: content_language, metadata: metadata,
180
- storage_class: storage_class
180
+ storage_class: storage_class }.delete_if { |_k, v| v.nil? })
181
181
  content_type ||= mime_type_for(Pathname(source).to_path)
182
182
  execute do
183
183
  service.insert_object \
@@ -282,8 +282,8 @@ module Google
282
282
  ##
283
283
  # Creates a new file ACL.
284
284
  def insert_file_acl bucket_name, file_name, entity, role, options = {}
285
- new_acl = Google::Apis::StorageV1::ObjectAccessControl.new \
286
- entity: entity, role: role
285
+ new_acl = Google::Apis::StorageV1::ObjectAccessControl.new({
286
+ entity: entity, role: role }.delete_if { |_k, v| v.nil? })
287
287
  execute do
288
288
  service.insert_object_access_control \
289
289
  bucket_name, file_name, new_acl, generation: options[:generation]
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Storage
19
- VERSION = "0.23.2"
19
+ VERSION = "0.24.0"
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: 0.23.2
4
+ version: 0.24.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: 2017-02-21 00:00:00.000000000 Z
12
+ date: 2017-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.9.11
34
+ version: 0.10.0
35
35
  type: :runtime
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: 0.9.11
41
+ version: 0.10.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: digest-crc
44
44
  requirement: !ruby/object:Gem::Requirement