cpee 2.1.15 → 2.1.20

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdba71d5df8124590a3b932d83af91b87801663f3e21d8ebbafb9d4e2b339869
4
- data.tar.gz: 73e7507c88a39096b2d418178a03150165a0966cd94ce4d452565a21c0e31683
3
+ metadata.gz: 199518d8d1220f03618033f059c9cc3571c0d90b696956f39327f306e8923ac9
4
+ data.tar.gz: c65ff88e791be50e1a2dfba3eb6793742bcd5b9af3acd3381dc17afb294171aa
5
5
  SHA512:
6
- metadata.gz: '093136bfeee58f4ba9152b15c5a83220aa219734160a50b60739f30337e08e2b99d2b503addcec8cd72c832bf67430b4e177110007f5693a593c8a513d620fec'
7
- data.tar.gz: d50286266ac5d15a94f4c0f86cdd2d87b8730948e0f1a6bdfe0d0ca73af8104fdcf720620abf06b8819aaea005d6cf264954c0b063841f4dba22c29c977e2bd2
6
+ metadata.gz: e4543cd2508a74e4e69f92e397069c71a150c6c3239c69779afd59b2a97b2c1c038c1cec54cf391d182b66873d134031a9478a0d5eea8720aed1cde74e0c0aee
7
+ data.tar.gz: 5bd8e6bce342ec26032c67d7abe137208659b7b5a78c6342dccdc6e7ad1da7d38a15376bc7d4e2eca916943875f2be65075fba5754e405c85a90f856249b4031
@@ -1366,7 +1366,16 @@ function append_to_log(what,type,message) {//{{{
1366
1366
  message = message.replace(/:\"/g,': "');
1367
1367
  message = message.replace(/:\{/g,': {');
1368
1368
  message = message.replace(/:\[/g,': [');
1369
- $("#dat_log").prepend("<tr><td class='fixed'><a title=\"" + d.strftime("[%d/%b/%Y %H:%M:%S]") + "\">D</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'><a title=\"" + what + "\">T</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'>" + type + "</td><td class='fixed'>&#160;-&#160;</td><td class='long'>" + message + "</td></tr>");
1369
+ message = message.replace(/&/g, '&amp;');
1370
+ message = message.replace(/</g, '&lt;');
1371
+ message = message.replace(/>/g, '&gt;');
1372
+ message = message.replace(/"/g, '&quot;');
1373
+ message = message.replace(/'/g, '&apos;');
1374
+ if (type == 'description/change') {
1375
+ $("#dat_log").prepend("<tr><td class='fixed'><a title=\"" + d.strftime("[%d/%b/%Y %H:%M:%S]") + "\">D</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'><a title=\"" + what + "\">T</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'>" + type + "</td><td class='fixed'>&#160;-&#160;</td><td class='long'>... check in persistent log ...</td></tr>");
1376
+ } else {
1377
+ $("#dat_log").prepend("<tr><td class='fixed'><a title=\"" + d.strftime("[%d/%b/%Y %H:%M:%S]") + "\">D</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'><a title=\"" + what + "\">T</a></td><td class='fixed'>&#160;-&#160;</td><td class='fixed'>" + type + "</td><td class='fixed'>&#160;-&#160;</td><td class='long'>" + message + "</td></tr>");
1378
+ }
1370
1379
  var dle = $("#dat_log").children();
1371
1380
  if (dle.length > 100) {
1372
1381
  dle.slice(100).each((k,ele) => {
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.1.15"
3
+ s.version = "2.1.20"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -18,6 +18,8 @@ require 'json'
18
18
  require 'erb'
19
19
  require 'yaml'
20
20
 
21
+ Encoding.default_external = 'UTF-8'
22
+
21
23
  module CPEE
22
24
  module Properties
23
25
 
@@ -1,3 +1,4 @@
1
+ <%# coding: UTF-8 %>
1
2
  class Instance < WEEL
2
3
  connectionwrapper ConnectionWrapper
3
4
 
@@ -199,7 +199,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
199
199
  @controller.notify("status/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
200
200
  end
201
201
  unless changed_dataelements.nil? || changed_dataelements.empty?
202
- de = dataelements.slice(*changed_dataelements).transform_values { |v| detect_encoding(v) == 'UTF-8' ? v : convert_to_base64(v) }
202
+ de = dataelements.slice(*changed_dataelements).transform_values { |v| enc = detect_encoding(v); (enc == 'BINARY' ? convert_to_base64(v) : (enc == 'UTF-8' ? v : v.encode('UTF-8',enc))) }
203
203
  @controller.notify("dataelements/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => de)
204
204
  end
205
205
  unless changed_endpoints.nil? || changed_endpoints.empty?
@@ -244,7 +244,16 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
244
244
  end
245
245
 
246
246
  def detect_encoding(text)
247
- CharlockHolmes::EncodingDetector.detect(text)[:encoding] || 'ISO-8859-1'
247
+ if text.is_a? String
248
+ res = CharlockHolmes::EncodingDetector.detect(text)
249
+ if res.is_a?(Hash) && res[:type] == :text && res[:encoding].match(/(ISO|UTF-8)/)
250
+ res[:encoding]
251
+ else
252
+ 'BINARY'
253
+ end
254
+ else
255
+ 'UTF-8'
256
+ end
248
257
  end
249
258
 
250
259
  def convert_to_base64(text)
@@ -266,10 +275,11 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
266
275
  else
267
276
  r.value.read
268
277
  end
278
+ enc = detect_encoding(res)
269
279
  tmp = {
270
280
  'name' => r.name == '' ? 'result' : r.name,
271
281
  'mimetype' => r.mimetype,
272
- 'data' => (detect_encoding(res) == 'UTF-8' ? res : convert_to_base64(res))
282
+ 'data' => (enc == 'BINARY' ? convert_to_base64(res) : (enc == 'UTF-8' ? res : res.encode('UTF-8',enc)))
273
283
  }
274
284
  r.value.rewind
275
285
  tmp
data/tools/server/cpee CHANGED
@@ -4,7 +4,7 @@ require 'cpee/implementation'
4
4
 
5
5
  Riddl::Server.new(CPEE::SERVER, :host => 'localhost', :port => 8298) do |opts|
6
6
  opts[:instances] = File.join(__dir__,'instances')
7
- opts[:executionhandlers = File.join(__dir__,'executionhandlers')
7
+ opts[:executionhandlers] = File.join(__dir__,'executionhandlers')
8
8
  opts[:notifications_init] = File.join(__dir__,'resources','notifications')
9
9
  opts[:properties_init] = File.join(__dir__,'resources','properties.init')
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.15
4
+ version: 2.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: tools
12
12
  cert_chain: []
13
- date: 2021-08-02 00:00:00.000000000 Z
13
+ date: 2021-10-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -675,7 +675,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
675
675
  - !ruby/object:Gem::Version
676
676
  version: '0'
677
677
  requirements: []
678
- rubygems_version: 3.1.6
678
+ rubygems_version: 3.2.22
679
679
  signing_key:
680
680
  specification_version: 4
681
681
  summary: Preliminary release of cloud process execution engine (cpee.org). If you