scientist-softserv / adventist_knapsack

Apache License 2.0
1 stars 0 forks source link

Potential Issues Around Knapsack and Rails.root #60

Open jeremyf opened 9 months ago

jeremyf commented 9 months ago

In Hyku and Hyrax there are long-standing references to Rails.root. This works when Hyku is the base application. However, with Knapsack, we need to consider an alternate approach to Rails.root.

The issue is as follows:

A proposed solution for Hyku is available here:

However, Hyrax also uses Rails.root to reference static files. I used rg Rails.root app lib --files-with-matches | awk '{ print "- [ ] " $1 } to generate the list of files that need reviewing:

This is also reported in:

We'll also want to add a rubocop to indicate the Rails.root is an anti-pattern.