Refactor #19528

Move FiltersHelperOverrides out of app/registries/ to permit autoloading

Added by Dominic Cleal 12 months ago. Updated 11 months ago.

Status:Closed
Priority:Low
Assigned To:Dominic Cleal
Category:Rails
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4541
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

FiltersHelperOverrides has been excluded from reloading as it kept a list of role filter search overrides (http://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin#Specifying-alternate-auto-complete-path-for-Role-Filters) in a class-level variable.

This can be refactored (like #19464) to make it safe for reloading and move it into the regular services directory instead of registries. As a side effect, this will also make it more testable and less likely to leak behaviour changes between tests.

Associated revisions

Revision b40dde10
Added by Dominic Cleal 11 months ago

fixes #19528 - rewrite FiltersHelperOverrides to support autoload

Replaces class-level filter search overrides storage with a query
against Foreman::Plugin, allowing the class to be reloaded and tested
safely. Removes another 'registry' class.

History

#1 Updated by The Foreman Bot 11 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4541 added

#2 Updated by Dominic Cleal 11 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Marek Hulán 11 months ago

  • Release set to 1.16.0

Also available in: Atom PDF