Skip to content

Commit

Permalink
Only load fog-rackspace on Rails 6.x due to incompatibility with fog-…
Browse files Browse the repository at this point in the history
…core

Refs. fog/fog-rackspace#43
  • Loading branch information
mshibuya committed Apr 14, 2024
1 parent aaeaca3 commit 287e9a1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion carrierwave.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Gem::Specification.new do |s|
s.add_development_dependency "fog-aws"
s.add_development_dependency "fog-google", ["~> 1.7", "!= 1.12.1"]
s.add_development_dependency "fog-local"
s.add_development_dependency "fog-rackspace"
s.add_development_dependency "mini_magick", ">= 3.6.0"

if RUBY_ENGINE != 'jruby'
Expand Down
3 changes: 2 additions & 1 deletion gemfiles/rails-6-0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ source "https://rubygems.org"

gem "rails", "~> 6.0.0"
gem "activemodel-serializers-xml"
gem 'sqlite3', platforms: :ruby
gem "sqlite3", platforms: :ruby
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby, :truffleruby]
gem "fog-google", "~> 1.13.0" if RUBY_VERSION < '2.7'
gem "fog-rackspace"

gemspec :path => "../"
3 changes: 2 additions & 1 deletion gemfiles/rails-6-1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ source "https://rubygems.org"

gem "rails", "~> 6.1.0"
gem "activemodel-serializers-xml"
gem 'sqlite3', platforms: :ruby
gem "sqlite3", platforms: :ruby
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby, :truffleruby]
gem "fog-google", "~> 1.13.0" if RUBY_VERSION < '2.7'
gem "fog-rackspace"

gemspec :path => "../"
2 changes: 1 addition & 1 deletion gemfiles/rails-7-0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gem "rails", "~> 7.0.0"
gem "activemodel-serializers-xml"
gem 'sqlite3', platforms: :ruby
gem "sqlite3", platforms: :ruby
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby, :truffleruby]

gemspec :path => "../"
2 changes: 1 addition & 1 deletion gemfiles/rails-7-1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gem "rails", "~> 7.1.0"
gem "activemodel-serializers-xml"
gem 'sqlite3', platforms: :ruby
gem "sqlite3", platforms: :ruby
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby, :truffleruby]
gem "observer" # Workaround for https://github.com/rmagick/rmagick/pull/1411

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails-main.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gem "rails", github: "rails/rails", branch: "main"
gem "activemodel-serializers-xml"
gem 'sqlite3', platforms: :ruby
gem "sqlite3", platforms: :ruby
gem "activerecord-jdbcsqlite3-adapter", platform: [:jruby, :truffleruby]

gemspec :path => "../"
6 changes: 5 additions & 1 deletion spec/storage/fog_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
require 'fog/aws'
require 'fog/google'
require 'fog/local'
require 'fog/rackspace'
begin
require 'fog/rackspace'
rescue LoadError
# Can be missing in CI
end

unless ENV['REMOTE'] == 'true'
Fog.mock!
Expand Down

0 comments on commit 287e9a1

Please sign in to comment.