Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MiniMagick: use read method to get file data #2349

Merged
merged 2 commits into from
Dec 24, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
MiniMagick: use read method to get file data
  • Loading branch information
artygus committed Oct 30, 2018
commit b149dcfd3dca5ed5cc4ed05c4d3ee796a422cbab
6 changes: 1 addition & 5 deletions lib/carrierwave/processing/mini_magick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,7 @@ def dimension_from(value)
end

def mini_magick_image
if url
::MiniMagick::Image.open(url)
else
::MiniMagick::Image.open(current_path)
end
::MiniMagick::Image.read(self.read)
end

end # MiniMagick
Expand Down
1 change: 0 additions & 1 deletion spec/processing/mini_magick_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
before do
FileUtils.cp(landscape_file_path, landscape_copy_file_path)
allow(instance).to receive(:cached?).and_return true
allow(instance).to receive(:url).and_return nil
allow(instance).to receive(:file).and_return(CarrierWave::SanitizedFile.new(landscape_copy_file_path))
end

Expand Down