rbbt-util 5.26.71 → 5.26.72

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: 73a5652d05c459dbb82d9a998414777233d36b2683dfef7425dc612b0dbea2cc
4
- data.tar.gz: f52aa959fd3bff75cfdb484412c504af9bd2bf59f2b5f0932475eadf2ad3e93d
3
+ metadata.gz: 48218a636227053649451600d1225572ad96f01ed39d67fbf42a1f8f8c7c7c77
4
+ data.tar.gz: 612183134de313b8a3dd986faf314d2593ce95c7a2c17d8146d5cdf6eb5b5ff9
5
5
  SHA512:
6
- metadata.gz: '09457885bdeed9bc48f567fa44e6ef8d1985c2537f370bb0200b6fc02354ee5ba435cbd5c49eb5d867178bb8d44b65f81438aa07e3a1ef9c57ee3d696b57edb0'
7
- data.tar.gz: 3fb1e8e47fe3b04641bbd526962a1e58be8e197f7ec309465f7ff6944e0d605d84cd03a039f62f148922916e37fbd6de04842025c45b6bab0aea5c20121ede4e
6
+ metadata.gz: de75682521e5fa1ada0d0f1e3fca19bd20ad6d877abe1a070c6244e7de6a22d7f2564d89308b9a27a7a0de7ab150f4aa58566f78a4bbe89c3fdcd695e262998c
7
+ data.tar.gz: 017f12231eaf26f807b00a5317f656b2694f70c9cf38cc4044648abdd313c2083124cd49120fb08550700d297d7807fb4a26defc69aa55c4143fd2c23fcc3c87
@@ -43,7 +43,6 @@ class WorkflowRESTClient
43
43
  end
44
44
  end
45
45
 
46
-
47
46
  stream_input = @can_stream ? task_info(task)[:input_options].select{|k,o| o[:stream] }.collect{|k,o| k }.first : nil
48
47
  RemoteStep.new(url, task, name, fixed_inputs, task_info[:result_type], task_info[:result_description], @exec_exports.include?(task), @stream_exports.include?(task), stream_input)
49
48
  end
@@ -84,7 +84,11 @@ class WorkflowRESTClient
84
84
  res = capture_exception do
85
85
  Misc.insist(2, 0.5) do
86
86
  Log.debug{ "RestClient clean: #{ url } - #{Misc.fingerprint params}" }
87
- res = RestClient.get(self.encode(url), :params => params)
87
+ res = begin
88
+ RestClient.get(self.encode(url), :params => params)
89
+ rescue RestClient::NotFound
90
+ return nil
91
+ end
88
92
  raise TryAgain if res.code == 202
89
93
  res
90
94
  end
@@ -69,7 +69,6 @@ class WorkflowRESTClient::RemoteStep
69
69
  err.rewind
70
70
  err.read
71
71
  end
72
- iii text
73
72
  ne = WorkflowRESTClient.parse_exception text
74
73
  case ne
75
74
  when String
@@ -82,23 +81,37 @@ class WorkflowRESTClient::RemoteStep
82
81
  end
83
82
  end
84
83
 
85
- Log.debug{ "RestClient execute: #{ url } - #{Misc.fingerprint task_params}" }
84
+ task_params.each do |k,v|
85
+ task_params[k] = v.read if IO === v
86
+ end
87
+
88
+ Log.debug{ "RestClient execute: #{ task_url } - #{Misc.fingerprint task_params}" }
86
89
  RestClient::Request.execute(:method => :post, :url => task_url, :payload => task_params, :block_response => bl)
87
90
  end
88
91
 
89
- reader = Zlib::GzipReader.new(sout)
90
- res_io = Misc.open_pipe do |sin|
91
- while c = reader.read(Misc::BLOCK_SIZE)
92
- sin.write c
92
+ # It seems like now response body are now decoded by Net::HTTP after 2.1
93
+ # https://github.com/rest-client/rest-client/blob/cf3e5a115bcdb8f3344aeac0e45b44d67fac1a42/history.md
94
+ decode = Gem.loaded_specs["rest-client"].version < Gem::Version.create('2.1')
95
+ if decode
96
+ reader = Zlib::GzipReader.new(sout)
97
+ res_io = Misc.open_pipe do |sin|
98
+ while c = reader.read(Misc::BLOCK_SIZE)
99
+ sin.write c
100
+ end
101
+ sin.close
102
+ @done = true
103
+ end
104
+ ConcurrentStream.setup(res_io, :threads => [post_thread]) do
105
+ @done = true
106
+ @streaming = false
107
+ end
108
+ else
109
+ ConcurrentStream.setup(sout, :threads => [post_thread]) do
110
+ @done = true
111
+ @streaming = false
93
112
  end
94
- sin.close
95
- @done = true
96
113
  end
97
114
 
98
- ConcurrentStream.setup(res_io, :threads => [post_thread]) do
99
- @done = true
100
- @streaming = false
101
- end
102
115
  end
103
116
  end
104
117
 
@@ -73,6 +73,7 @@ Misc.in_dir(app_dir) do
73
73
  options[:options].split(";").each do |pair|
74
74
  name, _sep, value = pair.partition("=")
75
75
  name = name[1..-1].to_sym if name[0] == ':'
76
+ value = value.to_i if value =~ /^\d+$/
76
77
  options[name] = value
77
78
  end
78
79
  end
@@ -28,3 +28,5 @@ bar = Log::ProgressBar.new_bar nil, :desc => "Throughput"
28
28
  while line = STDIN.gets
29
29
  bar.tick
30
30
  end
31
+
32
+ bar.done
@@ -18,6 +18,9 @@ repo is not specified then 'http://github.com/Rbbt-Workflows/' will be used. If
18
18
  the workflow is already installed it will be updated. If 'all' is specified
19
19
  instead of a particular workflow, all installed workflows will be updated.
20
20
 
21
+ You can set the environment variable RBBT_WORKFLOW_AUTOINSTALL=true to make
22
+ workflows install automatically as required.
23
+
21
24
  -h--help Print this help
22
25
 
23
26
  EOF
@@ -397,7 +397,8 @@ begin
397
397
 
398
398
  job.fork
399
399
  else
400
- job.run(:stream)
400
+ nostream = options[:printname] || options[:printpath]
401
+ job.run(nostream ? false : :stream)
401
402
  res = job
402
403
  end
403
404
 
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.71
4
+ version: 5.26.72
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-09-05 00:00:00.000000000 Z
11
+ date: 2019-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake