vwo-fme-ruby-sdk 1.12.0 → 1.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/resources/debug_messages.json +3 -3
- data/lib/resources/error_messages.json +5 -5
- data/lib/resources/info_messages.json +9 -9
- data/lib/vwo.rb +19 -104
- data/lib/{vwo → wingify}/api/get_flag.rb +1 -1
- data/lib/{vwo → wingify}/api/set_attribute.rb +3 -3
- data/lib/{vwo → wingify}/api/track_event.rb +1 -1
- data/lib/{vwo → wingify}/constants/constants.rb +24 -2
- data/lib/{vwo → wingify}/decorators/storage_decorator.rb +1 -1
- data/lib/{vwo → wingify}/enums/api_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/campaign_type_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/debug_category_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/decision_types_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/event_enum.rb +6 -6
- data/lib/{vwo → wingify}/enums/headers_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/hooks_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/http_method_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/log_level_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/log_level_to_number.rb +1 -1
- data/lib/{vwo → wingify}/enums/status_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/storage_enum.rb +1 -1
- data/lib/{vwo → wingify}/enums/url_enum.rb +1 -1
- data/lib/{vwo → wingify}/models/campaign/campaign_model.rb +1 -1
- data/lib/{vwo → wingify}/models/campaign/feature_model.rb +1 -1
- data/lib/{vwo → wingify}/models/campaign/impact_campaign_model.rb +1 -1
- data/lib/{vwo → wingify}/models/campaign/metric_model.rb +1 -1
- data/lib/{vwo → wingify}/models/campaign/rule_model.rb +1 -1
- data/lib/{vwo → wingify}/models/campaign/variable_model.rb +1 -1
- data/lib/{vwo → wingify}/models/campaign/variation_model.rb +1 -1
- data/lib/{vwo → wingify}/models/gateway_service_model.rb +1 -1
- data/lib/{vwo → wingify}/models/schemas/settings_schema_validation.rb +1 -1
- data/lib/{vwo → wingify}/models/settings/settings_model.rb +1 -1
- data/lib/{vwo → wingify}/models/storage/storage_data_model.rb +1 -1
- data/lib/{vwo → wingify}/models/user/context_model.rb +1 -1
- data/lib/{vwo → wingify}/models/user/context_vwo_model.rb +1 -1
- data/lib/{vwo → wingify}/models/user/get_flag_response.rb +1 -1
- data/lib/{vwo → wingify}/models/vwo_options_model.rb +1 -1
- data/lib/{vwo → wingify}/packages/decision_maker/decision_maker.rb +1 -1
- data/lib/{vwo → wingify}/packages/logger/core/log_manager.rb +1 -1
- data/lib/{vwo → wingify}/packages/logger/core/transport_manager.rb +1 -1
- data/lib/{vwo → wingify}/packages/logger/log_message_builder.rb +1 -1
- data/lib/{vwo → wingify}/packages/logger/logger.rb +1 -1
- data/lib/{vwo → wingify}/packages/logger/transports/console_transport.rb +1 -1
- data/lib/{vwo → wingify}/packages/network_layer/client/network_client.rb +2 -2
- data/lib/{vwo → wingify}/packages/network_layer/handlers/request_handler.rb +1 -1
- data/lib/{vwo → wingify}/packages/network_layer/manager/network_manager.rb +1 -1
- data/lib/{vwo → wingify}/packages/network_layer/models/global_request_model.rb +1 -1
- data/lib/{vwo → wingify}/packages/network_layer/models/request_model.rb +1 -1
- data/lib/{vwo → wingify}/packages/network_layer/models/response_model.rb +1 -1
- data/lib/{vwo → wingify}/packages/segmentation_evaluator/core/segmentation_manager.rb +1 -1
- data/lib/{vwo → wingify}/packages/segmentation_evaluator/enums/segment_operand_regex_enum.rb +1 -1
- data/lib/{vwo → wingify}/packages/segmentation_evaluator/enums/segment_operand_value_enum.rb +1 -1
- data/lib/{vwo → wingify}/packages/segmentation_evaluator/enums/segment_operator_value_enum.rb +1 -1
- data/lib/{vwo → wingify}/packages/segmentation_evaluator/evaluators/segment_evaluator.rb +1 -1
- data/lib/{vwo → wingify}/packages/segmentation_evaluator/evaluators/segment_operand_evaluator.rb +1 -1
- data/lib/{vwo → wingify}/packages/segmentation_evaluator/utils/segment_util.rb +1 -1
- data/lib/{vwo → wingify}/packages/storage/connector.rb +1 -1
- data/lib/{vwo → wingify}/packages/storage/storage.rb +1 -1
- data/lib/{vwo → wingify}/services/batch_event_queue.rb +1 -1
- data/lib/{vwo → wingify}/services/campaign_decision_service.rb +1 -1
- data/lib/{vwo → wingify}/services/hooks_service.rb +1 -1
- data/lib/{vwo → wingify}/services/logger_service.rb +21 -10
- data/lib/{vwo → wingify}/services/settings_service.rb +18 -5
- data/lib/{vwo → wingify}/services/storage_service.rb +1 -1
- data/lib/{vwo → wingify}/utils/batch_event_dispatcher_util.rb +5 -5
- data/lib/wingify/utils/brand_context.rb +33 -0
- data/lib/wingify/utils/brand_util.rb +53 -0
- data/lib/{vwo → wingify}/utils/campaign_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/data_type_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/debugger_service_util.rb +2 -2
- data/lib/{vwo → wingify}/utils/decision_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/event_util.rb +5 -5
- data/lib/{vwo → wingify}/utils/function_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/gateway_service_util.rb +2 -2
- data/lib/{vwo → wingify}/utils/impression_util.rb +3 -3
- data/lib/{vwo → wingify}/utils/log_message_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/meg_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/network_util.rb +16 -16
- data/lib/{vwo → wingify}/utils/rule_evaluation_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/settings_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/usage_stats_util.rb +1 -1
- data/lib/{vwo → wingify}/utils/uuid_util.rb +1 -1
- data/lib/{vwo/vwo_builder.rb → wingify/wingify_builder.rb} +11 -11
- data/lib/{vwo/vwo_client.rb → wingify/wingify_client.rb} +2 -2
- data/lib/wingify.rb +117 -0
- metadata +141 -82
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d76a694880edd0c5a2fa5b892193eef8f601c95d3d0a140c28681450196e2ee
|
|
4
|
+
data.tar.gz: 95ff81d4b0e38159a57e7d22a603d7f81df3319ad2fb43bb7395691c46b24a79
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '051825ffb285e02b0db70c7b869dedc2508946e199cec12bcdb402d4ff9f499028df3d8f4da46e24eeb28e45dfc42f2af937130c4118a43b5fd2ccca2abf57f9'
|
|
7
|
+
data.tar.gz: 42ce7d1946c602b1c73e182677feaee8a78c3a6ccbc9ed5ba5063788e4af45d827cbdba78586a5f37e9f193ce4eb226b0769aa02784ca165b3e684a71e1df5de
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"API_CALLED": "API - {apiName} called",
|
|
3
|
-
"SERVICE_INITIALIZED": "
|
|
3
|
+
"SERVICE_INITIALIZED": "{brand} {service} initialized while creating an instance of SDK",
|
|
4
4
|
"USING_POLL_INTERVAL_FROM_SETTINGS": "key: poll_interval not found or invalid. Using poll_interval from {source} ({pollInterval})",
|
|
5
5
|
|
|
6
6
|
"EXPERIMENTS_EVALUATION_WHEN_ROLLOUT_PASSED": "Rollout rule got passed for user {userId}. Hence, evaluating experiments",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
"USER_BUCKET_TO_VARIATION": "User ID:{userId} for experiment:{campaignKey} having percent traffic:{percentTraffic} got bucket-value:{bucketValue} and hash-value:{hashValue}",
|
|
10
10
|
|
|
11
|
-
"IMPRESSION_FOR_TRACK_USER": "Impression built for vwo_variationShown(
|
|
11
|
+
"IMPRESSION_FOR_TRACK_USER": "Impression built for vwo_variationShown({brand} standard event for tracking user) event haivng Account ID:{accountId}, User ID:{userId}, and experiment ID:{campaignId}",
|
|
12
12
|
"IMPRESSION_FOR_TRACK_GOAL": "Impression built for event:{eventName} event having Account ID:{accountId}, and user ID:{userId}",
|
|
13
|
-
"IMPRESSION_FOR_SYNC_VISITOR_PROP": "Impression built for {eventName}(
|
|
13
|
+
"IMPRESSION_FOR_SYNC_VISITOR_PROP": "Impression built for {eventName}({brand} internal event) event for Account ID:{accountId}, and user ID:{userId}",
|
|
14
14
|
|
|
15
15
|
"CONFIG_BATCH_EVENT_LIMIT_EXCEEDED": "Impression event - {endPoint} failed due to exceeding payload size. Parameter eventsPerRequest in batchEvents config in init API has value:{eventsPerRequest} for account ID:{accountId}. Please read the official documentation for knowing the size limits",
|
|
16
16
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"EXECUTION_FAILED": "API - {apiName} failed to execute. Error:{err}",
|
|
3
|
-
"INVALID_OPTIONS": "[ERROR]:
|
|
4
|
-
"INVALID_SDK_KEY_IN_OPTIONS": "[ERROR]:
|
|
5
|
-
"INVALID_ACCOUNT_ID_IN_OPTIONS": "[ERROR]:
|
|
3
|
+
"INVALID_OPTIONS": "[ERROR]: {log_prefix} {date} Options should be of type object",
|
|
4
|
+
"INVALID_SDK_KEY_IN_OPTIONS": "[ERROR]: {log_prefix} {date} Please provide the sdkKey in the options and should be a of type string",
|
|
5
|
+
"INVALID_ACCOUNT_ID_IN_OPTIONS": "[ERROR]: {log_prefix} {date} Please provide {brand} account ID in the options and should be a of type string|number",
|
|
6
6
|
|
|
7
7
|
"ERROR_ADDING_CAMPAIGNS_TO_RULES": "Error setting and adding campaigns to rules. Error: {err}",
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"INVALID_SETTINGS_SCHEMA": "Settings are not valid for account ID: {accountId} and SDK key: {sdkKey}. Got settings as {settings}",
|
|
13
13
|
|
|
14
14
|
"ERROR_UPDATING_SETTINGS": "Error while updating settings. Error: {err}",
|
|
15
|
-
"UPDATING_CLIENT_INSTANCE_FAILED_WHEN_WEBHOOK_TRIGGERED": "Failed to fetch settings and hence
|
|
15
|
+
"UPDATING_CLIENT_INSTANCE_FAILED_WHEN_WEBHOOK_TRIGGERED": "Failed to fetch settings and hence {brand} client instance couldn't be updated when API: {apiName} got called having isViaWebhook param as {isViaWebhook}. Error: {err}",
|
|
16
16
|
|
|
17
17
|
"INVALID_PARAM": "Key:{key} passed to API:{apiName} is not of valid type. Got type:{type}, should be:{correctType}",
|
|
18
18
|
"INVALID_CONTEXT": "Context should be an object and must contain a mandatory key - id, which is User ID",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"ERROR_READING_DATA_FROM_STORAGE": "Error while reading data from storage. Error: {err}",
|
|
25
25
|
"ERROR_STORING_DATA_IN_STORAGE": "Error while storing data in storage. Error: {err}",
|
|
26
26
|
|
|
27
|
-
"INVALID_GATEWAY_URL": "Please provide a valid URL for
|
|
27
|
+
"INVALID_GATEWAY_URL": "Please provide a valid URL for {brand} Gateway Service while initializing the SDK",
|
|
28
28
|
"INVALID_RETRY_CONFIG": "Retry config is invalid. Should be of type:object",
|
|
29
29
|
|
|
30
30
|
"NETWORK_CALL_FAILED": "Error occurred for {method} request. Error:{err}",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"ON_INIT_ALREADY_RESOLVED": "[INFO]:
|
|
3
|
-
"ON_INIT_SETTINGS_FAILED": "[INFO]:
|
|
2
|
+
"ON_INIT_ALREADY_RESOLVED": "[INFO]: {log_prefix} {date} {apiName} already resolved",
|
|
3
|
+
"ON_INIT_SETTINGS_FAILED": "[INFO]: {log_prefix} {date} {brand} settings could not be fetched",
|
|
4
4
|
|
|
5
|
-
"POLLING_SET_SETTINGS": "There's a change in settings from the last settings fetched. Hence, instantiating a new
|
|
6
|
-
"POLLING_NO_CHANGE_IN_SETTINGS": "No change in settings with the last settings fetched. Hence, not instantiating new
|
|
5
|
+
"POLLING_SET_SETTINGS": "There's a change in settings from the last settings fetched. Hence, instantiating a new {brand} client internally",
|
|
6
|
+
"POLLING_NO_CHANGE_IN_SETTINGS": "No change in settings with the last settings fetched. Hence, not instantiating new {brand} client",
|
|
7
7
|
|
|
8
8
|
"SETTINGS_FETCH_SUCCESS": "Settings fetched successfully",
|
|
9
9
|
|
|
10
|
-
"CLIENT_INITIALIZED": "
|
|
10
|
+
"CLIENT_INITIALIZED": "{brand} Client initialized",
|
|
11
11
|
|
|
12
12
|
"STORED_VARIATION_FOUND": "Variation {variationKey} found in storage for the user {userId} for the {experimentType} experiment:{experimentKey}",
|
|
13
13
|
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"MEG_CAMPAIGN_FOUND_IN_STORAGE": "Campaign {campaignKey} found in storage for user ID:{userId}",
|
|
29
29
|
"MEG_CAMPAIGN_ELIGIBLE": "Campaign {campaignKey} is eligible for user ID:{userId}",
|
|
30
30
|
"MEG_WINNER_CAMPAIGN": "MEG: Campaign {campaignKey} is the winner for group {groupId} for user ID:{userId} {algo}",
|
|
31
|
-
"SETTINGS_UPDATED": "Settings fetched and updated successfully on the current
|
|
32
|
-
"NETWORK_CALL_SUCCESS": "Impression for {event} - {endPoint} was successfully received by
|
|
31
|
+
"SETTINGS_UPDATED": "Settings fetched and updated successfully on the current {brand} client instance when API: {apiName} got called having isViaWebhook param as {isViaWebhook}",
|
|
32
|
+
"NETWORK_CALL_SUCCESS": "Impression for {event} - {endPoint} was successfully received by {brand} having Account ID:{accountId}, UUID: {uuid}",
|
|
33
33
|
|
|
34
34
|
"EVENT_BATCH_DEFAULTS": "{parameter} in SDK configuration is missing or invalid (should be greater than {minLimit}). Using default value: {defaultValue}",
|
|
35
35
|
"EVENT_QUEUE": "Event with payload:{event} pushed to the {queueType} queue",
|
|
36
36
|
"EVENT_BATCH_After_FLUSHING": "Event queue having {length} events has been flushed {manually}",
|
|
37
|
-
"IMPRESSION_BATCH_SUCCESS": "Impression event - {endPoint} was successfully received by
|
|
38
|
-
"IMPRESSION_BATCH_FAILED": "Batch events couldn\"t be received by
|
|
37
|
+
"IMPRESSION_BATCH_SUCCESS": "Impression event - {endPoint} was successfully received by {brand} having Account ID:{accountId}",
|
|
38
|
+
"IMPRESSION_BATCH_FAILED": "Batch events couldn\"t be received by {brand}. Calling Flush Callback with error and data",
|
|
39
39
|
"EVENT_BATCH_MAX_LIMIT": "{parameter} passed in SDK configuration is greater than the maximum limit of {maxLimit}. Setting it to the maximum limit",
|
|
40
40
|
"GATEWAY_AND_BATCH_EVENTS_CONFIG_MISMATCH": "Batch Events config passed in SDK configuration will not work as the gatewayService is already configured. Please check the documentation for more details",
|
|
41
41
|
"NETWORK_CALL_SUCCESS_WITH_RETRIES": "Network call for {extraData} succeeded after {attempts} retry attempt(s). Previous attempts failed with error: {err}",
|
data/lib/vwo.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024-
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -12,114 +12,29 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
require_relative '
|
|
18
|
-
require_relative 'vwo/vwo_client'
|
|
19
|
-
require_relative 'vwo/utils/event_util'
|
|
20
|
-
require_relative 'vwo/services/settings_service'
|
|
15
|
+
require_relative 'wingify'
|
|
16
|
+
require_relative 'wingify/wingify_client'
|
|
17
|
+
require_relative 'wingify/wingify_builder'
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def initialize(options)
|
|
27
|
-
self.class.set_instance(options)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def self.set_instance(options)
|
|
31
|
-
options_vwo_builder = options[:vwo_builder]
|
|
32
|
-
@@vwo_builder = options_vwo_builder || VWOBuilder.new(options)
|
|
33
|
-
|
|
34
|
-
@@instance = @@vwo_builder
|
|
35
|
-
.set_logger
|
|
36
|
-
.set_settings_service
|
|
37
|
-
.set_storage
|
|
38
|
-
.set_network_manager
|
|
39
|
-
.set_segmentation
|
|
40
|
-
.init_polling
|
|
41
|
-
.init_usage_stats
|
|
42
|
-
.init_batch
|
|
43
|
-
|
|
44
|
-
if options[:settings]
|
|
45
|
-
return @@vwo_builder.build(options[:settings])
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
settings = @@vwo_builder.get_settings
|
|
49
|
-
@@instance = @@vwo_builder.build(settings)
|
|
50
|
-
@@instance
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def self.instance
|
|
54
|
-
@@instance
|
|
55
|
-
end
|
|
19
|
+
# Map existing VWO classes to Wingify aliases to maintain 100% backward compatibility
|
|
20
|
+
VWOClient = WingifyClient
|
|
21
|
+
VWOBuilder = WingifyBuilder
|
|
56
22
|
|
|
23
|
+
module VWO
|
|
24
|
+
# Backward compatible VWO facade
|
|
25
|
+
# It intercepts the init call, forces the is_via_vwo flag, and forwards to Wingify core.
|
|
57
26
|
def self.init(options)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
unless options.is_a?(Hash)
|
|
61
|
-
puts "[ERROR]: VWO-SDK: Please provide the options as a hash"
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
unless options[:sdk_key]&.is_a?(String) && !options[:sdk_key].empty?
|
|
65
|
-
puts "[ERROR]: VWO-SDK: Please provide the sdkKey in the options and should be a of type string"
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
unless options[:account_id] && (options[:account_id].is_a?(Integer) || (options[:account_id].is_a?(String) && !options[:account_id].empty?))
|
|
69
|
-
puts "[ERROR]: VWO-SDK: Please provide VWO account ID in the options and should be a of type string|number"
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
# store the current time in milliseconds
|
|
73
|
-
sdk_init_start_time = (Time.now.to_f * 1000).to_i
|
|
74
|
-
# initialize the vwo instance
|
|
75
|
-
new(options)
|
|
76
|
-
# store the time after initializing the vwo instance in milliseconds
|
|
77
|
-
sdk_init_end_time = (Time.now.to_f * 1000).to_i
|
|
78
|
-
# calculate the time taken for initializing the vwo instance
|
|
79
|
-
time_taken_for_init = sdk_init_end_time - sdk_init_start_time
|
|
80
|
-
# get sdkMetaInfo from settings file to check if the sdk was initialized earlier
|
|
81
|
-
sdk_meta_info = nil
|
|
82
|
-
was_initialized_earlier = false
|
|
83
|
-
|
|
84
|
-
begin
|
|
85
|
-
if @@instance && @@instance.original_settings && @@instance.original_settings.is_a?(Hash)
|
|
86
|
-
sdk_meta_info = @@instance.original_settings["sdkMetaInfo"]
|
|
87
|
-
was_initialized_earlier = sdk_meta_info && sdk_meta_info.is_a?(Hash) ? sdk_meta_info["wasInitializedEarlier"] : false
|
|
88
|
-
end
|
|
89
|
-
rescue StandardError => e
|
|
90
|
-
was_initialized_earlier = false
|
|
91
|
-
end
|
|
92
|
-
if !was_initialized_earlier && SettingsService.instance.is_settings_valid
|
|
93
|
-
# send the sdk init info to vwo server
|
|
94
|
-
send_sdk_init_event(SettingsService.instance.settings_fetch_time, time_taken_for_init.to_s)
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
# send the usage stats event to vwo server
|
|
98
|
-
# get usage stats account id from settings
|
|
99
|
-
usage_stats_account_id = @@instance.original_settings["usageStatsAccountId"]
|
|
100
|
-
if usage_stats_account_id
|
|
101
|
-
send_sdk_usage_stats_event(usage_stats_account_id)
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
@@instance
|
|
105
|
-
rescue StandardError => e
|
|
106
|
-
puts "[ERROR]: VWO-SDK: Got error while initializing VWO: #{e.message}"
|
|
107
|
-
end
|
|
27
|
+
options[:is_via_vwo] = true
|
|
28
|
+
Wingify.init(options)
|
|
108
29
|
end
|
|
109
30
|
|
|
110
|
-
# Generates a UUID for a user based on their user_id and account_id.
|
|
111
|
-
#
|
|
112
|
-
# @param user_id [String] The user's ID.
|
|
113
|
-
# @param account_id [String] The account ID associated with the user.
|
|
114
|
-
# @return [String] A UUID string formatted without dashes and in uppercase.
|
|
115
31
|
def self.get_uuid(user_id, account_id)
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return UUIDUtil.get_uuid(user_id, account_id)
|
|
32
|
+
Wingify.get_uuid(user_id, account_id)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Keep VWO.new backward compatible for any customers manually instantiating it,
|
|
36
|
+
# although standard docs recommend VWO.init
|
|
37
|
+
def self.new(options)
|
|
38
|
+
init(options)
|
|
124
39
|
end
|
|
125
40
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024-
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -33,14 +33,14 @@ class SetAttributeApi
|
|
|
33
33
|
def create_impression_for_attributes(attributes, context)
|
|
34
34
|
# Retrieve base properties for the event
|
|
35
35
|
properties = NetworkUtil.get_events_base_properties(
|
|
36
|
-
EventEnum::
|
|
36
|
+
EventEnum::SYNC_VISITOR_PROP,
|
|
37
37
|
URI.encode_www_form_component(context.user_agent),
|
|
38
38
|
context.ip_address
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
# Construct payload data for multiple attributes
|
|
42
42
|
payload = NetworkUtil.get_attribute_payload_data(
|
|
43
|
-
EventEnum::
|
|
43
|
+
EventEnum::SYNC_VISITOR_PROP,
|
|
44
44
|
attributes,
|
|
45
45
|
context
|
|
46
46
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024-
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -17,7 +17,29 @@
|
|
|
17
17
|
# Define the Constants module
|
|
18
18
|
module Constants
|
|
19
19
|
SDK_NAME = 'vwo-fme-ruby-sdk'.freeze
|
|
20
|
-
SDK_VERSION = '1.
|
|
20
|
+
SDK_VERSION = '1.50.0'.freeze
|
|
21
|
+
|
|
22
|
+
# --- Brand-specific constants ---
|
|
23
|
+
|
|
24
|
+
# SDK gem names (sent in every network request as the sdk name identifier)
|
|
25
|
+
VWO_SDK_NAME = 'vwo-fme-ruby-sdk'.freeze
|
|
26
|
+
WINGIFY_SDK_NAME = 'wingify-fme-ruby-sdk'.freeze
|
|
27
|
+
|
|
28
|
+
# Settings fetch hostnames
|
|
29
|
+
VWO_HOST_NAME = 'dev.visualwebsiteoptimizer.com'.freeze
|
|
30
|
+
WINGIFY_SETTINGS_HOST_NAME = 'edge.wingify.net'.freeze
|
|
31
|
+
|
|
32
|
+
# Collect / events hostnames (used for ALL outbound POST calls)
|
|
33
|
+
WINGIFY_COLLECTION_HOST_NAME = 'collect.wingify.net'.freeze
|
|
34
|
+
# Note: VWO uses VWO_HOST_NAME for both settings and events
|
|
35
|
+
|
|
36
|
+
# Log prefixes shown in every log line
|
|
37
|
+
VWO_LOG_PREFIX = 'VWO-SDK'.freeze
|
|
38
|
+
WINGIFY_LOG_PREFIX = 'Wingify-SDK'.freeze
|
|
39
|
+
|
|
40
|
+
# Human-readable brand display names (used in log messages and error output)
|
|
41
|
+
VWO_BRAND_DISPLAY_NAME = 'VWO'.freeze
|
|
42
|
+
WINGIFY_BRAND_DISPLAY_NAME = 'Wingify'.freeze
|
|
21
43
|
|
|
22
44
|
MAX_TRAFFIC_PERCENT = 100
|
|
23
45
|
MAX_TRAFFIC_VALUE = 10_000
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024-
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
# Event types
|
|
16
16
|
module EventEnum
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
VARIATION_SHOWN = 'vwo_variationShown'
|
|
18
|
+
SYNC_VISITOR_PROP = 'vwo_syncVisitorProp'
|
|
19
|
+
DEBUGGER_EVENT = 'vwo_sdkDebug'
|
|
20
|
+
INIT_CALLED = 'vwo_fmeSdkInit'
|
|
21
|
+
USAGE_STATS = 'vwo_sdkUsageStats'
|
|
22
22
|
end
|
|
@@ -78,7 +78,7 @@ class LogManager < VWOLogger
|
|
|
78
78
|
elsif @config[:transport]
|
|
79
79
|
add_transport(@config[:transport])
|
|
80
80
|
else
|
|
81
|
-
add_transport(ConsoleTransport.new(level: @config[:level]))
|
|
81
|
+
add_transport(ConsoleTransport.new(level: @config[:level], prefix: @config[:prefix]))
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
84
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2024-
|
|
1
|
+
# Copyright 2024-2026 Wingify Software Pvt. Ltd.
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -121,7 +121,7 @@ class NetworkClient
|
|
|
121
121
|
final_error_message = last_error_message || 'Unknown error'
|
|
122
122
|
|
|
123
123
|
# Log failure after max retries (skip for debugger events)
|
|
124
|
-
unless endpoint.include?(EventEnum::
|
|
124
|
+
unless endpoint.include?(EventEnum::DEBUGGER_EVENT)
|
|
125
125
|
LoggerService.log(
|
|
126
126
|
LogLevelEnum::ERROR,
|
|
127
127
|
"NETWORK_CALL_FAILURE_AFTER_MAX_RETRIES",
|