Skip to content

Commit d52bf63

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

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
@@ -64,6 +64,7 @@ gem 'fog-azure-rm', git: 'https://github.com/fog/fog-azure-rm.git', branch: 'fog
6464
gem 'fog-google', '~> 1.18.0'
6565
gem 'fog-local'
6666
gem 'fog-openstack'
67+
gem 'fog-core', '~> 2.1.2'
6768

6869
gem 'cf-uaa-lib', '~> 4.0.1'
6970
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
@@ -10,7 +10,8 @@ GIT
1010
revision: 69ba1d7e9f82b7a71214b92fa6fa95169b539ed3
1111
branch: fog-arm-cf specs:
1212
fog-azure-rm (0.4.7)
13-
azure-storage (>= 0.11.5.preview, < 1.0)
13+
azure-storage-blob (~> 1.1)
14+
azure-storage-common (~> 1.1)
1415
azure_mgmt_compute (~> 0.9.0)
1516
azure_mgmt_dns (~> 0.9.0)
1617
azure_mgmt_key_vault (~> 0.9.0)
@@ -19,8 +20,8 @@ GIT
1920
azure_mgmt_sql (~> 0.9.0)
2021
azure_mgmt_storage (~> 0.9.0)
2122
azure_mgmt_traffic_manager (~> 0.9.0)
22-
fog-core (~> 1.43)
23-
fog-json (~> 1.0.2)
23+
fog-core (>= 1.43)
24+
fog-json (>= 1.0.2)
2425
mime-types (~> 3.0)
2526
vhd (= 0.0.4)
2627

