Closed maxveldink closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.39%. Comparing base (
25680a4
) to head (14b7791
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@open-feature/sdk-ruby-maintainers Would love to get this merged in soon as well if anyone has some time for a review!
I updated the PR title to mark it as a breaking change.
This PR
Only the last four commits will be merged in with this PR. The others are waiting on #77 and #78.
API.provider=(provider)
toAPI.set_provider(provider, domain: nil)
to better adhere to the specification. I decided to move away from theattr_writer
naming convention as thedomain
parameter would be surprising. I would love others' thoughts on this.nil
as the key. The other option I tried here was to store@default_provider
in addition to the hash, but this approach was simpler to the slight detriment of readability.API.provider
to receivedomain
as a keyword argument. If no domain is provided, it will return the default provider. This is backward compatible.Follow-up Tasks
In subsequent PRs, I'll continue on the flag evaluation specifications.
How to test
Open a console and play around with the
set_provider
method on the API. If no name is provided, the default provider will be replaced. If a name is provided, the provider will be registered using that name. If the same name is provided, the provider will be overridden.