barney 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +6 -3
- data/README.md +1 -0
- data/lib/barney/share.rb +6 -2
- data/lib/barney.rb +2 -4
- data/test/suite/lib/barney/share#initialize.rb +9 -0
- metadata +4 -2
data/ChangeLog
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
2011-03-14 Robert Gleeson <rob@flowof.info> v0.7.0
|
2
|
+
|
3
|
+
* Barney::Share#initialize yields a block.
|
4
|
+
|
1
5
|
2011-03-04 Robert Gleeson <rob@flowof.info> v0.6.0
|
2
6
|
|
3
|
-
*
|
4
|
-
*
|
5
|
-
* No longer store objects returned by IO.pipe and the current sequence in a Hash.
|
7
|
+
* Store instances of StreamPair in an array.
|
8
|
+
* Store sequence and pipe objects in a Struct referenced by StreamPair.
|
6
9
|
|
7
10
|
2011-03-04 Robert Gleeson <rob@flowof.info> v0.5.0
|
8
11
|
|
data/README.md
CHANGED
@@ -88,6 +88,7 @@ Okay, now that we've got that out of the way, let's see what using Barney is lik
|
|
88
88
|
**API**
|
89
89
|
|
90
90
|
* [master (git)](http://rubydoc.info/github/robgleeson/Barney/master/)
|
91
|
+
* [0.7.0](http://rubydoc.info/gems/barney/0.7.0)
|
91
92
|
* [0.6.0](http://rubydoc.info/gems/barney/0.6.0)
|
92
93
|
* [0.5.0](http://rubydoc.info/gems/barney/0.5.0)
|
93
94
|
* [0.4.1](http://rubydoc.info/gems/barney/0.4.1)
|
data/lib/barney/share.rb
CHANGED
@@ -2,6 +2,9 @@ module Barney
|
|
2
2
|
|
3
3
|
class Share
|
4
4
|
|
5
|
+
# @attr [Fixnum] seq The associated sequence number.
|
6
|
+
# @attr [IO] in The pipe which is used to read data.
|
7
|
+
# @attr [IO] out The pipe which is used to write data.
|
5
8
|
# @api private
|
6
9
|
StreamPair = Struct.new :seq, :in, :out
|
7
10
|
|
@@ -34,10 +37,11 @@ module Barney
|
|
34
37
|
|
35
38
|
# @return [Barney::Share] Returns an instance of Barney::Share.
|
36
39
|
def initialize
|
37
|
-
@shared =
|
38
|
-
@context = nil
|
40
|
+
@shared = {}
|
39
41
|
@history = {}
|
42
|
+
@context = nil
|
40
43
|
@seq = 0
|
44
|
+
yield self if block_given?
|
41
45
|
end
|
42
46
|
|
43
47
|
# Serves as a method to mark a variable or constant to be shared between two processes.
|
data/lib/barney.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: barney
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.7.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Robert Gleeson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-14 00:00:00 +00:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/barney.rb
|
55
55
|
- test/suite/lib/barney/share#fork.rb
|
56
56
|
- test/suite/lib/barney/share#history.rb
|
57
|
+
- test/suite/lib/barney/share#initialize.rb
|
57
58
|
- test/suite/lib/barney/share#shared.rb
|
58
59
|
- test/suite/lib/barney/share#synchronize.rb
|
59
60
|
- test/suite/lib/barney/share#unshare.rb
|
@@ -88,6 +89,7 @@ summary: Barney tries to make the sharing of data between processes as easy and
|
|
88
89
|
test_files:
|
89
90
|
- test/suite/lib/barney/share#fork.rb
|
90
91
|
- test/suite/lib/barney/share#history.rb
|
92
|
+
- test/suite/lib/barney/share#initialize.rb
|
91
93
|
- test/suite/lib/barney/share#shared.rb
|
92
94
|
- test/suite/lib/barney/share#synchronize.rb
|
93
95
|
- test/suite/lib/barney/share#unshare.rb
|