vwo-sdk 1.30.0 → 1.37.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,10 +12,10 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require_relative '../logger'
16
15
  require_relative '../enums'
17
16
  require_relative '../utils/request'
18
17
  require_relative '../utils/utility'
18
+ require_relative '../utils/log_message'
19
19
  require_relative '../constants'
20
20
 
21
21
  class VWO
@@ -33,7 +33,7 @@ class VWO
33
33
  # to our server should be made or not.
34
34
  #
35
35
  def initialize(is_development_mode = false)
36
- @logger = VWO::Logger.get_instance
36
+ @logger = VWO::Utils::Logger
37
37
  @is_development_mode = is_development_mode
38
38
  end
39
39
 
@@ -43,7 +43,7 @@ class VWO
43
43
  # the request to be dispatched to the VWO server
44
44
  # @return[Boolean]
45
45
  #
46
- def dispatch(impression)
46
+ def dispatch(impression, main_keys, end_point)
47
47
  return true if @is_development_mode
48
48
 
49
49
  modified_event = impression.reject do |key, _value|
@@ -52,18 +52,38 @@ class VWO
52
52
 
53
53
  resp = VWO::Utils::Request.get(impression['url'], modified_event)
54
54
  if resp.code == '200'
55
+ @logger.log(
56
+ LogLevelEnum::INFO,
57
+ 'IMPRESSION_SUCCESS',
58
+ {
59
+ '{file}' => FILE,
60
+ '{endPoint}' => end_point,
61
+ '{accountId}' => impression['account_id'] || impression[:account_id],
62
+ '{mainKeys}' => JSON.generate(main_keys)
63
+ }
64
+ )
55
65
  true
56
66
  else
57
67
  @logger.log(
58
68
  LogLevelEnum::ERROR,
59
- format(LogMessageEnum::ErrorMessages::IMPRESSION_FAILED, file: FileNameEnum::EventDispatcher, end_point: impression['url'])
69
+ 'IMPRESSION_FAILED',
70
+ {
71
+ '{file}' => FileNameEnum::BATCH_EVENTS_DISPATCHER,
72
+ '{err}' => resp.message,
73
+ '{endPoint}' => impression['url']
74
+ }
60
75
  )
61
76
  false
62
77
  end
63
- rescue StandardError
78
+ rescue StandardError => e
64
79
  @logger.log(
65
80
  LogLevelEnum::ERROR,
66
- format(LogMessageEnum::ErrorMessages::IMPRESSION_FAILED, file: FileNameEnum::EventDispatcher, end_point: impression['url'])
81
+ 'IMPRESSION_FAILED',
82
+ {
83
+ '{file}' => FileNameEnum::BATCH_EVENTS_DISPATCHER,
84
+ '{err}' => e.message,
85
+ '{endPoint}' => impression['url']
86
+ }
67
87
  )
68
88
  false
69
89
  end
@@ -76,26 +96,36 @@ class VWO
76
96
  if resp.code == '200'
77
97
  @logger.log(
78
98
  LogLevelEnum::INFO,
79
- format(
80
- LogMessageEnum::InfoMessages::IMPRESSION_SUCCESS_FOR_EVENT_ARCH,
81
- file: FileNameEnum::EventDispatcher,
82
- event: 'visitor property:' + JSON.generate(post_data[:d][:visitor][:props]),
83
- url: url,
84
- a: params[:a]
85
- )
99
+ 'IMPRESSION_SUCCESS_FOR_EVENT_ARCH',
100
+ {
101
+ '{file}' => FileNameEnum::BATCH_EVENTS_DISPATCHER,
102
+ '{event}' => "visitor property:#{JSON.generate(post_data[:d][:visitor][:props])}",
103
+ '{endPoint}' => url,
104
+ '{accountId}' => params[:a]
105
+ }
86
106
  )
87
107
  true
88
108
  else
89
109
  @logger.log(
90
110
  LogLevelEnum::ERROR,
91
- format(LogMessageEnum::ErrorMessages::IMPRESSION_FAILED, file: FileNameEnum::EventDispatcher, end_point: url)
111
+ 'IMPRESSION_FAILED',
112
+ {
113
+ '{file}' => FileNameEnum::EVENT_DISPATCHER,
114
+ '{err}' => resp.message,
115
+ '{endPoint}' => url
116
+ }
92
117
  )
