cpee-instantiation 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cpee-instantiation.gemspec +1 -1
- data/lib/cpee-instantiation/instantiation.rb +11 -11
- data/lib/cpee-instantiation/instantiation.xml +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: e836e978f135897ec280bfd67a6a0f84c915d4df2d4a36f619faa6956be5835f
|
4
|
+
data.tar.gz: 224d5d7ae75c3bbce7d3292b12e2f1ad8970d3150695b5891c647b567017a5d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2abaa7f262242504de44349c7112d6295a834811473035e046c00380ce7b338abd91973e6d3f774c7a5128958fe1ab4bf96ebcaf9ad812152806d690508f696e
|
7
|
+
data.tar.gz: 54ed9445a640706d6d587e86ed2b135839ece3e088454e56c0ffedf0a97b5670d5fc9518fca4f52396d88ac27f3b4563409aa70afe611746aaa9b5d5ada073ea
|
data/cpee-instantiation.gemspec
CHANGED
@@ -30,7 +30,7 @@ module CPEE
|
|
30
30
|
SERVER = File.expand_path(File.join(__dir__,'instantiation.xml'))
|
31
31
|
|
32
32
|
module Helpers #{{{
|
33
|
-
def load_testset(tdoc,cpee,name=nil,
|
33
|
+
def load_testset(tdoc,cpee,name=nil,customization=nil) #{{{
|
34
34
|
ins = -1
|
35
35
|
uuid = nil
|
36
36
|
XML::Smart.string(tdoc) do |doc|
|
@@ -44,13 +44,13 @@ module CPEE
|
|
44
44
|
e.text = name
|
45
45
|
end
|
46
46
|
end
|
47
|
-
if
|
48
|
-
JSON.parse(
|
47
|
+
if customization && !customization.empty?
|
48
|
+
JSON.parse(customization).each do |e|
|
49
49
|
begin
|
50
|
-
|
51
|
-
if
|
52
|
-
XML::Smart::string(
|
53
|
-
doc.find("//desc:call[@id=\"#{e['id']}\"]/desc:parameters/desc:
|
50
|
+
customization = Typhoeus.get e['url']
|
51
|
+
if customization.success?
|
52
|
+
XML::Smart::string(customization.response_body) do |str|
|
53
|
+
doc.find("//desc:call[@id=\"#{e['id']}\"]/desc:parameters/desc:customization").each do |ele|
|
54
54
|
ele.replace_by str.root
|
55
55
|
end
|
56
56
|
end
|
@@ -167,8 +167,8 @@ module CPEE
|
|
167
167
|
else
|
168
168
|
(@status = 500) && return
|
169
169
|
end
|
170
|
-
|
171
|
-
if (instance, uuid = load_testset(tdoc,cpee,nil,
|
170
|
+
customization = @p.find{ |e| e.name == 'customization' }&.value
|
171
|
+
if (instance, uuid = load_testset(tdoc,cpee,nil,customization)).first == -1
|
172
172
|
@status = 500
|
173
173
|
else
|
174
174
|
EM.defer do
|
@@ -210,8 +210,8 @@ module CPEE
|
|
210
210
|
else
|
211
211
|
(@status = 500) && return
|
212
212
|
end
|
213
|
-
|
214
|
-
if (instance, uuid = load_testset(tdoc,cpee,name,
|
213
|
+
customization = @p.find{ |e| e.name == 'customization' }&.value
|
214
|
+
if (instance, uuid = load_testset(tdoc,cpee,name,customization)).first == -1
|
215
215
|
@status = 500
|
216
216
|
else
|
217
217
|
EM.defer do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cpee-instantiation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
8
8
|
autorequire:
|
9
9
|
bindir: tools
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riddl
|