Skip to content

Commit 4967750

Browse files
committed
Revert "Revert "Merge pull request #2478 from cloudfoundry/dependabot/bundler/fog-aws-3.12.0""
This reverts commit 197a975.
1 parent 8ce521e commit 4967750

File tree

5 files changed

+58
-34
lines changed

5 files changed

+58
-34
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ gem 'fog-azure-rm', git: 'https://github.com/fog/fog-azure-rm.git', branch: 'fog
6363
gem 'fog-google', '~> 1.18.0'
6464
gem 'fog-local'
6565
gem 'fog-openstack'
66+
gem 'fog-core', '~> 2.1.2'
6667

6768
gem 'cf-uaa-lib', '~> 4.0.1'
6869
gem 'vcap-concurrency', git: 'https://github.com/cloudfoundry/vcap-concurrency.git', ref: '2a5b0179'

Gemfile.lock

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ GIT
1111
branch: fog-arm-cf
1212
specs:
1313
fog-azure-rm (0.4.7)
14-
azure-storage (>= 0.11.5.preview, < 1.0)
14+
azure-storage-blob (~> 1.1)
15+
azure-storage-common (~> 1.1)
1516
azure_mgmt_compute (~> 0.9.0)
1617
azure_mgmt_dns (~> 0.9.0)
1718
azure_mgmt_key_vault (~> 0.9.0)
@@ -20,8 +21,8 @@ GIT
2021
azure_mgmt_sql (~> 0.9.0)
2122
azure_mgmt_storage (~> 0.9.0)
2223
azure_mgmt_traffic_manager (~> 0.9.0)
23-
fog-core (~> 1.43)
24-
fog-json (~> 1.0.2)
24+
fog-core (>= 1.43)
25+
fog-json (>= 1.0.2)
2526
mime-types (~> 3.0)
2627
vhd (= 0.0.4)
2728

