Skip to content

Restructure options and attributes system in Maintenance module#331

Merged
afuno merged 11 commits into
mainfrom
feature/SRV-399/new_options_system
Feb 5, 2026
Merged

Restructure options and attributes system in Maintenance module#331
afuno merged 11 commits into
mainfrom
feature/SRV-399/new_options_system

Conversation

@afuno
Copy link
Copy Markdown
Member

@afuno afuno commented Jan 31, 2026

No description provided.

afuno added 2 commits January 31, 2026 19:48
- Added `body_for_access` method to support flexible body retrieval logic.
- Introduced `return_value_on_access` attribute for conditional value normalization.
- Replaced `with_advanced_mode` with `detect_advanced_mode` to streamline advanced mode detection.
- Added normalizer Proc for dynamic modification of body content.
- Enhanced validations with `normalize_rule_options` to support simple and advanced modes interchangeably.
- Refactored internal processes in `Registrar` for clearer option definition and value extraction.
- Simplified `construct_body` by condensing conditional logic for `original_value`.
- Added RuboCop directive to manage method length restrictions.
- Updated `register_required_option` with a RuboCop directive for readability.
- Improved code clarity and maintainability by addressing method length concerns.
@afuno afuno added this to the v3.1.0 milestone Jan 31, 2026
@afuno afuno self-assigned this Jan 31, 2026
@afuno afuno added the feature label Jan 31, 2026
afuno added 3 commits January 31, 2026 20:20
- Introduce Attributes::Base class with common functionality for Input, Internal, and Output
- Introduce Attributes::Collection class with shared collection behavior
- Refactor Input, Internal, and Output to inherit from Attributes::Base
- Refactor collection classes to inherit from Attributes::Collection
- Remove duplicated option registration and helper transformation logic
- Update RBS type signatures to reflect new inheritance hierarchy
- Updated `input?`, `internal?`, and `output?` methods in Input, Internal, and Output classes to delegate behavior to the `@attribute` object.
- Simplified logic by removing hard-coded boolean return values.
- Improved maintainability by centralizing behavior in `@attribute`.
- Updated `input?`, `internal?`, and `output?` to return `bool` dynamically instead of hard-coded values.
- Unified method behavior to improve flexibility and future maintainability.
- Updated RBS type signatures to reflect the new `bool` return type changes.
@afuno afuno changed the title Feature/srv 399/new options system Introduce unified attributes system with shared base classes Jan 31, 2026
afuno added 3 commits January 31, 2026 21:15
- Added comments to `input?` methods in Input, Internal, and Output classes.
- Clarified the purpose of these methods as supporting internal work.
- Improves code readability and understanding for future maintainers.
- Deleted `Attributes::Base` and `Attributes::Collection` classes and their associated methods to simplify the codebase.
- Removed all supporting maintenance modules, such as validators, translators, tools, and registrars, related to attributes.
- This cleanup eliminates redundant and unused mechanisms, aligning the codebase with updated requirements.
- Replaced `Attributes::OptionHelper` with `Options::Helper` to streamline maintenance option handling.
- Updated `Attributes::Base` and `Attributes::Collection` references to `Maintenance::Attributes::Base` and `Maintenance::Attributes::Collection` across all classes.
- Improved consistency in option helper usage and type signatures throughout the codebase.
- Refactored dependent methods and classes to align with the new attribute structure.
@afuno afuno changed the title Introduce unified attributes system with shared base classes Restructure options and attributes system in Maintenance module Feb 1, 2026
afuno added 3 commits February 1, 2026 12:31
- Added `Servactory::Maintenance::Attributes::OptionHelper` as a deprecated class extending `Options::Helper` to maintain backward compatibility.
- Updated `examples/application_service/base` and `Configurable` to use the deprecated `OptionHelper`.
- Included RBS type definition for `OptionHelper` indicating its deprecated status.
- Updated relevant references and added deprecation warnings to signal future removal.
@afuno afuno marked this pull request as ready for review February 5, 2026 18:56
@afuno afuno merged commit 5494c0e into main Feb 5, 2026
37 checks passed
@afuno afuno deleted the feature/SRV-399/new_options_system branch February 5, 2026 19:10
@afuno afuno added polish and removed feature labels Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant