rbbt-util 5.21.62 → 5.21.63

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 54b3148a09833544d1369d94aadeab1ff688f37b
4
- data.tar.gz: a5d4a58b69dac7ec247ba3afba3404a56d426343
3
+ metadata.gz: 76aff389f9561c517f767abaad31b215a64f92c9
4
+ data.tar.gz: 0bc8874af9f26bdb23c41eba27d8f231b392ba36
5
5
  SHA512:
6
- metadata.gz: f0c6e5fc9e90070866cd405f5dba447efe585a234770e70774a41156cb3f001132e2a87eeca43211d42bcbf717650b1145506a73df1ff0c23259f322c8f55b26
7
- data.tar.gz: d71ed9a23bdba6b91257377d131971afe2693615779bed96ee10afe9b561598fbaeb2346f3680c1691c4b7b97dfb0de67c739ef624c1d5f0116c5498ed83c763
6
+ metadata.gz: d242cb76748eba8a28b28b2a8caf6c98220398d35fc594acbeca228e2e9cd7ae91a77922dc15b1fd93491942d8e4eecf8947b1ec190dead5ae080131e6b9a7c8
7
+ data.tar.gz: 38dc7e05ebe757071aaf6e6e5faa4991a03bf6474fb15f39ccddd60da8c646d47f5288208f3898480aaa0f172fb735c144d26c7cb038e40b92aba2433eca81d3
@@ -318,7 +318,7 @@ module TSV
318
318
  raise $!
319
319
  rescue Exception
320
320
  Log.low{"Exception traversing #{stream_name(obj)}"}
321
- abort_stream obj
321
+ abort_stream obj unless String === obj
322
322
  abort_stream options[:into], $!
323
323
  raise $!
324
324
  end
@@ -73,7 +73,7 @@ module TSV
73
73
  else
74
74
  stream = get_stream(file)
75
75
  stream.abort(exception) if stream.respond_to? :abort
76
- stream.extend AbortedStream
76
+ AbortedStream.setup(stream, exception)
77
77
  end
78
78
  end
79
79
 
@@ -391,10 +391,11 @@ module Misc
391
391
  content.abort if content.respond_to? :abort
392
392
  Open.rm path if File.exist? path
393
393
  rescue Exception
394
- Log.medium "Exception in sensiblewrite: [#{Process.pid}] #{$!.message} -- #{ Log.color :blue, path }"
394
+ exception = (AbortedStream === content and content.exception) ? content.exception : $!
395
+ Log.medium "Exception in sensiblewrite: [#{Process.pid}] #{exception.message} -- #{ Log.color :blue, path }"
395
396
  content.abort if content.respond_to? :abort
396
397
  Open.rm path if File.exist? path
397
- raise $!
398
+ raise exception
398
399
  rescue
399
400
  Log.exception $!
400
401
  raise $!
@@ -5,7 +5,7 @@ require 'rbbt/resource'
5
5
  require 'rbbt/workflow'
6
6
 
7
7
  options = SOPT.get <<EOF
8
- -w--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
8
+ -W--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
9
9
  -r--requires* Files to require; 'all' for all in Rbbt.etc.requires:
10
10
  -c--create Try to create file if claimed:
11
11
  -h--help Help
@@ -42,7 +42,16 @@ end
42
42
 
43
43
  resource, path = ARGV
44
44
 
45
- resource = Kernel.const_get(resource)
45
+ begin
46
+ resource = Kernel.const_get(resource)
47
+ rescue
48
+ begin
49
+ resource = Workflow.require_workflow resource
50
+ rescue
51
+ raise "Resource not found: #{ resource }"
52
+ end
53
+ end
54
+
46
55
 
47
56
  if options[:create]
48
57
  exists = resource[path].exists?
@@ -5,7 +5,7 @@ require 'rbbt/resource'
5
5
  require 'rbbt/workflow'
6
6
 
7
7
  options = SOPT.get <<EOF
8
- -w--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
8
+ -W--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
9
9
  -r--requires* Files to require; 'all' for all in Rbbt.etc.requires:
10
10
  -h--help Help
11
11
  EOF
@@ -41,7 +41,16 @@ end
41
41
 
42
42
  resource, path = ARGV
43
43
 
44
- resource = Kernel.const_get(resource)
44
+ begin
45
+ resource = Kernel.const_get(resource)
46
+ rescue
47
+ begin
48
+ resource = Workflow.require_workflow resource
49
+ rescue
50
+ raise "Resource not found: #{ resource }"
51
+ end
52
+ end
53
+
45
54
 
46
55
  puts resource[path].find
47
56
 
@@ -5,7 +5,7 @@ require 'rbbt/resource'
5
5
  require 'rbbt/workflow'
6
6
 
7
7
  options = SOPT.get <<EOF
8
- -w--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
8
+ -W--workflows* Workflows to use; 'all' for all in Rbbt.etc.workflows:
9
9
  -r--requires* Files to require; 'all' for all in Rbbt.etc.requires:
10
10
  -O--output* Where to save the file. Defaults to its proper location:
11
11
  -s--server* Server to use:
@@ -42,9 +42,17 @@ end
42
42
 
43
43
  resource, path = ARGV
44
44
 
45
- force = options[:force]
45
+ begin
46
+ resource = Kernel.const_get(resource)
47
+ rescue
48
+ begin
49
+ resource = Workflow.require_workflow resource
50
+ rescue
51
+ raise "Resource not found: #{ resource }"
52
+ end
53
+ end
46
54
 
47
- resource = Kernel.const_get(resource)
55
+ force = options[:force]
48
56
 
49
57
  puts resource[path].produce(force).find
50
58
 
@@ -78,9 +78,10 @@ Misc.in_dir(workflow_dir) do
78
78
  end
79
79
  Log.warn "Cloning #{ repo }"
80
80
  Misc.insist do
81
- `git clone "#{repo}"`
81
+ `git clone "#{repo}" #{ Misc.snake_case(workflow) }`
82
82
  raise unless $?.success?
83
83
  end
84
+ Log.warn "Initializing and updating submodules for #{repo}. You might be prompted for passwords."
84
85
  Misc.in_dir(Misc.snake_case(workflow)) do
85
86
  `git submodule init`
86
87
  `git submodule update`
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.21.62
4
+ version: 5.21.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake