Skip to content

Commit

Permalink
Merge pull request #2699 from marcogregorius/test-ruby-3.2
Browse files Browse the repository at this point in the history
Test against Ruby 3.2 in CI for 1.x
  • Loading branch information
mshibuya committed Sep 24, 2023
2 parents c5565e0 + 2e5af12 commit 45ad4c1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -28,6 +28,15 @@ jobs:
gemfile: gemfiles/rails-7-0.gemfile
experimental: false
- ruby: '3.1'
gemfile: gemfiles/rails-7-0.gemfile
experimental: false
- ruby: '3.1'
gemfile: gemfiles/rails-main.gemfile
experimental: false
- ruby: '3.2'
gemfile: gemfiles/rails-7-0.gemfile
experimental: false
- ruby: '3.2'
gemfile: gemfiles/rails-main.gemfile
experimental: false
exclude:
Expand Down
6 changes: 5 additions & 1 deletion carrierwave.gemspec
Expand Up @@ -40,7 +40,11 @@ Gem::Specification.new do |s|
s.add_development_dependency "fog-rackspace"
s.add_development_dependency "mini_magick", ">= 3.6.0"
if RUBY_ENGINE != 'jruby'
s.add_development_dependency "rmagick", "~> 2.16"
if RUBY_VERSION < '3.2'
s.add_development_dependency "rmagick", "~> 2.16"
else
s.add_development_dependency "rmagick", ">= 2.16"
end
end
s.add_development_dependency "timecop"
s.add_development_dependency "generator_spec", ">= 0.9.1"
Expand Down
2 changes: 1 addition & 1 deletion lib/carrierwave/processing/rmagick.rb
Expand Up @@ -228,7 +228,7 @@ def resize_and_pad(width, height, background=:transparent, gravity=::Magick::Cen
height = dimension_from height
manipulate! do |img|
img.resize_to_fit!(width, height)
new_img = ::Magick::Image.new(width, height) { self.background_color = background == :transparent ? 'rgba(255,255,255,0)' : background.to_s }
new_img = ::Magick::Image.new(width, height) { |img| img.background_color = background == :transparent ? 'rgba(255,255,255,0)' : background.to_s }
if background == :transparent
filled = new_img.matte_floodfill(1, 1)
else
Expand Down

0 comments on commit 45ad4c1

Please sign in to comment.