vwo-fme-ruby-sdk 1.11.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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/lib/resources/debug_messages.json +3 -3
  3. data/lib/resources/error_messages.json +5 -5
  4. data/lib/resources/info_messages.json +9 -9
  5. data/lib/vwo.rb +19 -104
  6. data/lib/{vwo → wingify}/api/get_flag.rb +1 -1
  7. data/lib/{vwo → wingify}/api/set_attribute.rb +3 -3
  8. data/lib/{vwo → wingify}/api/track_event.rb +1 -1
  9. data/lib/{vwo → wingify}/constants/constants.rb +24 -2
  10. data/lib/{vwo → wingify}/decorators/storage_decorator.rb +1 -1
  11. data/lib/{vwo → wingify}/enums/api_enum.rb +1 -1
  12. data/lib/{vwo → wingify}/enums/campaign_type_enum.rb +1 -1
  13. data/lib/{vwo → wingify}/enums/debug_category_enum.rb +1 -1
  14. data/lib/{vwo → wingify}/enums/decision_types_enum.rb +1 -1
  15. data/lib/{vwo → wingify}/enums/event_enum.rb +6 -6
  16. data/lib/{vwo → wingify}/enums/headers_enum.rb +1 -1
  17. data/lib/{vwo → wingify}/enums/hooks_enum.rb +1 -1
  18. data/lib/{vwo → wingify}/enums/http_method_enum.rb +1 -1
  19. data/lib/{vwo → wingify}/enums/log_level_enum.rb +1 -1
  20. data/lib/{vwo → wingify}/enums/log_level_to_number.rb +1 -1
  21. data/lib/{vwo → wingify}/enums/status_enum.rb +1 -1
  22. data/lib/{vwo → wingify}/enums/storage_enum.rb +1 -1
  23. data/lib/{vwo → wingify}/enums/url_enum.rb +1 -1
  24. data/lib/{vwo → wingify}/models/campaign/campaign_model.rb +1 -1
  25. data/lib/{vwo → wingify}/models/campaign/feature_model.rb +1 -1
  26. data/lib/{vwo → wingify}/models/campaign/impact_campaign_model.rb +1 -1
  27. data/lib/{vwo → wingify}/models/campaign/metric_model.rb +1 -1
  28. data/lib/{vwo → wingify}/models/campaign/rule_model.rb +1 -1
  29. data/lib/{vwo → wingify}/models/campaign/variable_model.rb +1 -1
  30. data/lib/{vwo → wingify}/models/campaign/variation_model.rb +1 -1
  31. data/lib/{vwo → wingify}/models/gateway_service_model.rb +1 -1
  32. data/lib/{vwo → wingify}/models/schemas/settings_schema_validation.rb +1 -1
  33. data/lib/{vwo → wingify}/models/settings/settings_model.rb +1 -1
  34. data/lib/{vwo → wingify}/models/storage/storage_data_model.rb +1 -1
  35. data/lib/{vwo → wingify}/models/user/context_model.rb +1 -1
  36. data/lib/{vwo → wingify}/models/user/context_vwo_model.rb +1 -1
  37. data/lib/{vwo → wingify}/models/user/get_flag_response.rb +1 -1
  38. data/lib/{vwo → wingify}/models/vwo_options_model.rb +1 -1
  39. data/lib/{vwo → wingify}/packages/decision_maker/decision_maker.rb +1 -1
  40. data/lib/{vwo → wingify}/packages/logger/core/log_manager.rb +1 -1
  41. data/lib/{vwo → wingify}/packages/logger/core/transport_manager.rb +1 -1
  42. data/lib/{vwo → wingify}/packages/logger/log_message_builder.rb +1 -1
  43. data/lib/{vwo → wingify}/packages/logger/logger.rb +1 -1
  44. data/lib/{vwo → wingify}/packages/logger/transports/console_transport.rb +1 -1
  45. data/lib/{vwo → wingify}/packages/network_layer/client/network_client.rb +2 -2
  46. data/lib/{vwo → wingify}/packages/network_layer/handlers/request_handler.rb +1 -1
  47. data/lib/{vwo → wingify}/packages/network_layer/manager/network_manager.rb +1 -1
  48. data/lib/{vwo → wingify}/packages/network_layer/models/global_request_model.rb +1 -1
  49. data/lib/{vwo → wingify}/packages/network_layer/models/request_model.rb +1 -1
  50. data/lib/{vwo → wingify}/packages/network_layer/models/response_model.rb +1 -1
  51. data/lib/{vwo → wingify}/packages/segmentation_evaluator/core/segmentation_manager.rb +1 -1
  52. data/lib/{vwo → wingify}/packages/segmentation_evaluator/enums/segment_operand_regex_enum.rb +1 -1
  53. data/lib/{vwo → wingify}/packages/segmentation_evaluator/enums/segment_operand_value_enum.rb +1 -1
  54. data/lib/{vwo → wingify}/packages/segmentation_evaluator/enums/segment_operator_value_enum.rb +1 -1
  55. data/lib/{vwo → wingify}/packages/segmentation_evaluator/evaluators/segment_evaluator.rb +1 -1
  56. data/lib/{vwo → wingify}/packages/segmentation_evaluator/evaluators/segment_operand_evaluator.rb +1 -1
  57. data/lib/{vwo → wingify}/packages/segmentation_evaluator/utils/segment_util.rb +1 -1
  58. data/lib/{vwo → wingify}/packages/storage/connector.rb +1 -1
  59. data/lib/{vwo → wingify}/packages/storage/storage.rb +1 -1
  60. data/lib/{vwo → wingify}/services/batch_event_queue.rb +1 -1
  61. data/lib/{vwo → wingify}/services/campaign_decision_service.rb +1 -1
  62. data/lib/{vwo → wingify}/services/hooks_service.rb +1 -1
  63. data/lib/{vwo → wingify}/services/logger_service.rb +21 -10
  64. data/lib/{vwo → wingify}/services/settings_service.rb +27 -19
  65. data/lib/{vwo → wingify}/services/storage_service.rb +1 -1
  66. data/lib/{vwo → wingify}/utils/batch_event_dispatcher_util.rb +5 -5
  67. data/lib/wingify/utils/brand_context.rb +33 -0
  68. data/lib/wingify/utils/brand_util.rb +53 -0
  69. data/lib/{vwo → wingify}/utils/campaign_util.rb +1 -1
  70. data/lib/{vwo → wingify}/utils/data_type_util.rb +1 -1
  71. data/lib/{vwo → wingify}/utils/debugger_service_util.rb +2 -2
  72. data/lib/{vwo → wingify}/utils/decision_util.rb +1 -1
  73. data/lib/{vwo → wingify}/utils/event_util.rb +5 -5
  74. data/lib/{vwo → wingify}/utils/function_util.rb +1 -1
  75. data/lib/{vwo → wingify}/utils/gateway_service_util.rb +2 -2
  76. data/lib/{vwo → wingify}/utils/impression_util.rb +3 -3
  77. data/lib/{vwo → wingify}/utils/log_message_util.rb +1 -1
  78. data/lib/{vwo → wingify}/utils/meg_util.rb +1 -1
  79. data/lib/{vwo → wingify}/utils/network_util.rb +16 -16
  80. data/lib/{vwo → wingify}/utils/rule_evaluation_util.rb +1 -1
  81. data/lib/{vwo → wingify}/utils/settings_util.rb +1 -1
  82. data/lib/{vwo → wingify}/utils/usage_stats_util.rb +1 -1
  83. data/lib/{vwo → wingify}/utils/uuid_util.rb +1 -1
  84. data/lib/{vwo/vwo_builder.rb → wingify/wingify_builder.rb} +12 -12
  85. data/lib/{vwo/vwo_client.rb → wingify/wingify_client.rb} +2 -2
  86. data/lib/wingify.rb +117 -0
  87. metadata +159 -80
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45e767e6d560045ec2ded7455611fb246ea6a5fa5790f43fa2cff3752c7c6bac
4
- data.tar.gz: 72411b218f6457da494c7e57e09864bb29eb79675953bfb63c057a8d615ae71d
3
+ metadata.gz: 3d76a694880edd0c5a2fa5b892193eef8f601c95d3d0a140c28681450196e2ee
4
+ data.tar.gz: 95ff81d4b0e38159a57e7d22a603d7f81df3319ad2fb43bb7395691c46b24a79
5
5
  SHA512:
6
- metadata.gz: b6fc602254dfd56bef13c00f70c0a12dfb6735b33f3303aa4138c9dce24ca14255d665257f7c0673ff53e1cd0fb3553ebf984f9395b02bd018ec63372e696b2d
7
- data.tar.gz: 5d9d10c85f9c06cf8ffca33251939f3bf29c9c0023c8902a5a943877643af013b96d1eaa2e285016d9a2af83c5953e98c70d870ae08e9c32bd36b030cb4137bf
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": "VWO {service} initialized while creating an instance of SDK",
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(VWO standard event for tracking user) event haivng Account ID:{accountId}, User ID:{userId}, and experiment ID:{campaignId}",
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}(VWO internal event) event for Account ID:{accountId}, and user ID:{userId}",
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]: VWO-SDK {date} Options should be of type object",
4
- "INVALID_SDK_KEY_IN_OPTIONS": "[ERROR]: VWO-SDK {date} Please provide the sdkKey in the options and should be a of type string",
5
- "INVALID_ACCOUNT_ID_IN_OPTIONS": "[ERROR]: VWO-SDK {date} Please provide VWO account ID in the options and should be a of type string|number",
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 VWO client instance couldn't be updated when API: {apiName} got called having isViaWebhook param as {isViaWebhook}. Error: {err}",
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 VWO Gateway Service while initializing the SDK",
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]: VWO-SDK {date} {apiName} already resolved",
3
- "ON_INIT_SETTINGS_FAILED": "[INFO]: VWO-SDK {date} VWO settings could not be fetched",
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 VWO client internally",
6
- "POLLING_NO_CHANGE_IN_SETTINGS": "No change in settings with the last settings fetched. Hence, not instantiating new VWO client",
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": "VWO 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 VWO client instance when API: {apiName} got called having isViaWebhook param as {isViaWebhook}",
32
- "NETWORK_CALL_SUCCESS": "Impression for {event} - {endPoint} was successfully received by VWO having Account ID:{accountId}, UUID: {uuid}",
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 VWO having Account ID:{accountId}",
38
- "IMPRESSION_BATCH_FAILED": "Batch events couldn\"t be received by VWO. Calling Flush Callback with error and data",
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-2025 Wingify Software Pvt. Ltd.
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
- require 'json'
16
- require 'uri'
17
- require_relative 'vwo/vwo_builder'
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
- class VWO
23
- @@vwo_builder = nil
24
- @@instance = nil
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
- begin
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
- # check if user_id and account_id are non-empty strings
117
- if !user_id.is_a?(String) || user_id.empty? || !account_id.is_a?(String) || account_id.empty?
118
- puts "User ID and account ID must be non-empty strings"
119
- return nil
120
- end
121
-
122
- # generate and return a new uuid based on user_id and account_id
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-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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::VWO_SYNC_VISITOR_PROP,
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::VWO_SYNC_VISITOR_PROP,
43
+ EventEnum::SYNC_VISITOR_PROP,
44
44
  attributes,
45
45
  context
46
46
  )
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.11.0'.freeze
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-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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
- VWO_VARIATION_SHOWN = 'vwo_variationShown'
18
- VWO_SYNC_VISITOR_PROP = 'vwo_syncVisitorProp'
19
- VWO_DEBUGGER_EVENT = 'vwo_sdkDebug'
20
- VWO_INIT_CALLED = 'vwo_fmeSdkInit'
21
- VWO_USAGE_STATS = 'vwo_sdkUsageStats'
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
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -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-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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::VWO_DEBUGGER_EVENT)
124
+ unless endpoint.include?(EventEnum::DEBUGGER_EVENT)
125
125
  LoggerService.log(
126
126
  LogLevelEnum::ERROR,
127
127
  "NETWORK_CALL_FAILURE_AFTER_MAX_RETRIES",
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.
@@ -1,4 +1,4 @@
1
- # Copyright 2024-2025 Wingify Software Pvt. Ltd.
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.