93
118
  false
94
119
  end
95
- rescue StandardError
120
+ rescue StandardError => e
96
121
  @logger.log(
97
122
  LogLevelEnum::ERROR,
98
- format(LogMessageEnum::ErrorMessages::IMPRESSION_FAILED, file: FileNameEnum::EventDispatcher, end_point: url)
123
+ 'IMPRESSION_FAILED',
124
+ {
125
+ '{file}' => FileNameEnum::EVENT_DISPATCHER,
126
+ '{err}' => e.message,
127
+ '{endPoint}' => url
128
+ }
99
129
  )
100
130
  false
101
131
  end
@@ -15,22 +15,18 @@
15
15
  class VWO
16
16
  module Services
17
17
  class HooksManager
18
- # Hooks Manager is responsible for triggering callbacks useful to the end-user based on certain lifecycle events.
19
- # Possible use with integrations when the user intends to send an event when a visitor is part of the experiment.
18
+ # Hooks Manager is responsible for triggering callbacks useful to the end-user based on certain lifecycle events.
19
+ # Possible use with integrations when the user intends to send an event when a visitor is part of the experiment.
20
20
  def initialize(config)
21
21
  @logger = VWO::Logger.get_instance
22
- if config.key?(:integrations) && config[:integrations].key?(:callback) && config[:integrations][:callback].is_a?(Method)
23
- @callback = config[:integrations][:callback]
24
- end
22
+ @callback = config[:integrations][:callback] if config.key?(:integrations) && config[:integrations].key?(:callback) && config[:integrations][:callback].is_a?(Method)
25
23
  end
26
24
 
27
- # Executes the callback
28
- # @param[Hash] properties Properties from the callback
29
- def execute(properties)
30
- if @callback
31
- @callback.call(properties)
32
- end
33
- end
25
+ # Executes the callback
26
+ # @param[Hash] properties Properties from the callback
27
+ def execute(properties)
28
+ @callback&.call(properties)
29
+ end
34
30
  end
35
31
  end
36
32
  end
@@ -12,12 +12,12 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require_relative '../logger'
16
15
  require_relative '../enums'
17
16
  require_relative './operand_evaluator'
18
17
  require_relative '../utils/function'
19
18
  require_relative '../utils/segment'
20
19
  require_relative '../utils/validations'
20
+ require_relative '../utils/log_message'
21
21
 
22
22
  class VWO
23
23
  module Services
@@ -29,7 +29,7 @@ class VWO
29
29
 
30
30
  # Initializes this class with VWOLogger and OperandEvaluator
31
31
  def initialize
32
- @logger = VWO::Logger.get_instance
32
+ @logger = VWO::Utils::Logger
33
33
  @operand_evaluator = OperandEvaluator.new
34
34
  end
35
35
 
@@ -43,15 +43,16 @@ class VWO
43
43
  #
44
44
  def evaluate_util(dsl, custom_variables)
45
45
  operator, sub_dsl = get_key_value(dsl)
46
- if operator == OperatorTypes::NOT
46
+ case operator
47
+ when OperatorTypes::NOT
47
48
  !evaluate_util(sub_dsl, custom_variables)
48
- elsif operator == OperatorTypes::AND
49
+ when OperatorTypes::AND
49
50
  sub_dsl.all? { |y| evaluate_util(y, custom_variables) }
50
- elsif operator == OperatorTypes::OR
51
+ when OperatorTypes::OR
51
52
  sub_dsl.any? { |y| evaluate_util(y, custom_variables) }
52
- elsif operator == OperandTypes::CUSTOM_VARIABLE
53
+ when OperandTypes::CUSTOM_VARIABLE
53
54
  @operand_evaluator.evaluate_custom_variable?(sub_dsl, custom_variables)
54
- elsif operator == OperandTypes::USER
55
+ when OperandTypes::USER
55
56
  @operand_evaluator.evaluate_user?(sub_dsl, custom_variables)
56
57
  end
57
58
  end
@@ -73,14 +74,15 @@ class VWO
73
74
  rescue StandardError => e
