Skip to content

Commit

Permalink
Fix review PR
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
  • Loading branch information
thomaspoignant committed Aug 7, 2024
1 parent 8f63a5c commit d29df64
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions providers/openfeature-go-feature-flag-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

This repository contains the official Ruby OpenFeature provider for accessing your feature flags with [GO Feature Flag](https://gofeatureflag.org).

In conjuction with the [OpenFeature SDK](https://openfeature.dev/docs/reference/concepts/provider) you will be able
In conjunction with the [OpenFeature SDK](https://openfeature.dev/docs/reference/concepts/provider) you will be able
to evaluate your feature flags in your Ruby applications.

For documentation related to flags management in GO Feature Flag,
Expand Down Expand Up @@ -53,11 +53,6 @@ The `OpenFeature::GoFeatureFlag::Provider` needs some options to be created and
The only required option to create a `GoFeatureFlagProvider` is the URL _(`endpoint`)_ to your GO Feature Flag relay-proxy instance.

```ruby
import GOFeatureFlag
import OpenFeature

# ...

options = OpenFeature::GoFeatureFlag::Options.new(endpoint: "http://localhost:1031")
provider = OpenFeature::GoFeatureFlag::Provider.new(options: options)

Expand Down Expand Up @@ -123,7 +118,7 @@ client.fetch_object_value(flag_key: 'my-flag', default_value: {"default" => true
|| Caching | Mechanism is in place to refresh the cache in case of configuration change |
|| Event Streaming | Not supported by the SDK |
|| Logging | Not supported by the SDK |
|| Flag Metadata | Not supported by the SDK |
|| Flag Metadata | You can retrieve your flag metadata directly in the evaluation details. |


<sub>**Implemented**: ✅ | In-progress: ⚠️ | Not implemented yet: ❌</sub>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def fetch_object_value(flag_key:, default_value:, evaluation_context: nil)
private

def evaluate(flag_key:, default_value:, allowed_classes:, evaluation_context: nil)
evaluation_context = OpenFeature::SDK::EvaluationContext.new unless evaluation_context.is_a?(OpenFeature::SDK::EvaluationContext)
evaluation_context = OpenFeature::SDK::EvaluationContext.new if evaluation_context.nil?
validate_parameters(flag_key, evaluation_context)

# do a http call to the go feature flag server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def evaluate_ofrep_api(flag_key:, evaluation_context:)
end
end

evaluation_context = OpenFeature::SDK::EvaluationContext.new unless evaluation_context.is_a?(OpenFeature::SDK::EvaluationContext)
evaluation_context = OpenFeature::SDK::EvaluationContext.new if evaluation_context.nil?
# Format the URL to call the Go Feature Flag OFREP API
base_uri = URI.parse(@options.endpoint)
new_path = File.join(base_uri.path, "/ofrep/v1/evaluate/flags/#{flag_key}")
Expand Down

0 comments on commit d29df64

Please sign in to comment.