Skip to content

Commit 96e2c90

Browse files
committed
chore: added default reason to event metadata
1 parent ff845c1 commit 96e2c90

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
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"]}'
17+
sdk-capabilities: '{ "Ruby": ["clientCustomData", "v2Config", "variableFeatureId", "allVariables", "allFeatures", "evalReason", "cloudEvalReason", "eventsEvalReason", "variablesFeatureId"]}'

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def variable(user, key, default, opts = {})
207207
else
208208
eval = { reason: DevCycle::DEFAULT_REASONS::DEFAULT, details: DevCycle::DEFAULT_REASON_DETAILS::MISSING_CONFIG }
209209
@logger.warn("Local bucketing not initialized, returning default value for variable #{key}")
210-
variable_event = Event.new({ type: DevCycle::EventTypes[:agg_variable_defaulted], target: key, metadata: { evalReason: DevCycle::DEFAULT_REASONS::DEFAULT }})
210+
variable_event = Event.new({ type: DevCycle::EventTypes[:agg_variable_defaulted], target: key, metaData: { evalReason: DevCycle::DEFAULT_REASONS::DEFAULT }})
211211
bucketed_config = BucketedUserConfig.new({}, {}, {}, {}, {}, {}, [])
212212
@event_queue.queue_aggregate_event(variable_event, bucketed_config)
213213
end
@@ -353,12 +353,7 @@ def all_variables(user, opts = {})
353353

354354
if local_bucketing_initialized? && @local_bucketing.has_config
355355
bucketed_config = @local_bucketing.generate_bucketed_config(user)
356-
bucketed_config.variables.transform_values do |variable|
357-
variable.delete(:_feature)
358-
variable
359-
end
360356
bucketed_config.variables
361-
362357
else
363358
{}
364359
end

0 commit comments

Comments
 (0)