rbbt-util 5.30.12 → 5.30.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbbt/util/misc/inspect.rb +17 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d407fc5c2e576419062f2f72e52a4c67d8c740447b54eb7838ecaf769ee1c33
4
- data.tar.gz: a9f11e1db995f7ea7179964316b6c7347e01fcd7323b6237e8762320455ca8ce
3
+ metadata.gz: 1f5bed0870bd27e4ef4d95a01ad49c4e6fb9e64a6e89eeb82e613e4523b4956f
4
+ data.tar.gz: efa0cdc96054711ad3069c3ead053b68dba25198cab1a76163d3b21b5ddf93fb
5
5
  SHA512:
6
- metadata.gz: 46718e67f59ab2b9ae5e3fd1d6fb0e7deffe5b1f5daf95669d7cc11022c846e829640cee45033aaced7409c291eacc29bd04253ff5f978e98e4860d777046188
7
- data.tar.gz: b214c317054c28c81d742a0eb5af3c3a1bddcc3fb48223ba7d2ea7f3ab95e155e642d4100d5353bc04cbfc77bfcdd215df57c37be0a3fc0de0fb6757e5c3a269
6
+ metadata.gz: 6e1039b390a000f83c29a419294e87d960f6de97e3a6bd341f3772fec279ec0619bbdaf43ced206d83125c02d8e3617e83a365c089b2e4a7463f85c26f12bde2
7
+ data.tar.gz: 45f167302faebbfed96b6babe0f5f5941d2722ecd6557b38dc82a997ab75b300ba11abf393def4414b9388fc101b778072119e49a719243d2fc9fd110c69c5b6
@@ -271,6 +271,22 @@ module Misc
271
271
  end
272
272
 
273
273
 
274
+ def self.step_file?(path)
275
+ return true if defined?(Step) && Step === path.resource
276
+ return false unless path.include?('.files/')
277
+ parts = path.split("/")
278
+ job = parts.select{|p| p =~ /\.files$/}.first
279
+ if job
280
+ i = parts.index job
281
+ begin
282
+ workflow, task = parts.values_at i - 2, i - 1
283
+ return Kernel.const_get(workflow).tasks.include? task.to_sym
284
+ rescue
285
+ end
286
+ end
287
+ false
288
+ end
289
+
274
290
  def self.obj2str(obj)
275
291
  _obj = obj
276
292
  obj = Annotated.purge(obj) if Annotated === obj
@@ -289,7 +305,7 @@ module Misc
289
305
  when (defined?(Path) and Path)
290
306
  if defined?(Step) && Open.exists?(Step.info_file(obj))
291
307
  obj2str(Workflow.load_step(obj))
292
- elsif defined?(Step) && Step === obj.resource
308
+ elsif step_file?(obj)
293
309
  "Step file: " + obj
294
310
  else
295
311
  if obj.exists?
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.30.12
4
+ version: 5.30.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-18 00:00:00.000000000 Z
11
+ date: 2021-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake