rbbt-util 5.34.3 → 5.34.4
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/lib/rbbt/resource.rb +4 -1
- data/lib/rbbt/util/misc/pipes.rb +1 -1
- data/lib/rbbt/util/python.rb +8 -1
- data/lib/rbbt/workflow/definition.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eda1db070a45b3361a0c5c6b02fd59e39b031ae4264771f015e4068a888d1f09
|
4
|
+
data.tar.gz: 0f9a4bfafce4180f1db402510f83a880e22f5a75d92bf7506781801ce61575a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7738b49efed37124e80b5aa72b367e9d92d32dc13d64fceef5c452e5b50687882d5bc03106aa906c7f425937ceac72694f8eb8959e2c9d3402164b8618c4c639
|
7
|
+
data.tar.gz: de617b931b585915e029f8f23124b6ce5cccc9091dec25e2fc3fdd8c4d2eaf4e23bfce798c73b753cb08f590933c316ceb7deffafd8e8aca854ea175d5744014
|
data/lib/rbbt/resource.rb
CHANGED
@@ -346,9 +346,12 @@ url='#{url}'
|
|
346
346
|
locations = (Path::STANDARD_SEARCH + resource.search_order + resource.search_paths.keys)
|
347
347
|
locations -= [:current, "current"]
|
348
348
|
locations << :current
|
349
|
+
search_paths = IndiferentHash.setup(resource.search_paths)
|
349
350
|
locations.uniq.each do |name|
|
350
|
-
pattern =
|
351
|
+
pattern = search_paths[name]
|
352
|
+
pattern = resource.search_paths[pattern] while Symbol === pattern
|
351
353
|
next if pattern.nil?
|
354
|
+
|
352
355
|
pattern = pattern.sub('{PWD}', Dir.pwd)
|
353
356
|
if String === pattern and pattern.include?('{')
|
354
357
|
regexp = "^" + pattern.gsub(/{([^}]+)}/,'(?<\1>[^/]+)') + "(?:/(?<REST>.*))?/?$"
|
data/lib/rbbt/util/misc/pipes.rb
CHANGED
@@ -420,7 +420,7 @@ module Misc
|
|
420
420
|
end
|
421
421
|
|
422
422
|
Open.touch path if Open.exists? path
|
423
|
-
content.join if content.respond_to?
|
423
|
+
content.join if content.respond_to?(:join) and not Path === content and not (content.respond_to?(:joined?) && content.joined?)
|
424
424
|
|
425
425
|
Open.notify_write(path)
|
426
426
|
rescue Aborted
|
data/lib/rbbt/util/python.rb
CHANGED
@@ -4,6 +4,11 @@ require 'pycall/import'
|
|
4
4
|
module RbbtPython
|
5
5
|
extend PyCall::Import
|
6
6
|
|
7
|
+
def self.script(text, options = {})
|
8
|
+
Log.debug "Running python script:\n#{text.dup}"
|
9
|
+
text = StringIO.new text unless IO === text
|
10
|
+
CMD.cmd_log(:python, options.merge(:in => text))
|
11
|
+
end
|
7
12
|
|
8
13
|
def self.add_path(path)
|
9
14
|
self.run 'sys' do
|
@@ -87,7 +92,9 @@ module RbbtPython
|
|
87
92
|
|
88
93
|
def self.run_log(mod = nil, imports = nil, severity = 0, severity_err = nil, &block)
|
89
94
|
if mod
|
90
|
-
if
|
95
|
+
if imports == "*" || imports == ["*"]
|
96
|
+
pyfrom mod
|
97
|
+
elsif Array === imports
|
91
98
|
pyfrom mod, :import => imports
|
92
99
|
elsif Hash === imports
|
93
100
|
pyimport mod, imports
|
@@ -22,8 +22,13 @@ module Workflow
|
|
22
22
|
:extension => nil)
|
23
23
|
|
24
24
|
|
25
|
-
def helper(name, &block)
|
26
|
-
|
25
|
+
def helper(name, *args, &block)
|
26
|
+
if block_given?
|
27
|
+
helpers[name] = block
|
28
|
+
else
|
29
|
+
raise RbbtException, "helper #{name} unkown in #{self} workflow" unless helpers[name]
|
30
|
+
helpers[name].call(*args)
|
31
|
+
end
|
27
32
|
end
|
28
33
|
|
29
34
|
def desc(description)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.34.
|
4
|
+
version: 5.34.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|