@@ -79,7 +80,7 @@ GEM
7980
i18n
8081
ast (2.4.2)
8182
awesome_print (1.9.2)
82-
azure-core (0.1.14)
83+
azure-core (0.1.15)
8384
faraday (~> 0.9)
8485
faraday_middleware (~> 0.10)
8586
nokogiri (~> 1.6)
@@ -88,6 +89,13 @@ GEM
8889
faraday (~> 0.9)
8990
faraday_middleware (~> 0.10)
9091
nokogiri (~> 1.6, >= 1.6.8)
92+
azure-storage-blob (1.1.0)
93+
azure-core (~> 0.1.13)
94+
azure-storage-common (~> 1.0)
95+
nokogiri (~> 1.6, >= 1.6.8)
96+
azure-storage-common (1.1.0)
97+
azure-core (~> 0.1.13)
98+
nokogiri (~> 1.6, >= 1.6.8)
9199
azure_mgmt_compute (0.9.0)
92100
ms_rest_azure (~> 0.7.0)
93101
azure_mgmt_dns (0.9.0)
@@ -107,7 +115,7 @@ GEM
107115
backport (1.2.0)
108116
beefcake (1.0.0)
109117
benchmark (0.2.0)
110-
bit-struct (0.16)
118+
bit-struct (0.17)
111119
bits_service_client (3.4.0)
112120
activesupport
113121
statsd-ruby (~> 1.4.0)
@@ -136,8 +144,7 @@ GEM
136144
debase (0.2.5.beta2)
137145
debase-ruby_core_source (>= 0.10.12)
138146
debase-ruby_core_source (0.10.12)
139-
declarative (0.0.10)
140-
declarative-option (0.1.0)
147+
declarative (0.0.20)
141148
delayed_job (4.1.9)
142149
activesupport (>= 3.0, < 6.2)
143150
diff-lcs (1.5.0)
@@ -158,10 +165,10 @@ GEM
158165
excon (0.91.0)
159166
faraday (0.17.4)
160167
multipart-post (>= 1.2, < 3)
161-
faraday-cookie_jar (0.0.6)
162-
faraday (>= 0.7.4)
168+
faraday-cookie_jar (0.0.7)
169+
faraday (>= 0.8.0)
163170
http-cookie (~> 1.0.0)
164-
faraday_middleware (0.12.2)
171+
faraday_middleware (0.14.0)
165172
faraday (>= 0.7.4, < 1.0)
166173
ffi (1.15.5)
167174
ffi-compiler (1.0.1)
@@ -175,30 +182,31 @@ GEM
175182
fog-json
176183
ipaddress (~> 0.8)
177184
xml-simple (~> 1.1)
178-
fog-aws (2.0.1)
179-
fog-core (~> 1.38)
180-
fog-json (~> 1.0)
185+
fog-aws (3.12.0)
186+
fog-core (~> 2.1)
187+
fog-json (~> 1.1)
181188
fog-xml (~> 0.1)
182189
ipaddress (~> 0.8)
183-
fog-core (1.45.0)
190+
fog-core (2.1.2)
184191
builder
185192
excon (~> 0.58)
186193
formatador (~> 0.2)
194+
mime-types
187195
fog-google (1.7.1)
188196
fog-core
189197
fog-json
190198
fog-xml
191199
google-api-client (~> 0.23.0)
192-
fog-json (1.0.2)
193-
fog-core (~> 1.0)
200+
fog-json (1.2.0)
201+
fog-core
194202
multi_json (~> 1.10)
195203
fog-local (0.8.0)
196204
fog-core (>= 1.27, < 3.0)
197-
fog-openstack (0.3.10)
198-
fog-core (>= 1.45, <= 2.1.0)
205+
fog-openstack (1.0.11)
206+
fog-core (~> 2.1)
199207
fog-json (>= 1.0)
200208
ipaddress (>= 0.8)
201-
fog-xml (0.1.3)
209+
fog-xml (0.1.4)
202210
fog-core
203211
nokogiri (>= 1.5.11, < 2.0.0)
204212
formatador (0.3.0)
@@ -262,7 +270,7 @@ GEM
262270
json_pure (2.6.1)
263271
jsonpath (1.1.0)
264272
multi_json
265-
jwt (2.2.1)
273+
jwt (2.3.0)
266274
kramdown (2.3.1)
267275
rexml
268276
kramdown-parser-gfm (1.1.0)
@@ -286,12 +294,12 @@ GEM
286294
nokogiri (>= 1.5.9)
287295
machinist (1.0.6)
288296
membrane (1.1.0)
289-
memoist (0.16.0)
297+
memoist (0.16.2)
290298
method_source (1.0.0)
291299
middleware (0.1.0)
292300
mime-types (3.4.1)
293301
mime-types-data (~> 3.2015)
294-
mime-types-data (3.2021.1115)
302+
mime-types-data (3.2022.0105)
295303
mini_portile2 (2.7.1)
296304
minitest (5.15.0)
297305
ms_rest (0.6.4)
@@ -323,7 +331,7 @@ GEM
323331
nokogiri (1.13.1-x86_64-linux)
324332
racc (~> 1.4)
325333
oj (3.13.11)
326-
os (1.0.1)
334+
os (1.1.4)
327335
palm_civet (1.1.0)
328336
parallel (1.21.0)
329337
parallel_tests (3.7.3)
@@ -368,9 +376,9 @@ GEM
368376
ffi (~> 1.0)
369377
recursive-open-struct (1.1.3)
370378
regexp_parser (2.2.0)
371-
representable (3.0.4)
379+
representable (3.1.1)
372380
declarative (< 0.1.0)
373-
declarative-option (< 0.2.0)
381+
trailblazer-option (>= 0.1.1, < 0.2.0)
374382
uber (< 0.2.0)
375383
rest-client (2.1.0)
376384
http-accept (>= 1.7.0, < 2.0)
@@ -442,9 +450,9 @@ GEM
442450
pg (>= 0.18.0, != 1.2.0)
443451
sequel (>= 4.38.0)
444452
sexp_processor (4.7.0)
445-
signet (0.11.0)
446-
addressable (~> 2.3)
447-
faraday (~> 0.9)
453+
signet (0.16.0)
454+
addressable (~> 2.8)
455+
faraday (>= 0.17.3, < 2.0)
448456
jwt (>= 1.5, < 3.0)
449457
multi_json (~> 1.10)
450458
simplecov (0.13.0)
@@ -497,7 +505,8 @@ GEM
497505
thread_safe (0.3.6)
498506
tilt (2.0.10)
499507
timecop (0.9.4)
500-
timeliness (0.3.10)
508+
timeliness (0.4.4)
509+
trailblazer-option (0.1.2)
501510
tzinfo (2.0.4)
502511
concurrent-ruby (~> 1.0)
503512
uber (0.1.0)
@@ -550,6 +559,7 @@ DEPENDENCIES
550559
fog-aws
551560
fog-azure-rm!
552561
fog-google (~> 1.7.1)
562+
fog-core (~> 2.1.2)
553563
fog-local
554564
fog-openstack
555565
googleapis-common-protos (>= 1.3.12)

