rbbt-util 5.26.83 → 5.26.84

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: f6ab0538fa770f31569dcc29a7c10f69c2baa671faa5d544bc29d67e44188acb
4
- data.tar.gz: fe65f02a82226b98bff48fc39c862d892d8ffaf1fa68a7b101d7bf5befb67db3
3
+ metadata.gz: a7a03e9e9cec9f84ea91902fe393037932b4bc155abc38ef4145573dea832171
4
+ data.tar.gz: dc7030fb86e929d468bd8481eea26a8fd55e679c99cc8709507b9cff3a1044b8
5
5
  SHA512:
6
- metadata.gz: 756e42e468afcf1d93d4a9616ab2f5ab4eeb1ad6511d91aeb1b447f79ef2f00a076601eb02eec17bddd20576f9824ae34a5db5d913043e17a97758f4bbca84f6
7
- data.tar.gz: cbd3625ce98062162ef323a10a3e991e60947e883171a1c63af25368af2ee076d622ade4321172a59503744acf47db055ec48003a9fa7ed54d12376f5609eca2
6
+ metadata.gz: c67e91543978c2b151b1bfc77083de1decd53e2912da81beaac2925190db85531255fcca48056f6c7a2b02ee91a03017b74390531ae44bec6777bfea1b23c100
7
+ data.tar.gz: 285ba9a06af9cec0377b828a24949250ee5cc62825a0ad59fd207fdd7f44acc1e3469a495773e2818198eb414dc8090283117021276b5b2525c7f5e3f2e6d783
@@ -130,6 +130,8 @@ module Entity
130
130
  end
131
131
 
132
132
  def self.property(name, &block)
133
+ Log.debug "Defining property #{name} for #{self}"
134
+
133
135
  case
134
136
  when (Hash === name and name.size == 1)
135
137
  name, type = name.collect.first
@@ -24,14 +24,13 @@ class Step
24
24
  seen = Set.new
25
25
  while deps.any?
26
26
  path = deps.shift
27
- dep = Step.new path
27
+ dep = Workflow.load_step path
28
28
  seen << dep.path
29
- dep.info[:dependencies].each do |task, name, path|
30
- dep = Step.new path
29
+ dep.dependencies.each do |dep|
31
30
  next if seen.include? dep.path
32
31
  deps << dep.path
33
32
  rec_dependencies << dep.path
34
- end if dep.info[:dependencies]
33
+ end if dep.dependencies
35
34
  end
36
35
 
37
36
  rec_dependencies.each do |path|
@@ -72,7 +71,7 @@ class Step
72
71
  while deps.any?
73
72
  path = deps.shift
74
73
 
75
- dep = Step.new path
74
+ dep = Workflow.load_step path
76
75
  seen << dep.path
77
76
 
78
77
  dep.relocated = !!relocate
@@ -86,9 +85,7 @@ class Step
86
85
  end if dep.info[:dependencies]
87
86
  end
88
87
 
89
- rec_dependencies.each do |path|
90
- next unless File.exists?(path)
91
- dep = Step.new path
88
+ rec_dependencies.each do |dep|
92
89
  job_files << dep.path
93
90
  job_files << dep.files_dir if Dir.glob(dep.files_dir + '/*').any?
94
91
  job_files << dep.info_file if File.exists?(dep.info_file)
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rbbt-util'
4
+ require 'rbbt/resource'
5
+ require 'rbbt/workflow'
6
+
7
+ options = SOPT.get <<EOF
8
+ -W--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
9
+ -r--requires* Files to require; 'all' for all in Rbbt.etc.requires:
10
+ -O--output* Where to save the file. Defaults to its proper location:
11
+ -s--server* Server to use:
12
+ -w--where* What path location to use
13
+ -h--help Help
14
+ EOF
15
+
16
+ if options[:help]
17
+ puts SOPT.doc
18
+ exit
19
+ end
20
+
21
+ case options[:workflows]
22
+ when nil, false, "false", "none"
23
+ when "all"
24
+ Rbbt.etc.workflows.list.each do |workflow|
25
+ Workflow.require_workflow file
26
+ end if Rbbt.etc.workflows.exists?
27
+ else
28
+ options[:workflows].split(/[ ,;|]/).each do |workflow|
29
+ Workflow.require_workflow workflow
30
+ end
31
+ end
32
+
33
+ case options[:requires]
34
+ when nil, false, "false", "none"
35
+ when "all"
36
+ Rbbt.etc.requires.list.each do |file|
37
+ require file
38
+ end if Rbbt.etc.requires.exists?
39
+ else
40
+ options[:requires].split(/[ ,;|]/).each do |file|
41
+ require file
42
+ end
43
+ end
44
+
45
+ resource, path = ARGV
46
+
47
+ resource = Kernel.const_get(resource)
48
+
49
+ Misc.consume_stream resource[path].find(options[:where]).open, false, STDOUT
@@ -38,8 +38,6 @@ $app = app = eval "class #{app_name} < Sinatra::Base; self end"
38
38
  Rbbt.search_paths = Path::SEARCH_PATHS.merge(:workflow => File.join(wf.libdir, '{TOPLEVEL}','{SUBPATH}'))
39
39
 
40
40
  etc_dir = Rbbt.etc
41
- #etc_dir.search_paths = Path::SEARCH_PATHS.merge(:workflow => File.join(wf.libdir, '{TOPLEVEL}','{SUBPATH}'))
42
-
43
41
 
44
42
  #{{{ PRE
45
43
  load_file etc_dir['app.d/pre.rb'].find
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.26.83
4
+ version: 5.26.84
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-14 00:00:00.000000000 Z
11
+ date: 2019-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -372,6 +372,7 @@ files:
372
372
  - share/rbbt_commands/resource/find
373
373
  - share/rbbt_commands/resource/get
374
374
  - share/rbbt_commands/resource/produce
375
+ - share/rbbt_commands/resource/read
375
376
  - share/rbbt_commands/rsync
376
377
  - share/rbbt_commands/stat/abs
377
378
  - share/rbbt_commands/stat/boxplot