vwo-sdk 1.15.0 → 1.16.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/vwo/constants.rb +4 -2
- data/lib/vwo/schemas/settings_file.rb +31 -1
- data/lib/vwo/utils/feature.rb +2 -0
- 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: '084660e0c3fcb3c07826944ba8d83988711b59165ea54a54b1e47042a889bbf5'
|
4
|
+
data.tar.gz: 62c4ae889870a381d2973967412f0916baa0d25ce377604aa096c5f4dd0a8e79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67fd788b416ac54e9d27999ca757662eb88a123a804ccf3c93538e58787a3fd1181686543a7abdbb94dbd7d66f5d1c63421ae21d1b3e794b93cff6951355fdd2
|
7
|
+
data.tar.gz: 7950a38da6e5993575ff46e1c1ba2f901d98fa4112e54070297c78846e2b29eacdae4042c51d03f1e9e8b05d55aa4e60b698fa70af43c7d1ae2167953aaaec6c
|
data/lib/vwo/constants.rb
CHANGED
@@ -26,7 +26,7 @@ class VWO
|
|
26
26
|
HTTP_PROTOCOL = 'http://'
|
27
27
|
HTTPS_PROTOCOL = 'https://'
|
28
28
|
URL_NAMESPACE = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'
|
29
|
-
SDK_VERSION = '1.
|
29
|
+
SDK_VERSION = '1.16.0'
|
30
30
|
SDK_NAME = 'ruby'
|
31
31
|
VWO_DELIMITER = '_vwo_'
|
32
32
|
MAX_EVENTS_PER_REQUEST = 5000
|
@@ -68,6 +68,7 @@ class VWO
|
|
68
68
|
INTEGER = 'integer'
|
69
69
|
DOUBLE = 'double'
|
70
70
|
BOOLEAN = 'boolean'
|
71
|
+
JSON = 'json'
|
71
72
|
end
|
72
73
|
|
73
74
|
module Hooks
|
@@ -80,7 +81,8 @@ class VWO
|
|
80
81
|
'string' => [String],
|
81
82
|
'integer' => [Integer],
|
82
83
|
'double' => [Float],
|
83
|
-
'boolean' => [TrueClass, FalseClass]
|
84
|
+
'boolean' => [TrueClass, FalseClass],
|
85
|
+
'json' => [Hash]
|
84
86
|
}
|
85
87
|
|
86
88
|
GOAL_TYPES = {
|
@@ -54,7 +54,13 @@ class VWO
|
|
54
54
|
},
|
55
55
|
weight: {
|
56
56
|
type: %w[number string]
|
57
|
-
}
|
57
|
+
},
|
58
|
+
variables: {
|
59
|
+
type: 'array',
|
60
|
+
items: {
|
61
|
+
'$ref' => '#/definitions/variables_schema'
|
62
|
+
}
|
63
|
+
}
|
58
64
|
},
|
59
65
|
required: %w[id name weight]
|
60
66
|
},
|
@@ -79,9 +85,33 @@ class VWO
|
|
79
85
|
'$ref' => '#/definitions/campaign_variation_schema'
|
80
86
|
}
|
81
87
|
},
|
88
|
+
variables: {
|
89
|
+
type: 'array',
|
90
|
+
items: {
|
91
|
+
'$ref' => '#/definitions/variables_schema'
|
92
|
+
}
|
93
|
+
},
|
82
94
|
minItems: 2
|
83
95
|
}
|
84
96
|
},
|
97
|
+
variables_schema: {
|
98
|
+
type: 'object',
|
99
|
+
properties: {
|
100
|
+
id: {
|
101
|
+
type: %w[number string]
|
102
|
+
},
|
103
|
+
key: {
|
104
|
+
type: ['string']
|
105
|
+
},
|
106
|
+
type: {
|
107
|
+
type: ['string']
|
108
|
+
},
|
109
|
+
value: {
|
110
|
+
type: %w[number string boolean double object]
|
111
|
+
}
|
112
|
+
},
|
113
|
+
required: %w[id key type value]
|
114
|
+
},
|
85
115
|
required: %w[
|
86
116
|
id
|
87
117
|
key
|
data/lib/vwo/utils/feature.rb
CHANGED
@@ -38,6 +38,8 @@ class VWO
|
|
38
38
|
return value.to_f if variable_type == VariableTypes::DOUBLE
|
39
39
|
|
40
40
|
return !value || value == 0 ? false : true if variable_type == VariableTypes.BOOLEAN
|
41
|
+
|
42
|
+
return value if variable_type == VariableTypes::JSON
|
41
43
|
rescue StandardError => _e
|
42
44
|
VWO::Logger.get_instance.log(
|
43
45
|
LogLevelEnum::ERROR,
|
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.
|
4
|
+
version: 1.16.0
|
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-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: codecov
|