74
75
  @logger.log(
75
76
  LogLevelEnum::ERROR,
76
- format(
77
- LogMessageEnum::ErrorMessages::SEGMENTATION_ERROR,
78
- file: FileNameEnum::SegmentEvaluator,
79
- user_id: user_id,
80
- campaign_key: campaign_key,
81
- custom_variables: custom_variables,
82
- error_message: e
83
- ),
77
+ 'SEGMENTATION_ERROR',
78
+ {
79
+ '{file}' => FileNameEnum::SEGMENT_EVALUATOR,
80
+ '{userId}' => user_id,
81
+ '{campaignKey}' => campaign_key,
82
+ '{variation}' => '',
83
+ '{customVariables}' => custom_variables,
84
+ '{err}' => e.message
85
+ },
84
86
  disable_logs
85
87
  )
86
88
  false
@@ -47,11 +47,11 @@ class VWO
47
47
  return '{}'
48
48
  end
49
49
 
50
- if is_via_webhook
51
- path = ::VWO::CONSTANTS::ENDPOINTS::WEBHOOK_SETTINGS_URL
52
- else
53
- path = ::VWO::CONSTANTS::ENDPOINTS::SETTINGS_URL
54
- end
50
+ path = if is_via_webhook
51
+ ::VWO::CONSTANTS::ENDPOINTS::WEBHOOK_SETTINGS_URL
52
+ else
53
+ ::VWO::CONSTANTS::ENDPOINTS::SETTINGS_URL
54
+ end
55
55
  vwo_server_url = "#{PROTOCOL}://#{HOSTNAME}#{path}"
56
56
 
57
57
  settings_file_response = ::VWO::Utils::Request.get(vwo_server_url, params)
@@ -12,9 +12,9 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require_relative '../logger'
16
15
  require_relative '../enums'
17
16
  require_relative '../utils/campaign'
17
+ require_relative '../utils/log_message'
18
18
 
19
19
  class VWO
20
20
  module Services
@@ -30,7 +30,6 @@ class VWO
30
30
 
31
31
  def initialize(settings_file)
32
32
  @settings_file = JSON.parse(settings_file)
33
- @logger = VWO::Logger.get_instance
34
33
  end
35
34
 
36
35
  # Processes the settings_file, assigns variation allocation range
@@ -38,9 +37,13 @@ class VWO
38
37
  (@settings_file['campaigns'] || []).each do |campaign|
39
38
  set_variation_allocation(campaign)
40
39
  end
