Skip to content

Refactor Configuration System to Use Value Objects #35

@frogr

Description

@frogr

Problem

The Hub::Config system uses complex nested attributes with ActiveModel, making it hard to understand and test.

Tasks

  • Replace nested attribute classes with simple value objects
  • Implement configuration builder pattern
  • Extract validation to separate validator classes
  • Simplify persistence logic

Acceptance Criteria

  • Create app/models/configuration/ directory with value objects
  • Remove ActiveModel dependencies from config classes
  • Configuration validation extracted to dedicated classes
  • All configuration specs pass
  • Configuration loading/saving remains functional
  • Add unit tests for value objects

Files to modify

  • lib/hub/config.rb and all files in lib/hub/config/
  • app/services/configuration_persistence_service.rb
  • app/services/configuration_update_service.rb

Phase: 2 (Domain)
Priority: High

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions