tubes 0.1.9 → 0.1.10

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.
Files changed (2) hide show
  1. data/lib/tubes.rb +6 -6
  2. metadata +1 -1
@@ -83,13 +83,13 @@ class Tube
83
83
  self.puts "Skipping: #{step}"
84
84
  output = JSON.load(File.read(output_file))["data"]
85
85
 
86
- if parallel?
86
+ if serial?
87
+ @output = output
88
+ @input = output
89
+ elsif parallel?
87
90
  @thread_lock.synchronize do
88
91
  @output << output
89
92
  end
90
- elsif serial?
91
- @output = output
92
- @input = output
93
93
  end
94
94
  else
95
95
  self.puts "Running: #{step}"
@@ -148,7 +148,7 @@ class Tube
148
148
  tube.instance_eval &block
149
149
  tube.threads.each { |thread| thread.join } # Could be a parallel block inside a parallel block.
150
150
  @thread_lock.synchronize do
151
- @output << mode == :parallel ? tube.output.flatten(1) : tube.output
151
+ @output << (mode == :parallel ? tube.output.flatten(1) : tube.output)
152
152
  end
153
153
  end
154
154
  @threads << thread
@@ -156,7 +156,7 @@ class Tube
156
156
  tube = child(mode, args)
157
157
  tube.instance_eval &block
158
158
  tube.threads.each { |thread| thread.join }
159
- @output = mode == :parallel ? tube.output.flatten(1) : tube.output
159
+ @output = (mode == :parallel ? tube.output.flatten(1) : tube.output)
160
160
  @input = @output
161
161
  end
162
162
  rescue => e
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tubes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: