Ensure FeatureHubRepository#find_interceptor
returns an instance of InterceptorValue
#32
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.
Hello 👋
After registering an environment interceptor and reading a feature value, I encountered an exception #<NoMethodError: undefined method `cast' for #<FeatureHub::Sdk::EnvironmentInterceptor:0x000000010ac9c088 @enabled=true> at this line:
featurehub-ruby-sdk/featurehub-sdk/lib/feature_hub/sdk/feature_state.rb
Line 113 in b7f8186
The bug is in
FeatureHubRepository#find_interceptor
as it is supposed to return an instance ofInterceptorValue
, notValueInterceptor
. I have updated existing spec to test real behaviour.Gemfile.lock was outdated so I included here too.