gitlab-fog-google 1.13.0 → 1.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/gitlab-fog-google.gemspec +2 -2
- data/lib/fog/google/shared.rb +3 -3
- data/lib/fog/google/version.rb +1 -1
- data/lib/fog/storage/google_json/models/directories.rb +1 -1
- data/lib/fog/storage/google_json/models/directory.rb +1 -1
- data/lib/fog/storage/google_json/models/file.rb +1 -1
- data/lib/fog/storage/google_json/models/files.rb +1 -1
- data/lib/fog/storage/google_json/requests/get_object.rb +2 -2
- data/lib/fog/storage/google_json/requests/list_buckets.rb +6 -4
- data/lib/fog/storage/google_json/requests/list_objects.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_bucket.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_bucket_acl.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_object.rb +1 -1
- data/lib/fog/storage/google_json/requests/put_object_acl.rb +1 -1
- data/lib/fog/storage/google_xml/models/file.rb +1 -1
- data/test/helpers/integration_test_helper.rb +2 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec3026a74ac22db51ced6d640ba895888f9d0aa6f4039d02d5e6aa4c114e577
|
4
|
+
data.tar.gz: f8473ed87013e57d3ea33ae6986c74b9052640e1d8df0df049598174e37b28fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c0616a0c85c5dde28ef58b0207da4b2a1ae0d3447ca6edf8d891abfdc8ae83635e21887a28d5b1df09ef175e5fc511217499e91a7b92345ed2f6861c2eec7dc
|
7
|
+
data.tar.gz: 737f381fd4c8abc61648cceb93b0ff10a7796ca9949b1bbd36612da9164be3b6ee86eb4917cf0254836dc79908a262e5358a0b96cb2cf3c672504f18b9ef98a2
|
data/CHANGELOG.md
CHANGED
data/gitlab-fog-google.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ["nat@natwelch.com", "temikus@google.com"]
|
10
10
|
spec.summary = "Module for the 'fog' gem to support Google."
|
11
11
|
spec.description = "This library can be used as a module for `fog` or as standalone provider to use the Google Cloud in applications."
|
12
|
-
spec.homepage = "https://
|
12
|
+
spec.homepage = "https://gitlab.com/gitlab-org/gitlab-fog-google"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
# As of 0.1.1
|
21
|
-
spec.required_ruby_version = "
|
21
|
+
spec.required_ruby_version = ">= 2.0"
|
22
22
|
|
23
23
|
# Locked until https://github.com/fog/fog-google/issues/417 is resolved
|
24
24
|
spec.add_dependency "fog-core", "<= 2.1.0"
|
data/lib/fog/google/shared.rb
CHANGED
@@ -87,10 +87,10 @@ module Fog
|
|
87
87
|
# Applies given options to the client instance
|
88
88
|
#
|
89
89
|
# @param [Google::Apis::Core::BaseService] service API service client instance
|
90
|
-
# @param [Hash]
|
91
|
-
# @param [Hash] _ignored Rest of the options (for convenience, ignored)
|
90
|
+
# @param [Hash] options (all ignored a.t.m., except :google_client_options)
|
92
91
|
# @return [void]
|
93
|
-
def apply_client_options(service,
|
92
|
+
def apply_client_options(service, options = {})
|
93
|
+
google_client_options = options[:google_client_options]
|
94
94
|
return if google_client_options.nil? || google_client_options.empty?
|
95
95
|
(service.client_options.members & google_client_options.keys).each do |option|
|
96
96
|
service.client_options[option] = google_client_options[option]
|
data/lib/fog/google/version.rb
CHANGED
@@ -105,7 +105,7 @@ module Fog
|
|
105
105
|
|
106
106
|
options[:predefined_acl] ||= @predefined_acl
|
107
107
|
|
108
|
-
service.put_object(directory.key, key, body, options)
|
108
|
+
service.put_object(directory.key, key, body, **options)
|
109
109
|
self.content_length = Fog::Storage.get_body_size(body)
|
110
110
|
self.content_type ||= Fog::Storage.get_content_type(body)
|
111
111
|
true
|
@@ -33,7 +33,7 @@ module Fog
|
|
33
33
|
|
34
34
|
def get(key, options = {}, &block)
|
35
35
|
requires :directory
|
36
|
-
data = service.get_object(directory.key, key, options, &block).to_h
|
36
|
+
data = service.get_object(directory.key, key, **options, &block).to_h
|
37
37
|
new(data)
|
38
38
|
rescue ::Google::Apis::ClientError => e
|
39
39
|
raise e unless e.status_code == 404
|
@@ -53,11 +53,11 @@ module Fog
|
|
53
53
|
:options => request_options
|
54
54
|
}
|
55
55
|
|
56
|
-
object = @storage_json.get_object(bucket_name, object_name, all_opts).to_h
|
56
|
+
object = @storage_json.get_object(bucket_name, object_name, **all_opts).to_h
|
57
57
|
@storage_json.get_object(
|
58
58
|
bucket_name,
|
59
59
|
object_name,
|
60
|
-
all_opts.merge(:download_dest => buf.path)
|
60
|
+
**all_opts.merge(:download_dest => buf.path)
|
61
61
|
)
|
62
62
|
|
63
63
|
if block_given?
|
@@ -11,10 +11,12 @@ module Fog
|
|
11
11
|
prefix: nil, projection: nil)
|
12
12
|
@storage_json.list_buckets(
|
13
13
|
@project,
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
**{
|
15
|
+
:max_results => max_results,
|
16
|
+
:page_token => page_token,
|
17
|
+
:prefix => prefix,
|
18
|
+
:projection => projection
|
19
|
+
}
|
18
20
|
)
|
19
21
|
end
|
20
22
|
end
|
@@ -12,7 +12,7 @@ module Fog
|
|
12
12
|
raise ArgumentError.new("bucket_name is required") unless bucket_name
|
13
13
|
raise ArgumentError.new("acl is required") unless acl
|
14
14
|
|
15
|
-
acl_update = ::Google::Apis::StorageV1::BucketAccessControl.new(acl)
|
15
|
+
acl_update = ::Google::Apis::StorageV1::BucketAccessControl.new(**acl)
|
16
16
|
@storage_json.insert_bucket_access_control(bucket_name, acl_update)
|
17
17
|
end
|
18
18
|
end
|
@@ -15,7 +15,7 @@ module Fog
|
|
15
15
|
raise ArgumentError.new("object_name is required") unless object_name
|
16
16
|
raise ArgumentError.new("acl is required") unless acl
|
17
17
|
|
18
|
-
acl_object = ::Google::Apis::StorageV1::ObjectAccessControl.new(acl)
|
18
|
+
acl_object = ::Google::Apis::StorageV1::ObjectAccessControl.new(**acl)
|
19
19
|
|
20
20
|
@storage_json.insert_object_access_control(
|
21
21
|
bucket_name, object_name, acl_object
|
@@ -109,7 +109,7 @@ module Fog
|
|
109
109
|
options["Expires"] = expires if expires
|
110
110
|
options.merge!(metadata)
|
111
111
|
|
112
|
-
data = service.put_object(directory.key, key, body, options)
|
112
|
+
data = service.put_object(directory.key, key, body, **options)
|
113
113
|
merge_attributes(data.headers.reject { |key, _value| ["Content-Length", "Content-Type"].include?(key) })
|
114
114
|
self.content_length = Fog::Storage.get_body_size(body)
|
115
115
|
self.content_type ||= Fog::Storage.get_content_type(body)
|
@@ -1,6 +1,8 @@
|
|
1
1
|
require "helpers/test_helper"
|
2
2
|
require "helpers/test_collection"
|
3
3
|
require "retriable"
|
4
|
+
require 'google/apis/options'
|
5
|
+
require 'google/apis/errors'
|
4
6
|
|
5
7
|
# Use :test credentials in ~/.fog for live integration testing
|
6
8
|
# XXX not sure if this will work on Travis CI or not
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-fog-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nat Welch
|
8
8
|
- Artem Yakimenko
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fog-core
|
@@ -776,17 +776,17 @@ files:
|
|
776
776
|
- test/unit/storage/test_common_xml_collections.rb
|
777
777
|
- test/unit/storage/test_json_requests.rb
|
778
778
|
- test/unit/storage/test_xml_requests.rb
|
779
|
-
homepage: https://
|
779
|
+
homepage: https://gitlab.com/gitlab-org/gitlab-fog-google
|
780
780
|
licenses:
|
781
781
|
- MIT
|
782
782
|
metadata: {}
|
783
|
-
post_install_message:
|
783
|
+
post_install_message:
|
784
784
|
rdoc_options: []
|
785
785
|
require_paths:
|
786
786
|
- lib
|
787
787
|
required_ruby_version: !ruby/object:Gem::Requirement
|
788
788
|
requirements:
|
789
|
-
- - "
|
789
|
+
- - ">="
|
790
790
|
- !ruby/object:Gem::Version
|
791
791
|
version: '2.0'
|
792
792
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -795,8 +795,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
795
795
|
- !ruby/object:Gem::Version
|
796
796
|
version: '0'
|
797
797
|
requirements: []
|
798
|
-
rubygems_version: 3.
|
799
|
-
signing_key:
|
798
|
+
rubygems_version: 3.2.3
|
799
|
+
signing_key:
|
800
800
|
specification_version: 4
|
801
801
|
summary: Module for the 'fog' gem to support Google.
|
802
802
|
test_files:
|