weel 1.99.127 → 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 +46 -0
  3. data/weel.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f160d41131af38c3087b40f26a0ba6bd05525e1dd4fe7aadb41246bd8b0b3eb9
4
- data.tar.gz: ff7f466bddefecaa975670d6977abacc1fbf2bde393c1a5cfd4f3a4abe38af88
3
+ metadata.gz: db2306d1398c142ad06651d1a9db48e0c9a4943133f9bd6571b5bc2471a0c2a2
4
+ data.tar.gz: c181a1d7ef50b406e97dbefff98d3cd326323c3aaf77e87605ab2c6eeae3397d
5
5
  SHA512:
6
- metadata.gz: 96b9d6cdfc740ecea0210a57a72277c75d313c3a8318a4ca69e8a1d1500ce0ab213c276e90b97a696eb365647553b3cd7ca45cd6a45366c52f4f86a62e15b15a
7
- data.tar.gz: 1f430d38d063a362be2f286ccbfe2e3201b08049143c04fabbdc78289c4456b6a6b1d59f5a10ce2796e6531ca82f3ae570aa86163ae1e897361b44d6a73c7488
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
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.127"
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.127
4
+ version: 1.99.128
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler