vwo-fme-ruby-sdk 1.4.0 → 1.4.1
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/vwo/constants/constants.rb +1 -1
- data/lib/vwo/utils/network_util.rb +12 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 314b352ba0d4578530e72be01599eee2846ed17f080adf40ddaadfe404d1a849
|
4
|
+
data.tar.gz: 54f0126d7666337219026a5c47c046a9516c60ffa658ae8e3d45f379258dc946
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dcceb86720c7f1d8c763d0974beb710cca033724bf76f35a884b80f3c7bb12b3adea108b04fdccdc85f297e585ee9813bf64ce9a854313e15ee775f34d20780
|
7
|
+
data.tar.gz: 21c80bd1c369b7344c93d3e72858fa4a47d4ad2199b9df63bf8c95371e92f39adcbd82012903ab26c7e09e1873e285d201229d040c0781fb1071f213ff4c2f9d
|
@@ -32,7 +32,7 @@ class NetworkUtil
|
|
32
32
|
# @return [String] URL-encoded query string
|
33
33
|
def convert_params_to_string(params)
|
34
34
|
return '' if params.nil? || params.empty?
|
35
|
-
|
35
|
+
|
36
36
|
'?' + params.map do |key, value|
|
37
37
|
"#{URI.encode_www_form_component(key.to_s)}=#{URI.encode_www_form_component(value.to_s)}"
|
38
38
|
end.join('&')
|
@@ -139,13 +139,13 @@ class NetworkUtil
|
|
139
139
|
if usage_stats.size > 0
|
140
140
|
properties[:d][:event][:props][:vwoMeta] = usage_stats
|
141
141
|
end
|
142
|
-
|
142
|
+
|
143
143
|
LoggerService.log(LogLevelEnum::DEBUG, "IMPRESSION_FOR_TRACK_USER", {
|
144
144
|
accountId: SettingsService.instance.account_id,
|
145
145
|
userId: user_id,
|
146
146
|
campaignId: campaign_id
|
147
147
|
})
|
148
|
-
|
148
|
+
|
149
149
|
properties
|
150
150
|
end
|
151
151
|
|
@@ -158,17 +158,17 @@ class NetworkUtil
|
|
158
158
|
properties[:d][:event][:props][:variation] = 1
|
159
159
|
properties[:d][:event][:props][:id] = 1 # Temporary value for ID
|
160
160
|
end
|
161
|
-
|
161
|
+
|
162
162
|
if event_properties.is_a?(Hash) && !event_properties.empty?
|
163
163
|
event_properties.each { |key, value| properties[:d][:event][:props][key] = value }
|
164
164
|
end
|
165
|
-
|
165
|
+
|
166
166
|
LoggerService.log(LogLevelEnum::DEBUG, "IMPRESSION_FOR_TRACK_GOAL", {
|
167
167
|
eventName: event_name,
|
168
168
|
accountId: SettingsService.instance.account_id,
|
169
169
|
userId: user_id
|
170
170
|
})
|
171
|
-
|
171
|
+
|
172
172
|
properties
|
173
173
|
end
|
174
174
|
|
@@ -194,7 +194,7 @@ class NetworkUtil
|
|
194
194
|
# @param sdk_init_time - Time taken to initialize the SDK in milliseconds.
|
195
195
|
# @returns The constructed payload with required fields.
|
196
196
|
def get_sdk_init_event_payload(event_name, settings_fetch_time, sdk_init_time)
|
197
|
-
user_id = SettingsService.instance.account_id + "_" + SettingsService.instance.sdk_key
|
197
|
+
user_id = SettingsService.instance.account_id.to_s + "_" + SettingsService.instance.sdk_key
|
198
198
|
properties = _get_event_base_payload(user_id, event_name, nil, nil)
|
199
199
|
properties[:d][:event][:props][:vwo_fs_environment] = SettingsService.instance.sdk_key
|
200
200
|
properties[:d][:event][:props][:product] = Constants::PRODUCT_NAME
|
@@ -225,7 +225,7 @@ class NetworkUtil
|
|
225
225
|
SettingsService.instance.port
|
226
226
|
)
|
227
227
|
|
228
|
-
begin
|
228
|
+
begin
|
229
229
|
if network_instance.get_client.get_should_use_threading
|
230
230
|
network_instance.get_client.get_thread_pool.post {
|
231
231
|
response = network_instance.post(request)
|
@@ -270,7 +270,7 @@ class NetworkUtil
|
|
270
270
|
SettingsService.instance.port
|
271
271
|
)
|
272
272
|
|
273
|
-
begin
|
273
|
+
begin
|
274
274
|
if network_instance.get_client.get_should_use_threading
|
275
275
|
network_instance.get_client.get_thread_pool.post {
|
276
276
|
response = network_instance.post(request)
|
@@ -287,7 +287,7 @@ class NetworkUtil
|
|
287
287
|
# Sends a GET API request to the specified endpoint with given properties
|
288
288
|
def send_get_api_request(properties, endpoint)
|
289
289
|
network_instance = NetworkManager.instance
|
290
|
-
|
290
|
+
|
291
291
|
request = RequestModel.new(
|
292
292
|
UrlUtil.get_base_url,
|
293
293
|
HttpMethodEnum::GET,
|
@@ -298,7 +298,7 @@ class NetworkUtil
|
|
298
298
|
SettingsService.Instance.protocol,
|
299
299
|
SettingsService.Instance.port
|
300
300
|
)
|
301
|
-
|
301
|
+
|
302
302
|
begin
|
303
303
|
network_instance.get(request)
|
304
304
|
rescue StandardError => err
|
@@ -309,4 +309,4 @@ class NetworkUtil
|
|
309
309
|
end
|
310
310
|
end
|
311
311
|
end
|
312
|
-
end
|
312
|
+
end
|