vwo-sdk 1.23.1 → 1.23.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vwo/constants.rb +1 -1
- data/lib/vwo/core/variation_decider.rb +4 -0
- data/lib/vwo/enums.rb +3 -3
- data/lib/vwo/schemas/settings_file.rb +3 -0
- data/lib/vwo/services/settings_file_manager.rb +3 -1
- data/lib/vwo/utils/custom_dimensions.rb +3 -1
- data/lib/vwo/utils/impression.rb +4 -2
- data/lib/vwo/utils/utility.rb +6 -0
- data/lib/vwo.rb +0 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c878b24cefb4bf2da034a1dec355b96d38650c52018dc8516f7e324e8469ae0e
|
4
|
+
data.tar.gz: ea385bb48e6aebdc4975b08449161cd24dbf075dc582959492f8ff7d7bcc751f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b424bfd4bc9eaab32001d67da2c5acb57b072ab935c9e4f24206ad9329e7a29f76d3498d497224e9adace85b2dcff0d37ade16e9864a651e02c434e8e788443c
|
7
|
+
data.tar.gz: e16e7e7e276fbb9ccbaa9c605e17790116b1e925a766a5f0252991c187a91bfaa4d00fa2ff1445d5cf98443e02e55fa7516845dce36974dd0e56301a86296e86
|
data/lib/vwo/constants.rb
CHANGED
@@ -27,7 +27,7 @@ class VWO
|
|
27
27
|
HTTP_PROTOCOL = 'http://'
|
28
28
|
HTTPS_PROTOCOL = 'https://'
|
29
29
|
URL_NAMESPACE = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'
|
30
|
-
SDK_VERSION = '1.23.
|
30
|
+
SDK_VERSION = '1.23.2'
|
31
31
|
SDK_NAME = 'ruby'
|
32
32
|
VWO_DELIMITER = '_vwo_'
|
33
33
|
MAX_EVENTS_PER_REQUEST = 5000
|
@@ -95,6 +95,10 @@ class VWO
|
|
95
95
|
:vwo_user_id => generator_for(user_id, @settings_file['accountId'])
|
96
96
|
}
|
97
97
|
|
98
|
+
if campaign.has_key?("name")
|
99
|
+
decision[:campaign_name] = campaign['name']
|
100
|
+
end
|
101
|
+
|
98
102
|
if is_campaign_part_of_group
|
99
103
|
group_id = @settings_file["campaignGroups"][campaign["id"].to_s]
|
100
104
|
decision[:group_id] = group_id
|
data/lib/vwo/enums.rb
CHANGED
@@ -128,9 +128,9 @@ class VWO
|
|
128
128
|
AUDIENCE_CONDITION_NOT_MET = '(%<file>s): userId:%<user_id>s does not become part of campaign because of not meeting audience conditions'
|
129
129
|
GOT_VARIATION_FOR_USER = '(%<file>s): userId:%<user_id>s for campaign:%<campaign_key>s got variationName:%<variation_name>s'
|
130
130
|
USER_GOT_NO_VARIATION = '(%<file>s): userId:%<user_id>s for campaign:%<campaign_key>s did not allot any variation'
|
131
|
-
IMPRESSION_SUCCESS = '(%<file>s): Impression event - %<end_point>s was successfully received by VWO having main keys:
|
132
|
-
MAIN_KEYS_FOR_IMPRESSION = '(%<file>s): Having main keys:
|
133
|
-
MAIN_KEYS_FOR_PUSH_API = '(%<file>s): Having main keys:
|
131
|
+
IMPRESSION_SUCCESS = '(%<file>s): Impression event - %<end_point>s was successfully received by VWO having main keys: accountId:%<account_id>s campaignId:%<campaign_id>s and variationId:%<variation_id>s'
|
132
|
+
MAIN_KEYS_FOR_IMPRESSION = '(%<file>s): Having main keys: accountId:%<account_id>s campaignId:%<campaign_id>s and variationId:%<variation_id>s}'
|
133
|
+
MAIN_KEYS_FOR_PUSH_API = '(%<file>s): Having main keys: accountId:%<account_id>s u:%<u>s and tags:%<tags>s}'
|
134
134
|
INVALID_VARIATION_KEY = '(%<file>s): Variation was not assigned to userId:%<user_id>s for campaign:%<campaign_key>s'
|
135
135
|
|
136
136
|
USER_IN_FEATURE_ROLLOUT = '(%<file>s): User ID:%<user_id>s is in feature rollout:%<campaign_key>s'
|
@@ -17,6 +17,7 @@ require_relative '../logger'
|
|
17
17
|
require_relative '../enums'
|
18
18
|
require_relative '../constants'
|
19
19
|
require_relative './impression'
|
20
|
+
require_relative './utility'
|
20
21
|
|
21
22
|
# Utility module for helper math and random functions
|
22
23
|
class VWO
|
@@ -25,6 +26,7 @@ class VWO
|
|
25
26
|
include VWO::CONSTANTS
|
26
27
|
include VWO::Enums
|
27
28
|
include VWO::Utils::Impression
|
29
|
+
include VWO::Utils::Utility
|
28
30
|
|
29
31
|
def get_url_params(settings_file, tag_key, tag_value, user_id, sdk_key)
|
30
32
|
url = HTTPS_PROTOCOL + ENDPOINTS::BASE_URL + ENDPOINTS::PUSH
|
@@ -39,7 +41,7 @@ class VWO
|
|
39
41
|
format(
|
40
42
|
LogMessageEnum::DebugMessages::PARAMS_FOR_PUSH_CALL,
|
41
43
|
file: FileNameEnum::CustomDimensionsUtil,
|
42
|
-
properties:
|
44
|
+
properties: remove_sensitive_properties(params)
|
43
45
|
)
|
44
46
|
)
|
45
47
|
params
|
data/lib/vwo/utils/impression.rb
CHANGED
@@ -19,6 +19,7 @@ require_relative '../enums'
|
|
19
19
|
require_relative '../constants'
|
20
20
|
require_relative 'function'
|
21
21
|
require_relative 'uuid'
|
22
|
+
require_relative 'utility'
|
22
23
|
|
23
24
|
# Creates the impression from the arguments passed
|
24
25
|
class VWO
|
@@ -28,6 +29,7 @@ class VWO
|
|
28
29
|
include VWO::CONSTANTS
|
29
30
|
include VWO::Utils::Function
|
30
31
|
include UUID
|
32
|
+
include VWO::Utils::Utility
|
31
33
|
|
32
34
|
# Creates the impression from the arguments passed
|
33
35
|
#
|
@@ -76,7 +78,7 @@ class VWO
|
|
76
78
|
format(
|
77
79
|
LogMessageEnum::DebugMessages::IMPRESSION_FOR_TRACK_USER,
|
78
80
|
file: FileNameEnum::ImpressionUtil,
|
79
|
-
properties:
|
81
|
+
properties: remove_sensitive_properties(impression)
|
80
82
|
)
|
81
83
|
)
|
82
84
|
else
|
@@ -88,7 +90,7 @@ class VWO
|
|
88
90
|
format(
|
89
91
|
LogMessageEnum::DebugMessages::IMPRESSION_FOR_TRACK_GOAL,
|
90
92
|
file: FileNameEnum::ImpressionUtil,
|
91
|
-
properties:
|
93
|
+
properties: remove_sensitive_properties(impression)
|
92
94
|
)
|
93
95
|
)
|
94
96
|
end
|
data/lib/vwo/utils/utility.rb
CHANGED
data/lib/vwo.rb
CHANGED
@@ -408,7 +408,6 @@ class VWO
|
|
408
408
|
format(
|
409
409
|
LogMessageEnum::InfoMessages::IMPRESSION_SUCCESS,
|
410
410
|
file: FILE,
|
411
|
-
sdk_key: @sdk_key,
|
412
411
|
account_id: @account_id,
|
413
412
|
campaign_id: campaign['id'],
|
414
413
|
variation_id: variation['id'],
|
@@ -725,7 +724,6 @@ class VWO
|
|
725
724
|
format(
|
726
725
|
LogMessageEnum::InfoMessages::IMPRESSION_SUCCESS,
|
727
726
|
file: FILE,
|
728
|
-
sdk_key: @sdk_key,
|
729
727
|
account_id: @account_id,
|
730
728
|
campaign_id: campaign['id'],
|
731
729
|
variation_id: variation['id'],
|
@@ -737,7 +735,6 @@ class VWO
|
|
737
735
|
format(
|
738
736
|
LogMessageEnum::InfoMessages::MAIN_KEYS_FOR_IMPRESSION,
|
739
737
|
file: FILE,
|
740
|
-
sdk_key: @sdk_key,
|
741
738
|
campaign_id: impression[:experiment_id],
|
742
739
|
account_id: impression[:account_id],
|
743
740
|
variation_id: impression[:combination]
|
@@ -905,7 +902,6 @@ class VWO
|
|
905
902
|
LogMessageEnum::InfoMessages::MAIN_KEYS_FOR_IMPRESSION,
|
906
903
|
file: FILE,
|
907
904
|
campaign_id: impression[:experiment_id],
|
908
|
-
sdk_key: @sdk_key,
|
909
905
|
account_id: impression[:account_id],
|
910
906
|
variation_id: impression[:combination]
|
911
907
|
)
|
@@ -1206,7 +1202,6 @@ class VWO
|
|
1206
1202
|
format(
|
1207
1203
|
LogMessageEnum::InfoMessages::MAIN_KEYS_FOR_PUSH_API,
|
1208
1204
|
file: FILE,
|
1209
|
-
sdk_key: @sdk_key,
|
1210
1205
|
u: impression['u'],
|
1211
1206
|
account_id: impression['account_id'],
|
1212
1207
|
tags: impression['tags']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vwo-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.23.
|
4
|
+
version: 1.23.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VWO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codecov
|