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 +4 -4
- data/lib/google/cloud/storage/file/acl.rb +1 -1
- data/lib/google/cloud/storage/service.rb +10 -10
- data/lib/google/cloud/storage/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e64f8e7e313f4c8f5dc1bd0229e04436c7594281
|
4
|
+
data.tar.gz: 96638f6c5921a7be66cffac75e36d88abbee9337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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 =
|
95
|
-
bucket_gapi.default_object_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]
|
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.
|
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-
|
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.
|
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.
|
41
|
+
version: 0.10.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: digest-crc
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|