tubes 0.1.10 → 0.1.11

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 +11 -7
  2. metadata +3 -3
data/lib/tubes.rb CHANGED
@@ -114,19 +114,23 @@ class Tube
114
114
 
115
115
  def puts(string='')
116
116
  @thread_lock.synchronize do
117
- if self.class == Tube
118
- Kernel.puts "\033[32m[#{@order}]\033[0m #{string}"
119
- else
120
- Kernel.puts "\033[32m[#{@order}]\033[0m\033[36m[#{@name}]\033[0m #{string}"
121
- end
122
-
123
- STDOUT.flush
117
+ unlocked_puts(string)
124
118
  end
125
119
 
126
120
  nil # Behave like Kernel.puts
127
121
  end
128
122
 
129
123
 
124
+ def unlocked_puts(string='')
125
+ if self.class == Tube
126
+ Kernel.puts "\033[32m[#{@order}]\033[0m #{string}"
127
+ else
128
+ Kernel.puts "\033[32m[#{@order}]\033[0m\033[36m[#{@name}]\033[0m #{string}"
129
+ end
130
+
131
+ STDOUT.flush
132
+ end
133
+
130
134
  private
131
135
 
132
136
  def serial?
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.10
4
+ version: 0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-08 00:00:00.000000000 Z
12
+ date: 2012-10-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A simple way to build a pipeline of tasks. These tasks can be configured
15
15
  to run in serial, parallel or any combination thereof.
@@ -39,7 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  version: '0'
40
40
  requirements: []
41
41
  rubyforge_project:
42
- rubygems_version: 1.8.17
42
+ rubygems_version: 1.8.24
43
43
  signing_key:
44
44
  specification_version: 3
45
45
  summary: Tubes