Skip to content

Fix rubocop autocorrect incorrectly stripping slashes from Hyrax upload_path...

rfb11 requested to merge rubocop-autocorrect-fix into main

Fix rubocop autocorrect incorrectly stripping slashes from Hyrax upload_path and cache_path defaults.

See previous config here: https://gitlab.oit.duke.edu/ddr/rdr/-/blob/e11e80d5bb7f9e9ec7efe5862c26146cdd004a29/config/initializers/hyrax.rb#L197-200

Using rubocop -A changed e.g. Rails.root + 'tmp' + 'uploads' to "#{Rails.root}tmpuploads" - previously Rails.root would evaluate to a Pathname which could accept + operators and result in a correctly-joined path at runtime. The new e.g. Rails.root.join('tmp/uploads') will also evaluate to a correctly-joined Pathname at runtime.

Merge request reports