cpee 2.1.17 → 2.1.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ea62a69f615adda56866c02d31f1ea478bd49f7eb8e96f8855ed4b81397257b
4
- data.tar.gz: 2f357f76cf73517f41d17c18dbbc594c05e16f99548599f1dd596119c01f2a91
3
+ metadata.gz: bfcea35b5af1c0944e0ef51f370febe9bb9596c7d43dff4d4aeaf679c70be29f
4
+ data.tar.gz: 53b9636942a7fa4a3408717151c53975d6ca34712337f00ecd65214a975f292d
5
5
  SHA512:
6
- metadata.gz: fe3a326563ddab5daaf80aa114751fa17251579e3f6e33d3aa52031696f48b0fd5271e46f2a44f905366f7a82de57b2946d1815799ef175860b58c8d68f4dc27
7
- data.tar.gz: 72ae028ddd526053ef10e40552ac84813502c3728e3c68bae9fc9d152f372796d4f57f313c9d025aec335d2784b1f124dc5f64cefab4fe54c079380dff150c71
6
+ metadata.gz: 372a9a4a84164a833e94e97c9371b081550511806bf977fb5b78acca93f62b4fbbad45e288d48a0a5dd5b6ec5228d01e2fe0bfb2f5f4f89ca0a4a034a4290580
7
+ data.tar.gz: 9dba028bc84297ae212cbc7bfd377d754eb38c78c2f53e8e542b0669567b23fb7456957d1adb40048fdfcb7f871b439421cd5bb3e1d04420514a77c501cadb33
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.17"
3
+ s.version = "2.1.19"
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."
@@ -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.17
4
+ version: 2.1.19
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