cpee-instantiation 1.0.10 → 1.0.13
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/cpee-instantiation.gemspec +1 -1
- data/lib/cpee-instantiation/instantiation.rb +16 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ff6b47e9462a3f92a2e6536974359fe3cc0b18b7583518d88f83998e2f79885
|
4
|
+
data.tar.gz: b881374ebad85ebe328cfe97534829979d3aec54ff8a0d976d89f79245a78d87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fd8d7ec4b66b06b94b53976886854548d27a1fc41faaf76b6fb994dbb1e58432c53be3a799eccbd23c9890723b8fab453e0375360a0f9dd981057097a672947
|
7
|
+
data.tar.gz: 3d3172e5b4a6a290a34ce06867539307bb0ba283c3a25a7770f17c0bba40a37f7bd05a02c29028f4c2b2cef50d52816391c42a08e750981e4c631e9c51c36b34
|
data/cpee-instantiation.gemspec
CHANGED
@@ -84,7 +84,6 @@ module CPEE
|
|
84
84
|
end
|
85
85
|
parts << Riddl::Parameter::Simple.new('url', s.attributes['url'])
|
86
86
|
s.find('sub:topic').each do |t|
|
87
|
-
p s.find('sub:event').map{ |e| e.text }
|
88
87
|
if (evs = t.find('sub:event').map{ |e| e.text }.join(',')).length > 0
|
89
88
|
parts << Riddl::Parameter::Simple.new('topic', t.attributes['id'])
|
90
89
|
parts << Riddl::Parameter::Simple.new('events', evs)
|
@@ -137,7 +136,7 @@ module CPEE
|
|
137
136
|
if data && !data.empty?
|
138
137
|
content = XML::Smart.string('<dataelements xmlns="http://cpee.org/ns/properties/2.0"/>')
|
139
138
|
JSON::parse(data).each do |k,v|
|
140
|
-
content.root.add(k,v)
|
139
|
+
content.root.add(k,CPEE::ValueHelper::generate(v))
|
141
140
|
end
|
142
141
|
srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
|
143
142
|
res = srv.resource("/#{instance}/properties/dataelements/")
|
@@ -293,19 +292,29 @@ module CPEE
|
|
293
292
|
cblist = @a[2]
|
294
293
|
instance = @p[1].value
|
295
294
|
|
296
|
-
srv = Riddl::Client.new(cpee
|
297
|
-
res = srv.resource("/#{instance}/properties/attributes/uuid")
|
295
|
+
srv = Riddl::Client.new(cpee)
|
296
|
+
res = srv.resource("/#{instance}/properties/attributes/uuid/")
|
298
297
|
status, response = res.get
|
299
298
|
|
300
299
|
if status >= 200 && status < 300
|
301
|
-
uuid =
|
300
|
+
uuid = response.first.value
|
302
301
|
handle_data cpee, instance, @p[2]&.value
|
303
302
|
handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist
|
304
303
|
handle_starting cpee, instance, @p[0].value
|
304
|
+
|
305
|
+
send = {
|
306
|
+
'CPEE-INSTANCE' => instance,
|
307
|
+
'CPEE-INSTANCE-URL' => File.join(cpee,instance),
|
308
|
+
'CPEE-INSTANCE-UUID' => uuid,
|
309
|
+
'CPEE-BEHAVIOR' => @p[0].value
|
310
|
+
}
|
311
|
+
|
305
312
|
if @p[0].value =~ /^wait/
|
306
313
|
@headers << Riddl::Header.new('CPEE-CALLBACK','true')
|
307
314
|
end
|
308
|
-
|
315
|
+
Riddl::Parameter::Complex.new('instance','application/json',JSON::generate(send))
|
316
|
+
else
|
317
|
+
@status = 500
|
309
318
|
end
|
310
319
|
end
|
311
320
|
end #}}}
|
@@ -375,7 +384,7 @@ module CPEE
|
|
375
384
|
run InstantiateGit, opts[:cpee], opts[:self], opts[:cblist] if post 'git'
|
376
385
|
end
|
377
386
|
on resource 'instance' do
|
378
|
-
run HandleInstance, opts[:cpee] if post 'instance'
|
387
|
+
run HandleInstance, opts[:cpee], opts[:self], opts[:cblist] if post 'instance'
|
379
388
|
end
|
380
389
|
on resource 'callback' do
|
381
390
|
on resource 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.13
|
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: 2022-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: riddl
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.2.22
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Subprocess instantiation service for the cloud process execution engine (cpee.org)
|