41
- @logger.log(
40
+ Utils::Logger.log(
42
41
  LogLevelEnum::DEBUG,
43
- format(LogMessageEnum::DebugMessages::SETTINGS_FILE_PROCESSED, file: FileNameEnum::SettingsFileProcessor)
42
+ 'SETTINGS_FILE_PROCESSED',
43
+ {
44
+ '{file}' => FileNameEnum::SETTINGS_FILE_PROCESSOR,
45
+ '{accountId}' => @settings_file['accountId']
46
+ }
44
47
  )
45
48
  end
46
49
 
@@ -16,13 +16,14 @@ class VWO
16
16
  module Services
17
17
  class UsageStats
18
18
  attr_reader :usage_stats
19
+
19
20
  # Initialize the UsageStats
20
21
  def initialize(stats, is_development_mode = false)
21
22
  @usage_stats = {}
22
- unless is_development_mode
23
- @usage_stats = stats
24
- @usage_stats[:_l] = 1 if @usage_stats.length > 0
25
- end
23
+ return if is_development_mode
24
+
25
+ @usage_stats = stats
26
+ @usage_stats[:_l] = 1 if @usage_stats.length > 0
26
27
  end
27
28
  end
28
29
  end
@@ -12,9 +12,9 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require_relative '../logger'
16
15
  require_relative '../enums'
17
16
  require_relative '../constants'
17
+ require_relative './log_message'
18
18
 
19
19
  # Utility module for processing VWO campaigns
20
20
  class VWO
@@ -41,18 +41,17 @@ class VWO
41
41
  variation['start_variation_allocation'] = -1
42
42
  variation['end_variation_allocation'] = -1
43
43
  end
44
-
45
- VWO::Logger.get_instance.log(
46
- LogLevelEnum::INFO,
47
- format(
48
- LogMessageEnum::InfoMessages::VARIATION_RANGE_ALLOCATION,
49
- file: FileNameEnum::CampaignUtil,
50
- campaign_key: campaign['key'],
51
- variation_name: variation['name'],
52
- variation_weight: variation['weight'],
53
- start: variation['start_variation_allocation'],
54
- end: variation['end_variation_allocation']
55
- )
44
+ Logger.log(
45
+ LogLevelEnum::DEBUG,
46
+ 'VARIATION_RANGE_ALLOCATION',
47
+ {
48
+ '{file}' => FileNameEnum::CAMPAIGN_UTIL,
49
+ '{campaignKey}' => campaign['key'],
50
+ '{variationName}' => variation['name'],
51
+ '{variationWeight}' => variation['weight'],
52
+ '{start}' => variation['start_variation_allocation'],
53
+ '{end}' => variation['end_variation_allocation']
54
+ }
56
55
  )
57
56
  end
58
57
  end
@@ -178,21 +177,19 @@ class VWO
178
177
  campaigns = get_campaigns_from_campaign_keys(campaign_key, settings_file, goal_identifier, goal_type_to_track)
179
178
  elsif campaign_key.is_a?(String)
180
179
  campaign = get_campaign_for_campaign_key_and_goal(campaign_key, settings_file, goal_identifier, goal_type_to_track)
181
- if campaign
182
- campaigns = [campaign]
183
- end
180
+ campaigns = [campaign] if campaign
184
181
  end
185
- if campaigns.length() == 0
186
- VWO::Logger.get_instance.log(
182
+ if campaigns.length == 0
183
+ Utils::Logger.log(
187
184
  LogLevelEnum::ERROR,
188
- format(
189
- LogMessageEnum::ErrorMessages::NO_CAMPAIGN_FOUND,
190
- file: FileNameEnum::CampaignUtil,
191
- goal_identifier: goal_identifier
192
- )
185
+ 'CAMPAIGN_NOT_FOUND_FOR_GOAL',
186
+ {
187
+ '{file}' => FileNameEnum::CAMPAIGN_UTIL,
188
+ '{goalIdentifier}' => goal_identifier
189
+ }
193
190
  )
194
191
  end
195
- return campaigns
192
+ campaigns
196
193
  end
197
194
 
198
195
  # fetch all running campaigns (having goal identifier goal_type_to_track and goal type CUSTOM|REVENUE|ALL) from settings
@@ -205,38 +202,31 @@ class VWO
205
202
  campaigns = []
206
203
  if settings_file
207
204
  settings_file['campaigns'].each do |campaign|
208
- if campaign.key?(:status) && campaign[:status] != 'RUNNING'
209
- next
210
- end
205
+ next if campaign.key?(:status) && campaign[:status] != 'RUNNING'
206
+
211
207
  goal = get_campaign_goal(campaign, goal_identifier)
212
- if validate_goal(goal, goal_type_to_track)
213
- campaigns.push(campaign)
214
- end
208
+ campaigns.push(campaign) if validate_goal(goal, goal_type_to_track)
215
209
  end
216
210
  end
217
211
  campaigns
218
212
  end
219
213
 
220
214
  def validate_goal(goal, goal_type_to_track)
221
- result = goal && (
215
+ goal && (
222
216
  goal_type_to_track == 'ALL' ||
223
217
  (
224
- GOAL_TYPES.has_value?(goal['type']) &&
218
+ GOAL_TYPES.value?(goal['type']) &&
225
219
  (GOAL_TYPES.key? goal_type_to_track) &&
226
220
  goal['type'] == GOAL_TYPES[goal_type_to_track]
227
221
  )
228
222
  )
229
- return result
230
223
  end
231
224
 
232
225
  def get_campaigns_from_campaign_keys(campaign_keys, settings_file, goal_identifier, goal_type_to_track = 'ALL')
233
226
  campaigns = []
234
227
  campaign_keys.each do |campaign_key|
235
-
236
228
  campaign = get_campaign_for_campaign_key_and_goal(campaign_key, settings_file, goal_identifier, goal_type_to_track)
237
- if campaign
238
- campaigns.push(campaign)
239
- end
229
+ campaigns.push(campaign) if campaign
240
230
  end
241
231
  campaigns
242
232
  end
@@ -245,9 +235,7 @@ class VWO
245
235
  campaign = get_running_campaign(campaign_key, settings_file)
246
236
  if campaign
247
237
  goal = get_campaign_goal(campaign, goal_identifier)
248
- if validate_goal(goal, goal_type_to_track)
249
- return campaign
250
- end
238
+ return campaign if validate_goal(goal, goal_type_to_track)
251
239
  end
252
240
  nil
253
241
  end
@@ -255,18 +243,18 @@ class VWO
255
243
  def get_running_campaign(campaign_key, settings_file)
256
244
  campaign = get_campaign(settings_file, campaign_key)
257
245
  if campaign.nil? || (campaign['status'] != 'RUNNING')
258
- @logger.log(
259
- LogLevelEnum::ERROR,
260
- format(
261
- LogMessageEnum::ErrorMessages::CAMPAIGN_NOT_RUNNING,
262
- file: FILE,
263
- campaign_key: campaign_key,
264
- api_name: ApiMethods::TRACK
265
- )
246
+ Utils::Logger.log(
247
+ LogLevelEnum::WARNING,
248
+ 'CAMPAIGN_NOT_RUNNING',
249
+ {
250
+ '{file}' => FILE,
251
+ '{campaignKey}' => campaign_key,
252
+ '{api}' => ApiMethods::TRACK
253
+ }
266
254
  )
267
255
  nil
268
256
  end
269
- return campaign
257
+ campaign
270
258
  end
271
259
 
272
260
  # Checks whether a campaign is part of a group.
@@ -274,10 +262,9 @@ class VWO
274
262
  # @param[Hash] :settings_file Settings file for the project
275
263
  # @param[Integer] :campaign_id Id of campaign which is to be checked
276
264
  # @return[Boolean]
277
- def is_part_of_group(settings_file, campaign_id)
278
- if settings_file["campaignGroups"] && (settings_file["campaignGroups"].has_key?(campaign_id.to_s))
279
- return true
280
- end
265
+ def part_of_group?(settings_file, campaign_id)
266
+ return true if settings_file['campaignGroups']&.key?(campaign_id.to_s)
267
+
281
268
  false
282
269
  end
283
270
 
@@ -289,24 +276,34 @@ class VWO
289
276
  def get_group_campaigns(settings_file, group_id)
290
277
  group_campaign_ids = []
291
278
  group_campaigns = []
292
- groups = settings_file["groups"]
279
+ groups = settings_file['groups']
293
280
 
294
- if groups && groups.has_key?(group_id.to_s)
295
- group_campaign_ids = groups[group_id.to_s]["campaigns"]
296
- end
281
+ group_campaign_ids = groups[group_id.to_s]['campaigns'] if groups&.key?(group_id.to_s)
297
282
 
298
- if group_campaign_ids
299
- group_campaign_ids.each do |campaign_id|
300
- settings_file["campaigns"].each do |campaign|
301
- if campaign["id"] == campaign_id && campaign["status"] == STATUS_RUNNING
302
- group_campaigns.push(campaign)
303
- end
304
- end
283
+ group_campaign_ids&.each do |campaign_id|
284
+ settings_file['campaigns'].each do |campaign|
285
+ group_campaigns.push(campaign) if campaign['id'] == campaign_id && campaign['status'] == STATUS_RUNNING
305
286
  end
306
287
  end
307
288
  group_campaigns
308
289
  end
309
290
 
291
+ def campaign_goal_already_tracked?(user_id, campaign, identifiers, goal_identifier)
292
+ if identifiers.include? goal_identifier
293
+ @logger.log(
294
+ LogLevelEnum::INFO,
295
+ 'CAMPAIGN_GOAL_ALREADY_TRACKED',
296
+ {
297
+ '{file}' => FILE,
298
+ '{userId}' => user_id,
299
+ '{campaignKey}' => campaign['key'],
300
+ '{goalIdentifier}' => goal_identifier
301
+ }
302
+ )
303
+ return true
304
+ end
305
+ false
306
+ end
310
307
  end
311
308
  end
312
309
  end
@@ -13,11 +13,11 @@
13
13
  # limitations under the License.
14
14
 
15
15
  require 'json'
16
- require_relative '../logger'
17
16
  require_relative '../enums'
18
17
  require_relative '../constants'
19
18
  require_relative './impression'
20
19
  require_relative './utility'
20
+ require_relative './log_message'
21
21
 
22
22
  # Utility module for helper math and random functions
23
23
  class VWO
@@ -36,13 +36,13 @@ class VWO
36
36
  params = get_common_properties(user_id, settings_file)
37
37
  params.merge!('url' => url, 'tags' => JSON.generate(tag), 'env' => sdk_key)
38
38
 
39
- VWO::Logger.get_instance.log(
39
+ Logger.log(
40
40
  LogLevelEnum::DEBUG,
41
- format(
42
- LogMessageEnum::DebugMessages::PARAMS_FOR_PUSH_CALL,
43
- file: FileNameEnum::CustomDimensionsUtil,
44
- properties: remove_sensitive_properties(params)
45
- )
41
+ 'IMPRESSION_FOR_PUSH',
42
+ {
43
+ '{file}' => FileNameEnum::CUSTOM_DIMENSTIONS_UTIL,
44
+ '{properties}' => JSON.generate(params)
45
+ }
46
46
  )
47
47
  params
48
48
  end
@@ -55,17 +55,17 @@ class VWO
55
55
  params = {
56
56
  'eT' => 3,
57
57
  't' => JSON.generate(tag),
58
- 'u' => generator_for(user_id, account_id),
58
+ 'u' => generator_for(user_id, account_id, true),
59
59
  'sId' => get_current_unix_timestamp
60
60
  }
61
61
 
62
- VWO::Logger.get_instance.log(
62
+ Logger.log(
63
63
  LogLevelEnum::DEBUG,
64
- format(
65
- LogMessageEnum::DebugMessages::PARAMS_FOR_PUSH_CALL,
66
- file: FileNameEnum::CustomDimensionsUtil,
67
- properties: JSON.generate(params)
68
- )
64
+ 'IMPRESSION_FOR_PUSH',
65
+ {
66
+ '{file}' => FileNameEnum::CUSTOM_DIMENSTIONS_UTIL,
67
+ '{properties}' => JSON.generate(params)
68
+ }
69
69
  )
70
70
  params
71
71
  end
@@ -12,29 +12,22 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
-
16
15
  require_relative '../constants'
17
16
 
18
17
  # Utility module for generating uuid
19
18
  class VWO
20
19
  module Utils
21
20
  class DataLocationManager
22
-
23
21
  @@instance = nil
24
22
 
25
23
  def self.get_instance
26
- if @@instance.nil?
27
- @@instance = self.new
28
- end
24
+ @@instance = new if @@instance.nil?
29
25
  @@instance
30
26
  end
31
27
 
32
-
33
28
  def get_data_location
34
29
  url = VWO::CONSTANTS::ENDPOINTS::BASE_URL
35
- if @settings.key?("collectionPrefix")
36
- url = url + '/' + @settings["collectionPrefix"]
37
- end
30
+ url = "#{url}/#{@settings['collectionPrefix']}" if @settings.key?('collectionPrefix')
38
31
  url
39
32
  end
40
33
 
@@ -12,9 +12,9 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- require_relative '../logger'
16
15
  require_relative '../enums'
17
16
  require_relative '../constants'
17
+ require_relative './log_message'
18
18
 
19
19
  # Utility module for helper math and random functions
20
20
  class VWO
@@ -40,16 +40,13 @@ class VWO
40
40
  return !value || value == 0 ? false : true if variable_type == VariableTypes.BOOLEAN
41
41
 
42
42
  return value if variable_type == VariableTypes::JSON
43
- rescue StandardError => _e
44
- VWO::Logger.get_instance.log(
43
+ rescue StandardError => e
44
+ Logger.log(
45
45
  LogLevelEnum::ERROR,
46
- format(
47
- LogMessageEnum::ErrorMessages::UNABLE_TO_TYPE_CAST,
48
- file: FileNameEnum::FeatureUtil,
49
- value: value,
50
- variable_type: variable_type,
51
- of_type: value.class.name
52
- )
46
+ "unable to type cast variable value: #{e.message}",
47
+ {
48
+ '{file}' => FILE
49
+ }
53
50
  )
54
51
  nil
55
52
  end