File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
utils/build/docker/ruby/rails72 Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- require 'openfeature /sdk'
3+ require 'open_feature /sdk'
44require 'datadog/open_feature/provider'
55
66class OpenfeatureController < ApplicationController
77 skip_before_action :verify_authenticity_token
88
9- def start
10- OpenFeature ::SDK . set_provider ( Datadog ::OpenFeature ::Provider . new )
11-
12- # NOTE: There is no set_provider_and_wait in OpenFeature::SDK
13- loop do
14- break unless Datadog ::OpenFeature . evaluator . ufc_json . nil?
15- sleep 0.1
16- end
17-
18- render json : { }
19- end
20-
9+ # TODO: Clarify the expectation of the interface
2110 def evaluate
22- puts request . body
11+ OpenFeature :: SDK . set_provider ( Datadog :: OpenFeature :: Provider . new )
2312
2413 client = OpenFeature ::SDK . build_client
2514
Original file line number Diff line number Diff line change @@ -78,6 +78,5 @@ def call(_env)
7878 get '/api_security_sampling/:i' => 'api_security#sampling_by_path'
7979 get '/api_security/sampling/:status' => 'api_security#sampling_by_status'
8080
81- post '/ffe/start' => 'openfeature#start'
82- post '/ffe/evaluate' => 'openfeature#evaluate'
81+ post '/ffe' => 'openfeature#start'
8382end
You can’t perform that action at this time.
0 commit comments