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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab595e7918307d4a0a878511249810e27fedb6085917efe7f66968cfa799dfa4
4
- data.tar.gz: 6391e8ab7b30a6f696c6374808f414e686a0176c2515319ab9682659e6be43fa
3
+ metadata.gz: eec3026a74ac22db51ced6d640ba895888f9d0aa6f4039d02d5e6aa4c114e577
4
+ data.tar.gz: f8473ed87013e57d3ea33ae6986c74b9052640e1d8df0df049598174e37b28fb
5
5
  SHA512:
6
- metadata.gz: fdb61e087e3a4bdbed38e564889c6e7f402ecf2322d7a39c0338a8383640dc0c401af59a494470bb75db2f6eb9a0a1ed5b9c17cda9d55923ebbb3708bad317fe
7
- data.tar.gz: 51384abc641d3f77c48539d1a321351eb7eadf78f591ce7f7f3314efb916de3de15b3629cae181f10bb8b7edc47e8f52927fa71762fca64b3d93832d3c10c032
6
+ metadata.gz: 5c0616a0c85c5dde28ef58b0207da4b2a1ae0d3447ca6edf8d891abfdc8ae83635e21887a28d5b1df09ef175e5fc511217499e91a7b92345ed2f6861c2eec7dc
7
+ data.tar.gz: 737f381fd4c8abc61648cceb93b0ff10a7796ca9949b1bbd36612da9164be3b6ee86eb4917cf0254836dc79908a262e5358a0b96cb2cf3c672504f18b9ef98a2
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
6
6
 
7
7
  ## Next
8
8
 
9
+ ## 1.14.0
10
+
11
+ ### Development changes
12
+
13
+ #### Added
14
+
15
+ - Add support for Ruby 3.0 !5
16
+
9
17
  ## 1.13.0
10
18
 
11
19
  ### User-facing
@@ -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://github.com/fog/fog-google"
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 = "~> 2.0"
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"
@@ -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] google_client_options Service client options to apply
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, google_client_options: nil, **_ignored)
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]
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Google
3
- VERSION = "1.13.0".freeze
3
+ VERSION = "1.14.0".freeze
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@ module Fog
5
5
  model Fog::Storage::GoogleJSON::Directory
6
6
 
7
7
  def all(opts = {})
8
- data = service.list_buckets(opts).to_h[:items] || []
8
+ data = service.list_buckets(**opts).to_h[:items] || []
9
9
  load(data)
10
10
  end
11
11
 
@@ -52,7 +52,7 @@ module Fog
52
52
 
53
53
  def save
54
54
  requires :key
55
- service.put_bucket(key, attributes)
55
+ service.put_bucket(key, **attributes)
56
56
  true
57
57
  end
58
58
  end
@@ -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
- :max_results => max_results,
15
- :page_token => page_token,
16
- :prefix => prefix,
17
- :projection => projection
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
@@ -31,7 +31,7 @@ module Fog
31
31
 
32
32
  @storage_json.list_objects(
33
33
  bucket,
34
- options.select { |k, _| allowed_opts.include? k }
34
+ **options.select { |k, _| allowed_opts.include? k }
35
35
  )
36
36
  end
37
37
  end
@@ -19,7 +19,7 @@ module Fog
19
19
  predefined_default_object_acl: nil,
20
20
  **options)
21
21
  bucket = ::Google::Apis::StorageV1::Bucket.new(
22
- options.merge(:name => bucket_name)
22
+ **options.merge(:name => bucket_name)
23
23
  )
24
24
 
25
25
  @storage_json.insert_bucket(
@@ -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
@@ -51,7 +51,7 @@ module Fog
51
51
  data, options = normalize_data(data, options)
52
52
 
53
53
  object_config = ::Google::Apis::StorageV1::Object.new(
54
- options.merge(:name => object_name)
54
+ **options.merge(:name => object_name)
55
55
  )
56
56
 
57
57
  @storage_json.insert_object(
@@ -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.13.0
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-03-10 00:00:00.000000000 Z
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://github.com/fog/fog-google
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.1.4
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: