press 0.25 → 0.26
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/press/printer.rb +8 -2
- metadata +2 -2
data/lib/press/printer.rb
CHANGED
@@ -101,10 +101,16 @@ module Press
|
|
101
101
|
end.join(" ")
|
102
102
|
end
|
103
103
|
|
104
|
+
def self.mutex
|
105
|
+
@mutex ||= Mutex.new
|
106
|
+
end
|
107
|
+
|
104
108
|
def self.write(file, data, &blk)
|
105
109
|
unless blk
|
106
|
-
|
107
|
-
|
110
|
+
mutex.synchronize do
|
111
|
+
file.puts stringify(data)
|
112
|
+
file.flush
|
113
|
+
end
|
108
114
|
nil
|
109
115
|
else
|
110
116
|
start = Time.now
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: press
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.26'
|
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: 2013-
|
12
|
+
date: 2013-10-25 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Data and exception printer.
|
15
15
|
email: mark.fine@gmail.com
|