Project

General

Profile

Refactor #14434

Refactor host token support into concern

Added by Dominic Cleal almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The rails-observers gem can be removed with a small amount of refactoring. It was added with Rails 4 support in #7230 as it was removed from Rails core.

It's used for the HostObserver which contains one after_validation method to expire or generate build tokens when the build state changes, but this could be refactored away from observers.

Dropping the dependency will provide a very marginal installation and speed improvement.

Associated revisions

Revision 0443e85e (diff)
Added by Dominic Cleal almost 5 years ago

fixes #14434 - refactor tokens into concern from observer

rails-observers is still required via audited, but this removes the
usage in Foreman itself and unifies token-related code.

History

#1 Updated by Dominic Cleal almost 5 years ago

  • Subject changed from Remove rails-observers dependency to Refactor host token support into concern

It isn't possible to remove the dependency entirely as the audited gem still depends on it, I missed that. It's possible to remove the usage from Foreman core though and refactor the token support into a single concern.

#2 Updated by The Foreman Bot almost 5 years ago

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

#3 Updated by Dominic Cleal almost 5 years ago

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

#4 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF