lardawge / carrierwave_backgrounder

Offload CarrierWave's image processing and storage to a background process using ActiveJob or Sidekiq..
736 stars 402 forks source link

Add missing `require 'fileutils'` #294

Closed tricknotes closed 1 year ago

tricknotes commented 3 years ago

FileUtils is not loaded automatically. We should require it before use.

This PR fixes broken CI like the following:

Failures:
  1) CarrierWave::Workers::StoreAsset#perform removes tmp directory on success
     Failure/Error: expect(FileUtils).to receive(:rm_r).with(fixtures_path, :force => true).once

     NameError:
       uninitialized constant FileUtils
       Did you mean?  FileTest
     # ./spec/backgrounder/workers/store_asset_spec.rb:35:in `block (3 levels) in <top (required)>'
  2) CarrierWave::Workers::StoreAsset#perform does not remove the tmp directory if save! fails
     Failure/Error: expect(FileUtils).to receive(:rm_r).never

     NameError:
       uninitialized constant FileUtils
       Did you mean?  FileTest
     # ./spec/backgrounder/workers/store_asset_spec.rb:41:in `block (3 levels) in <top (required)>'

https://travis-ci.org/github/lardawge/carrierwave_backgrounder/jobs/749278439

lardawge commented 3 years ago

As far as I can tell it is. Open up an IRB console and it's loaded. Not sure why tests failed when adding 2.7 to travis. I have not seen the issue in master.

tricknotes commented 3 years ago

I have not seen the issue in master.

Yes, me too. I found the issue on this PR https://github.com/lardawge/carrierwave_backgrounder/pull/293. It seems all builds are broken.

tricknotes commented 3 years ago

I don't know why it causes, but I found a failing build against ruby-head on master. https://travis-ci.org/github/lardawge/carrierwave_backgrounder/builds/748457937

lardawge commented 1 year ago

I know this is old but I am clearing out the backlog. Must have been a glitch in the matrix. Master is now testing against 2.7 and 3.0+