lib/cloud_controller/blobstore/fog/fog_client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def blob(key)
114114
end
115115

116116
def files_for(prefix, _ignored_directory_prefixes=[])
117-
if connection.is_a? Fog::Storage::Local::Real
117+
if connection.is_a? Fog::Local::Storage::Real
118118
directory = connection.directories.get(File.join(dir.key, prefix || ''))
119119
directory ? directory.files : []
120120
else
@@ -126,7 +126,7 @@ def ensure_bucket_exists
126126
return if local?
127127

128128
options = { max_keys: 1 }
129-
options['limit'] = 1 if connection.service == Fog::Storage::OpenStack
129+
options['limit'] = 1 if connection.service == Fog::OpenStack::Storage
130130
connection.directories.get(@directory_key, options) || connection.directories.create(key: @directory_key, public: false)
131131
end
132132

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1+
require 'fog/core'
2+
3+
# This can be removed once fog-google fixes
4+
# https://github.com/fog/fog-google/issues/421, which will allow us to upgrade
5+
# fog-core to 2.2.4.
6+
original = Fog::Logger[:deprecation]
7+
Fog::Logger[:deprecation] = nil
8+
19
require 'fog/aliyun'
10+
# Hack until https://github.com/fog/fog-aliyun/pull/155 is merged and released
11+
Fog::Aliyun::Compute = Fog::Compute::Aliyun
12+
213
require 'fog/aws'
314
require 'fog/local'
415
require 'fog/google'
516
require 'fog/azurerm'
617
require 'fog/openstack'
18+
19+
Fog::Logger[:deprecation] = original

spec/unit/lib/cloud_controller/blobstore/fog/fog_client_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -729,21 +729,21 @@ def upload_tmpfile(client, key='abcdef')
729729
end
730730

731731
it 'gets the bucket' do
732-
expect_any_instance_of(Fog::Storage::AWS::Directories).to receive(:get).with(directory_key, max_keys: 1)
732+
expect_any_instance_of(Fog::AWS::Storage::Directories).to receive(:get).with(directory_key, max_keys: 1)
733733
subject.ensure_bucket_exists
734734
end
735735

736736
context 'the bucket exists' do
737737
it 'does not create the bucket' do
738738
subject.ensure_bucket_exists
739-
expect_any_instance_of(Fog::Storage::AWS::Directories).not_to receive(:create).with(key: directory_key, public: false)
739+
expect_any_instance_of(Fog::AWS::Storage::Directories).not_to receive(:create).with(key: directory_key, public: false)
740740
subject.ensure_bucket_exists
741741
end
742742
end
743743

744744
context 'the bucket does not exist' do
745745
it 'creates the bucket' do
746-
expect_any_instance_of(Fog::Storage::AWS::Directories).to receive(:create).with(key: directory_key, public: false)
746+
expect_any_instance_of(Fog::AWS::Storage::Directories).to receive(:create).with(key: directory_key, public: false)
747747
subject.ensure_bucket_exists
748748
end
749749
end

0 commit comments

Comments
 (0)