@@ -78,7 +79,7 @@ GEM
7879
i18n
7980
ast (2.4.2)
8081
awesome_print (1.9.2)
81-
azure-core (0.1.14)
82+
azure-core (0.1.15)
8283
faraday (~> 0.9)
8384
faraday_middleware (~> 0.10)
8485
nokogiri (~> 1.6)
@@ -87,6 +88,13 @@ GEM
8788
faraday (~> 0.9)
8889
faraday_middleware (~> 0.10)
8990
nokogiri (~> 1.6, >= 1.6.8)
91+
azure-storage-blob (1.1.0)
92+
azure-core (~> 0.1.13)
93+
azure-storage-common (~> 1.0)
94+
nokogiri (~> 1.6, >= 1.6.8)
95+
azure-storage-common (1.1.0)
96+
azure-core (~> 0.1.13)
97+
nokogiri (~> 1.6, >= 1.6.8)
9098
azure_mgmt_compute (0.9.0)
9199
ms_rest_azure (~> 0.7.0)
92100
azure_mgmt_dns (0.9.0)
@@ -106,7 +114,7 @@ GEM
106114
backport (1.2.0)
107115
beefcake (1.0.0)
108116
benchmark (0.2.0)
109-
bit-struct (0.16)
117+
bit-struct (0.17)
110118
bits_service_client (3.4.0)
111119
activesupport
112120
statsd-ruby (~> 1.4.0)
@@ -135,8 +143,7 @@ GEM
135143
debase (0.2.5.beta2)
136144
debase-ruby_core_source (>= 0.10.12)
137145
debase-ruby_core_source (0.10.12)
138-
declarative (0.0.10)
139-
declarative-option (0.1.0)
146+
declarative (0.0.20)
140147
delayed_job (4.1.9)
141148
activesupport (>= 3.0, < 6.2)
142149
diff-lcs (1.5.0)
@@ -157,10 +164,10 @@ GEM
157164
excon (0.91.0)
158165
faraday (0.17.4)
159166
multipart-post (>= 1.2, < 3)
160-
faraday-cookie_jar (0.0.6)
161-
faraday (>= 0.7.4)
167+
faraday-cookie_jar (0.0.7)
168+
faraday (>= 0.8.0)
162169
http-cookie (~> 1.0.0)
163-
faraday_middleware (0.12.2)
170+
faraday_middleware (0.14.0)
164171
faraday (>= 0.7.4, < 1.0)
165172
ffi (1.15.5)
166173
ffi-compiler (1.0.1)
@@ -174,30 +181,31 @@ GEM
174181
fog-json
175182
ipaddress (~> 0.8)
176183
xml-simple (~> 1.1)
177-
fog-aws (2.0.1)
178-
fog-core (~> 1.38)
179-
fog-json (~> 1.0)
184+
fog-aws (3.12.0)
185+
fog-core (~> 2.1)
186+
fog-json (~> 1.1)
180187
fog-xml (~> 0.1)
181188
ipaddress (~> 0.8)
182-
fog-core (1.45.0)
189+
fog-core (2.1.2)
183190
builder
184191
excon (~> 0.58)
185192
formatador (~> 0.2)
193+
mime-types
186194
fog-google (1.7.1)
187195
fog-core
188196
fog-json
189197
fog-xml
190198
google-api-client (~> 0.23.0)
191-
fog-json (1.0.2)
192-
fog-core (~> 1.0)
199+
fog-json (1.2.0)
200+
fog-core
193201
multi_json (~> 1.10)
194202
fog-local (0.8.0)
195203
fog-core (>= 1.27, < 3.0)
196-
fog-openstack (0.3.10)
197-
fog-core (>= 1.45, <= 2.1.0)
204+
fog-openstack (1.0.11)
205+
fog-core (~> 2.1)
198206
fog-json (>= 1.0)
199207
ipaddress (>= 0.8)
200-
fog-xml (0.1.3)
208+
fog-xml (0.1.4)
201209
fog-core
202210
nokogiri (>= 1.5.11, < 2.0.0)
203211
formatador (0.3.0)
@@ -261,7 +269,7 @@ GEM
261269
json_pure (2.6.1)
262270
jsonpath (1.1.0)
263271
multi_json
264-
jwt (2.2.1)
272+
jwt (2.3.0)
265273
kramdown (2.3.1)
266274
rexml
267275
kramdown-parser-gfm (1.1.0)
@@ -285,12 +293,12 @@ GEM
285293
nokogiri (>= 1.5.9)
286294
machinist (1.0.6)
287295
membrane (1.1.0)
288-
memoist (0.16.0)
296+
memoist (0.16.2)
289297
method_source (1.0.0)
290298
middleware (0.1.0)
291299
mime-types (3.4.1)
292300
mime-types-data (~> 3.2015)
293-
mime-types-data (3.2021.1115)
301+
mime-types-data (3.2022.0105)
294302
mini_portile2 (2.7.1)
295303
minitest (5.15.0)
296304
ms_rest (0.6.4)
@@ -322,7 +330,7 @@ GEM
322330
nokogiri (1.13.1-x86_64-linux)
323331
racc (~> 1.4)
324332
oj (3.13.11)
325-
os (1.0.1)
333+
os (1.1.4)
326334
palm_civet (1.1.0)
327335
parallel (1.21.0)
328336
parallel_tests (3.7.3)
@@ -367,9 +375,9 @@ GEM
367375
ffi (~> 1.0)
368376
recursive-open-struct (1.1.3)
369377
regexp_parser (2.2.0)
370-
representable (3.0.4)
378+
representable (3.1.1)
371379
declarative (< 0.1.0)
372-
declarative-option (< 0.2.0)
380+
trailblazer-option (>= 0.1.1, < 0.2.0)
373381
uber (< 0.2.0)
374382
rest-client (2.1.0)
375383
http-accept (>= 1.7.0, < 2.0)
@@ -441,9 +449,9 @@ GEM
441449
pg (>= 0.18.0, != 1.2.0)
442450
sequel (>= 4.38.0)
443451
sexp_processor (4.7.0)
444-
signet (0.11.0)
445-
addressable (~> 2.3)
446-
faraday (~> 0.9)
452+
signet (0.16.0)
453+
addressable (~> 2.8)
454+
faraday (>= 0.17.3, < 2.0)
447455
jwt (>= 1.5, < 3.0)
448456
multi_json (~> 1.10)
449457
simplecov (0.13.0)
@@ -496,7 +504,8 @@ GEM
496504
thread_safe (0.3.6)
497505
tilt (2.0.10)
498506
timecop (0.9.4)
499-
timeliness (0.3.10)
507+
timeliness (0.4.4)
508+
trailblazer-option (0.1.2)
500509
tzinfo (2.0.4)
501510
concurrent-ruby (~> 1.0)
502511
uber (0.1.0)
@@ -549,6 +558,7 @@ DEPENDENCIES
549558
fog-aws
550559
fog-azure-rm!
551560
fog-google (~> 1.7.1)
561+
fog-core (~> 2.1.2)
552562
fog-local
553563
fog-openstack
554564
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)