File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
api-spec-testing/test_file Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -296,7 +296,6 @@ def variables_to_transform_and_set
296
296
def transform_and_set_variable ( action )
297
297
variables_to_transform_and_set . each do |set_definition |
298
298
set_definition [ 'transform_and_set' ] . each do |response_key , transform_description |
299
-
300
299
match_base_64_transform = /(\# base64EncodeCredentials\( )(\S *)\) /
301
300
matches = match_base_64_transform . match ( transform_description )
302
301
fields = matches [ 2 ] . split ( ',' ) if matches . length > 0
Original file line number Diff line number Diff line change @@ -58,8 +58,15 @@ def find_value_in_document(chain, document)
58
58
#
59
59
# @since 6.2.0
60
60
def split_and_parse_key ( key )
61
- key . split ( /(?<!\\ )\. / ) . map do |key |
62
- ( key =~ /\A [-+]?[0-9]+\z / ) ? key . to_i : key . gsub ( '\\' , '' )
61
+ key . split ( /(?<!\\ )\. / ) . reject { |k | k . empty? } . map do |key_part |
62
+ case key_part
63
+ when /^\. \$ / # For keys in the form of .$key
64
+ key_part . gsub ( /^\. / , '' )
65
+ when /\A [-+]?[0-9]+\z /
66
+ key_part . to_i
67
+ else
68
+ key_part . gsub ( '\\' , '' )
69
+ end
63
70
end . reject { |k | k == '$body' }
64
71
end
65
72
end
You can’t perform that action at this time.
0 commit comments