weel 1.99.126 → 1.99.128

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/weel.rb +48 -2
  3. data/weel.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60a41686ed63dd69b44c606cc695cfe066d47b7abc183cdd21404307b985895e
4
- data.tar.gz: dbe0042ffcb494fbba0ec4a56b0a1c4e6943e97c99a954edea19d16be69a0589
3
+ metadata.gz: db2306d1398c142ad06651d1a9db48e0c9a4943133f9bd6571b5bc2471a0c2a2
4
+ data.tar.gz: c181a1d7ef50b406e97dbefff98d3cd326323c3aaf77e87605ab2c6eeae3397d
5
5
  SHA512:
6
- metadata.gz: 5147adca88e3b08f54d972d39a625b1e12f360be7475799324f84029492d8c1b4912e43a700ad142fe4e349f86507642cd55ed8e22aedb5e74733eb01a1b6678
7
- data.tar.gz: 543e59f9b75781ac2d87930584fb84032a991e5157dd18a549946ac9c222046ba44c74bae8f76b21138bef46c4a795694cdb3617a47cbe69ce2d0cbf671df7eb
6
+ metadata.gz: 92d0c335a5e58548963d9e5fa22ef985534670bc26f077636065f558ffb159210b38e27b6262f2ba0dffe45c8f593d8e905315ca6cafd09c72d9c38cdcbea267
7
+ data.tar.gz: d65d56e15a65ccbb609e5a205743a59dbede363d4b3772432a5ee04a1ecc39e2f4402dce911f1a0922aa3b166a5e037b88f1f2ec1fc982386d20be15f9c2c0b7
data/lib/weel.rb CHANGED
@@ -290,6 +290,42 @@ class WEEL
290
290
  end
291
291
  end
292
292
  end # }}}
293
+ class ReadOnlyHash # {{{
294
+ def initialize(values)
295
+ @__weel_values = values.transform_values do |v|
296
+ if Object.const_defined?(:XML) && XML.const_defined?(:Smart) && v.is_a?(XML::Smart::Dom)
297
+ v.root.to_doc
298
+ else
299
+ begin
300
+ Marshal.load(Marshal.dump(v))
301
+ rescue
302
+ v.to_s rescue nil
303
+ end
304
+ end
305
+ end
306
+ end
307
+
308
+ def to_json(*args)
309
+ @__weel_values.to_json(*args)
310
+ end
311
+
312
+ def method_missing(name,*args)
313
+ if args.empty? && @__weel_values.key?(name)
314
+ @__weel_values[name]
315
+ elsif args.empty? && @__weel_values.key?(name.to_s)
316
+ @__weel_values[name.to_s]
317
+ elsif name.to_s[-1..-1] == "=" && args.length == 1
318
+ temp = name.to_s[0..-2]
319
+ @__weel_values[temp.to_sym] = args[0]
320
+ elsif name.to_s == "[]=" && args.length == 2
321
+ @__weel_values[args[0]] = args[1]
322
+ elsif name.to_s == "[]" && args.length == 1
323
+ @__weel_values[args[0]]
324
+ else
325
+ nil
326
+ end
327
+ end
328
+ end # }}}
293
329
 
294
330
  class ProcString #{{{
295
331
  attr_reader :code
@@ -718,6 +754,16 @@ class WEEL
718
754
  self.__weel_state = :stopping
719
755
  end #}}}
720
756
 
757
+ def status # {{{
758
+ @__weel_status
759
+ end # }}}
760
+ def data # {{{
761
+ ReadOnlyHash.new(@__weel_data)
762
+ end # }}}
763
+ def endpoints # {{{
764
+ ReadHash.new(@__weel_endpoints)
765
+ end # }}}
766
+
721
767
  private
722
768
  def __weel_protect_yield(*local) #{{{
723
769
  begin
@@ -829,7 +875,7 @@ class WEEL
829
875
  @__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :after => [wp]
830
876
  end
831
877
  when :call
832
- again = catch Signal::Again do
878
+ again = catch Signal::Again do # Will be nil if we do not throw (using default connectionwrapper)
833
879
  connectionwrapper.mem_guard
834
880
  params = connectionwrapper.prepare(@__weel_lock,@__weel_data,@__weel_endpoints,@__weel_status,Thread.current[:local],connectionwrapper.additional,prepare,endpoint,parameters)
835
881
 
@@ -894,7 +940,7 @@ class WEEL
894
940
  wp.detail = :after
895
941
  @__weel_connectionwrapper::inform_position_change @__weel_connectionwrapper_args, :after => [wp]
896
942
  end
897
- end # there is a catch
943
+ end while again == Signal::Again # there is a catch
898
944
  end
899
945
  raise Signal::Proceed
900
946
  rescue Signal::SkipManipulate, Signal::Proceed
data/weel.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "weel"
3
- s.version = "1.99.126"
3
+ s.version = "1.99.128"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "Workflow Execution Engine Library (WEEL)"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.99.126
4
+ version: 1.99.128
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-19 00:00:00.000000000 Z
12
+ date: 2024-09-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: test-unit