elasticsearch-test-runner 0.19.0 → 0.20.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/CHANGELOG.md +4 -0
- data/lib/elasticsearch/tests/code_runner.rb +13 -4
- data/lib/elasticsearch/tests/version.rb +1 -1
- 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: 6f353417226574d9f9f31aad08493921ff64ddc0442eb3b1c78ca810dd6d5f05
|
|
4
|
+
data.tar.gz: 8c665f93673ae59cefc2c621b37dd270acda75f1ce15e0ddacdf7b3ba8fdd0fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 51a23ebbdd4550e88083a38d9ae953a87cbc6555175f72e3cfb8798531e980772d6ff19d6aa075e52336355779e041dddfc87b713ddb8941816022e6d0a32340
|
|
7
|
+
data.tar.gz: a5dd823bd406475e67ddf632051d1102f981ad6b9813134d452c6eb3df8da1fec71fb0752d5ab9f24801754b00b1f57a7345fbbc7bc1c6ce1c0d2dedfca786a0
|
data/CHANGELOG.md
CHANGED
|
@@ -109,7 +109,16 @@ module Elasticsearch
|
|
|
109
109
|
#
|
|
110
110
|
def do_match(action)
|
|
111
111
|
k, v = action['match'].first
|
|
112
|
-
|
|
112
|
+
|
|
113
|
+
v = if v.is_a?(String) && v.include?('$')
|
|
114
|
+
instance_variable_get(v.gsub('$', '@'))
|
|
115
|
+
elsif v.is_a?(Array)
|
|
116
|
+
v.map do |a|
|
|
117
|
+
a.is_a?(String) && a.start_with?('$') ? instance_variable_get(a.gsub('$', '@')) : a
|
|
118
|
+
end
|
|
119
|
+
else
|
|
120
|
+
v
|
|
121
|
+
end
|
|
113
122
|
result = search_in_response(k)
|
|
114
123
|
|
|
115
124
|
if !result.nil? && (
|
|
@@ -236,9 +245,9 @@ module Elasticsearch
|
|
|
236
245
|
return unless param.is_a?(String) && param.include?('$')
|
|
237
246
|
|
|
238
247
|
# Param can be a single '$value' string or '{ something: $value }'
|
|
239
|
-
|
|
240
|
-
value = instance_variable_get(
|
|
241
|
-
content = param.gsub(
|
|
248
|
+
replaceable = param.match(/(\$[0-9a-z_-]+)/)[0]
|
|
249
|
+
value = instance_variable_get(replaceable.gsub('$', '@'))
|
|
250
|
+
content = param.gsub(replaceable, value)
|
|
242
251
|
params[key] = content
|
|
243
252
|
end
|
|
244
253
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elasticsearch-test-runner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Elastic Client Library Maintainers
|
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
139
|
requirements: []
|
|
140
|
-
rubygems_version: 4.0.
|
|
140
|
+
rubygems_version: 4.0.10
|
|
141
141
|
specification_version: 4
|
|
142
142
|
summary: Tool to test Elasticsearch clients against the YAML clients test suite.
|
|
143
143
|
test_files: []
|