Skip to content

Commit eaf75c5

Browse files
committed
chore: try to run cloud for ruby test harness
1 parent 9607745 commit eaf75c5

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

.github/workflows/test-harness.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
with:
1515
sdks-to-test: ruby
1616
sdk-github-sha: ${{github.event.pull_request.head.sha}}
17-
sdk-capabilities: '{ "Ruby": ["clientCustomData", "v2Config", "variableFeatureId", "allVariables", "allFeatures", "evalReason", "cloudEvalReason", "eventsEvalReason", "variablesFeatureId"]}'
17+
sdk-capabilities: '{ "Ruby": ["clientCustomData", "v2Config", "variableFeatureId", "allVariables", "allFeatures", "evalReason", "eventsEvalReason", "variablesFeatureId"]}'

lib/devcycle-ruby-server-sdk/api/client.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def variable(user, key, default, opts = {})
195195
value = default
196196
type = determine_variable_type(default)
197197
defaulted = true
198-
eval = { reason: DevCycle::EVAL_REASONS::DEFAULT, details: DevCycle::DEFAULT_REASON_DETAILS::MISSING_CONFIG }
198+
eval = { reason: DevCycle::EVAL_REASONS::DEFAULT, details: DevCycle::DEFAULT_REASON_DETAILS::USER_NOT_TARGETED }
199199
if local_bucketing_initialized? && @local_bucketing.has_config
200200
type_code = variable_type_code_from_type(type)
201201
variable_pb = variable_for_user_pb(user, key, type_code)
@@ -580,10 +580,10 @@ def get_variable_value(variable_pb)
580580

581581
def get_eval_reason(variable_pb)
582582
if variable_pb.nil?
583-
{ reason: DevCycle::EVAL_REASONS::DEFAULT, details: DevCycle::DEFAULT_REASON_DETAILS::MISSING_CONFIG}
583+
{ reason: DevCycle::EVAL_REASONS::DEFAULT, details: DevCycle::DEFAULT_REASON_DETAILS::USER_NOT_TARGETED}
584584
else
585585
if variable_pb.eval.nil?
586-
{ reason: DevCycle::EVAL_REASONS::DEFAULT, details: DevCycle::DEFAULT_REASON_DETAILS::MISSING_CONFIG }
586+
{ reason: DevCycle::EVAL_REASONS::DEFAULT, details: DevCycle::DEFAULT_REASON_DETAILS::USER_NOT_TARGETED }
587587
else
588588
{ reason: variable_pb.eval.reason, details: variable_pb.eval.details, target_id: variable_pb.eval.target_id }
589589
end

lib/devcycle-ruby-server-sdk/eval_reasons.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
module DevCycle
2-
3-
# Default reasons for evaluation failures
4-
module DEFAULT_REASONS
5-
USER_NOT_TARGETED = 'USER_NOT_TARGETED'
6-
end
72
# Evaluation reasons for successful evaluations
83
module EVAL_REASONS
94
DEFAULT = 'DEFAULT'

0 commit comments

Comments
 (0)