@@ -530,7 +530,7 @@ def is_feature_enabled(feature_flag_key, user_id, attributes = nil)
530530 return false
531531 end
532532
533- user_context = create_user_context ( user_id , attributes )
533+ user_context = OptimizelyUserContext . new ( self , user_id , attributes , identify : false )
534534 decision , = @decision_service . get_variation_for_feature ( config , feature_flag , user_context )
535535
536536 feature_enabled = false
@@ -770,7 +770,7 @@ def get_all_feature_variables(feature_flag_key, user_id, attributes = nil)
770770 return nil
771771 end
772772
773- user_context = create_user_context ( user_id , attributes )
773+ user_context = OptimizelyUserContext . new ( self , user_id , attributes , identify : false )
774774 decision , = @decision_service . get_variation_for_feature ( config , feature_flag , user_context )
775775 variation = decision ? decision [ 'variation' ] : nil
776776 feature_enabled = variation ? variation [ 'featureEnabled' ] : false
@@ -931,7 +931,7 @@ def get_variation_with_config(experiment_key, user_id, attributes, config)
931931
932932 return nil unless user_inputs_valid? ( attributes )
933933
934- user_context = create_user_context ( user_id , attributes )
934+ user_context = OptimizelyUserContext . new ( self , user_id , attributes , identify : false )
935935 variation_id , = @decision_service . get_variation ( config , experiment_id , user_context )
936936 variation = config . get_variation_from_id ( experiment_key , variation_id ) unless variation_id . nil?
937937 variation_key = variation [ 'key' ] if variation
@@ -998,7 +998,7 @@ def get_feature_variable_for_type(feature_flag_key, variable_key, variable_type,
998998 return nil
999999 end
10001000
1001- user_context = create_user_context ( user_id , attributes )
1001+ user_context = OptimizelyUserContext . new ( self , user_id , attributes , identify : false )
10021002 decision , = @decision_service . get_variation_for_feature ( config , feature_flag , user_context )
10031003 variation = decision ? decision [ 'variation' ] : nil
10041004 feature_enabled = variation ? variation [ 'featureEnabled' ] : false
0 commit comments