Add option `note` by afuno · Pull Request #232 · servactory/servactory · GitHub
Skip to content

Add option note#232

Draft
afuno wants to merge 15 commits into
mainfrom
features/SRV-138/note
Draft

Add option note#232
afuno wants to merge 15 commits into
mainfrom
features/SRV-138/note

Conversation

@afuno

@afuno afuno commented Jul 14, 2024

Copy link
Copy Markdown
Member
input :id, type: String, note: "Payment identifier in an external system"

afuno added 3 commits July 14, 2024 13:17
A new class named 'Description' has been introduced into the 'DynamicOptions' module within the 'ToolKit' of the 'Servactory' library. This class currently supports initialization with a single option name.
The Servactory's inputs now allow a "description" feature to be included. This includes changes where the option for including descriptive information was introduced in a few classes and attributes. New test and example files were also created to showcase this new implementation.
This commit introduces a new matcher in the test kit, NoteMatcher, for handling the testing of a 'note' attribute. References to the 'description' attribute in various classes and modules, including the input and attribute registration features, have been replaced with 'note'. This change is also reflected in some example code and tests.
@afuno afuno added the feature label Jul 14, 2024
@afuno afuno added this to the v2.7.0 milestone Jul 14, 2024
@afuno afuno self-assigned this Jul 14, 2024
Comment thread spec/examples/usual/description/example1_spec.rb Fixed
afuno added 4 commits July 14, 2024 14:12
The debug print statements in the test file "example1_spec.rb" were removed. These were not necessary for the functionality of the test and only served to clutter the output. The removal of these lines has cleaned up the test and focused it more on its primary purpose.
The changes introduce two new test contexts in the example1_spec.rb file. One context checks if the function properly handles valid inputs, by successfully calling the class with preset attributes. The more significant addition is the test for invalid inputs, which is expected to result in an exception with a specific note.
The 'note' attribute has been added to the outputs in the 'output.rb', 'matchers.rb', and 'dsl.rb' files. This attribute was also added to the test kit for RSpec and incorporated into the relevant tests within the 'example1_spec.rb' file. The examples given in 'example1.rb' have been updated to reflect these changes.
The register method in the registrar.rb file has been adjusted to disable additional rubocop metrics. Beyond the existing CyclomaticComplexity exception, the AbcSize and PerceivedComplexity metrics have now also been deactivated for this method.
@afuno afuno marked this pull request as ready for review July 17, 2024 13:24
@afuno afuno modified the milestones: v2.7.0, v2.8.0 Aug 13, 2024
@afuno afuno modified the milestones: v2.8.0, v2.9.0, v2.10.0 Aug 28, 2024
@afuno afuno modified the milestones: v2.10.0, v2.12.0 Nov 23, 2024
Updated the test expectations to use `contains` for more flexible matching of the output ID. This enhances readability and ensures better alignment with the expected behavior in these test cases.
@afuno afuno modified the milestones: v2.12.0, v2.14.0 Jan 1, 2025
@afuno afuno modified the milestones: v2.14.0, v2.16.0 Mar 5, 2025
@afuno afuno removed this from the v2.16.0 milestone Apr 30, 2025
@afuno afuno marked this pull request as draft December 29, 2025 21:02
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.

2 participants