Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface normalizer #200

Merged
merged 2 commits into from
Aug 30, 2024
Merged

Interface normalizer #200

merged 2 commits into from
Aug 30, 2024

Conversation

bcardarella
Copy link
Contributor

@bcardarella bcardarella commented Aug 30, 2024

This enables us to pattern match on os and app versions. These values come in as strings, but we should permit the parsing of the string into values that can be better pattern matched on ranges:

def render(assigns, %{"os_version" => [major, _minor, _patch]}) when major >= 3 and major < 6 do
  ~LVN"""
    ...
  """
end

The above example presumes the given client has a os_version pattern of <major>.<minor>.<patch>

Support for the necessary normalization functions must be implemented in the client plugin. Otherwise the interface normalizer ignores.

Added private API for normalizing parts of the interface

This is helpful for values that are strings but are better suited for
version matching in another type
@bcardarella bcardarella changed the title Bc interface normalizer Interface normalizer Aug 30, 2024
@bcardarella bcardarella merged commit bb108a7 into main Aug 30, 2024
1 check passed
@bcardarella bcardarella deleted the bc-interface-normalizer branch August 30, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant