Restructure options and attributes system in Maintenance module#331
Merged
Conversation
- 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.
- 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.
- 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.
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.