mirror of https://github.com/rails/rails
Unlock `azure-storage-blob` version to use version 2.0
`azure-storage-blob` 2.0.0 has been released.
https://rubygems.org/gems/azure-storage-blob/versions/2.0.0
According to this commit and changelog, `azure-storage-blob` 1.1.0 did not support Ruby 2.6 and higher.
As of right now, Rails master branch should support Ruby 2.5.0, 2.6.0 and 2.7.0
then it should be appropriate to unlock `azure-storage-blob` version.
252e3f06a5
This commit addresses this following error:
```ruby
% cd activestorage
% bundle exec rake test
Traceback (most recent call last):
14: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `<main>'
13: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `select'
12: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `block in <main>'
11: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
10: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
9: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:7:in `<top (required)>'
8: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:8:in `<class:AzureStorageServiceTest>'
7: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service.rb:51:in `configure'
6: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:8:in `build'
5: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:17:in `build'
4: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:30:in `resolve'
3: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
2: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
1: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/azure_storage_service.rb:3:in `<top (required)>'
/Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/rubygems_integration.rb:346:in `block (2 levels) in replace_gem': can't activate azure-storage-blob (~> 1.1), already activated azure-storage-blob-2.0.0. Make sure all dependencies are added to Gemfile. (Gem::LoadError)
11: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `<main>'
10: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:5:in `select'
9: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb:17:in `block in <main>'
8: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
7: from /Users/yahonda/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/zeitwerk-2.3.0/lib/zeitwerk/kernel.rb:23:in `require'
6: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:7:in `<top (required)>'
5: from /Users/yahonda/src/github.com/rails/rails/activestorage/test/service/azure_storage_service_test.rb:8:in `<class:AzureStorageServiceTest>'
4: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service.rb:51:in `configure'
3: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:8:in `build'
2: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:17:in `build'
1: from /Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:29:in `resolve'
/Users/yahonda/src/github.com/rails/rails/activestorage/lib/active_storage/service/configurator.rb:33:in `rescue in resolve': Missing service adapter for "AzureStorage" (RuntimeError)
rake aborted!
```
* Update Gemfile.lock to bump azure-storage-blob version
```
% bundle update --conservative faraday azure-storage-blob google-cloud-storage`
```
- How to find gem name to update by setting `gem "azure-storage-blob", "= 2.0.0"` temporarily
```ruby
% git diff
diff --git a/Gemfile b/Gemfile
index 5fdaceab2f..6be7dccf4b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -84,7 +84,7 @@ end
group :storage do
gem "aws-sdk-s3", require: false
gem "google-cloud-storage", "~> 1.11", require: false
- gem "azure-storage-blob", require: false
+ gem "azure-storage-blob", "= 2.0.0", require: false # Use 2.0.0 temporarily to find which gems need bump
gem "image_processing", "~> 1.2"
end
% bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.....
Bundler could not find compatible versions for gem "faraday":
In snapshot (Gemfile.lock):
faraday (= 0.17.1)
In Gemfile:
azure-storage-blob (= 2.0.0) was resolved to 2.0.0, which depends on
azure-storage-common (~> 2.0) was resolved to 2.0.1, which depends on
faraday (~> 1.0)
google-cloud-storage (~> 1.11) was resolved to 1.25.0, which depends on
googleauth (~> 0.9) was resolved to 0.10.0, which depends on
faraday (~> 0.12)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
% git checkout -f Gemfile
% bundle update --conservative faraday azure-storage-blob google-cloud-storage
```
This commit is contained in:
parent
fba1064153
commit
dad4026f94
46
Gemfile.lock
46
Gemfile.lock
|
@ -135,17 +135,13 @@ GEM
|
|||
aws-sigv4 (~> 1.1)
|
||||
aws-sigv4 (1.1.0)
|
||||
aws-eventstream (~> 1.0, >= 1.0.2)
|
||||
azure-core (0.1.15)
|
||||
faraday (~> 0.9)
|
||||
faraday_middleware (~> 0.10)
|
||||
nokogiri (~> 1.6)
|
||||
azure-storage-blob (1.1.0)
|
||||
azure-core (~> 0.1.13)
|
||||
azure-storage-common (~> 1.0)
|
||||
nokogiri (~> 1.6, >= 1.6.8)
|
||||
azure-storage-common (1.1.0)
|
||||
azure-core (~> 0.1.13)
|
||||
nokogiri (~> 1.6, >= 1.6.8)
|
||||
azure-storage-blob (2.0.0)
|
||||
azure-storage-common (~> 2.0)
|
||||
nokogiri (~> 1.10.4)
|
||||
azure-storage-common (2.0.1)
|
||||
faraday (~> 1.0)
|
||||
faraday_middleware (~> 1.0.0.rc1)
|
||||
nokogiri (~> 1.10.4)
|
||||
backburner (1.5.0)
|
||||
beaneater (~> 1.0)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.1)
|
||||
|
@ -209,7 +205,7 @@ GEM
|
|||
delayed_job_active_record (4.1.4)
|
||||
activerecord (>= 3.0, < 6.1)
|
||||
delayed_job (>= 3.0, < 5)
|
||||
digest-crc (0.4.1)
|
||||
digest-crc (0.5.1)
|
||||
em-http-request (1.1.5)
|
||||
addressable (>= 2.3.4)
|
||||
cookiejar (!= 0.3.1)
|
||||
|
@ -224,10 +220,10 @@ GEM
|
|||
event_emitter (0.2.6)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.7.0)
|
||||
faraday (0.17.1)
|
||||
faraday (1.0.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday_middleware (0.13.1)
|
||||
faraday (>= 0.7.4, < 1.0)
|
||||
faraday_middleware (1.0.0.rc1)
|
||||
faraday (~> 1.0)
|
||||
faye (1.2.4)
|
||||
cookiejar (>= 0.3.0)
|
||||
em-http-request (>= 0.3.0)
|
||||
|
@ -248,7 +244,7 @@ GEM
|
|||
raabro (~> 1.1)
|
||||
globalid (0.4.2)
|
||||
activesupport (>= 4.2.0)
|
||||
google-api-client (0.36.2)
|
||||
google-api-client (0.37.2)
|
||||
addressable (~> 2.5, >= 2.5.1)
|
||||
googleauth (~> 0.9)
|
||||
httpclient (>= 2.8.1, < 3.0)
|
||||
|
@ -256,19 +252,21 @@ GEM
|
|||
representable (~> 3.0)
|
||||
retriable (>= 2.0, < 4.0)
|
||||
signet (~> 0.12)
|
||||
google-cloud-core (1.4.1)
|
||||
google-cloud-core (1.5.0)
|
||||
google-cloud-env (~> 1.0)
|
||||
google-cloud-env (1.3.0)
|
||||
faraday (~> 0.11)
|
||||
google-cloud-storage (1.25.0)
|
||||
google-cloud-errors (~> 1.0)
|
||||
google-cloud-env (1.3.1)
|
||||
faraday (>= 0.17.3, < 2.0)
|
||||
google-cloud-errors (1.0.0)
|
||||
google-cloud-storage (1.25.1)
|
||||
addressable (~> 2.5)
|
||||
digest-crc (~> 0.4)
|
||||
google-api-client (~> 0.33)
|
||||
google-cloud-core (~> 1.2)
|
||||
googleauth (~> 0.9)
|
||||
mini_mime (~> 1.0)
|
||||
googleauth (0.10.0)
|
||||
faraday (~> 0.12)
|
||||
googleauth (0.11.0)
|
||||
faraday (>= 0.17.3, < 2.0)
|
||||
jwt (>= 1.4, < 3.0)
|
||||
memoist (~> 0.16)
|
||||
multi_json (~> 1.11)
|
||||
|
@ -457,9 +455,9 @@ GEM
|
|||
rack-protection (>= 2.0.0)
|
||||
redis (>= 4.1.0)
|
||||
sigdump (0.2.4)
|
||||
signet (0.12.0)
|
||||
signet (0.13.0)
|
||||
addressable (~> 2.3)
|
||||
faraday (~> 0.9)
|
||||
faraday (>= 0.17.3, < 2.0)
|
||||
jwt (>= 1.5, < 3.0)
|
||||
multi_json (~> 1.10)
|
||||
sinatra (2.0.7)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
gem "azure-storage-blob", "~> 1.1"
|
||||
gem "azure-storage-blob", ">= 1.1"
|
||||
|
||||
require "active_support/core_ext/numeric/bytes"
|
||||
require "azure/storage/blob"
|
||||
|
|
Loading…
Reference in New Issue