barney 0.11.0 → 0.12.0

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.
data/ChangeLog CHANGED
@@ -1,5 +1,11 @@
1
1
  2011-05-03 Robert Gleeson <rob@flowof.info>
2
2
 
3
+ * lib/barney.rb README.md ChangeLog:
4
+ Release 0.12.0
5
+
6
+ * lib/barney.rb Rakefile.rb:
7
+ Add support for 1.8.7
8
+
3
9
  * lib/barney.rb README.md ChangeLog:
4
10
  Release 0.11.0
5
11
 
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ![Barney Picture](http://i.imgur.com/VblLQ.png)
2
2
 
3
3
  Barney makes sharing data between processes easy and natural by providing a simple and easy to use DSL.
4
- Barney is developed against Ruby 1.9.1 and later, but it may work on earlier versions of Ruby as well.
4
+ Barney is supported on any Ruby implementation that supports 1.8.7+, 1.9.1+, and that implements `Kernel.fork`.
5
5
 
6
6
  Limitations
7
7
  -----------
@@ -50,15 +50,15 @@ Documentation
50
50
  **API**
51
51
 
52
52
  * [master (git)](http://rubydoc.info/github/robgleeson/barney/master/)
53
+ * [0.12.0](http://rubydoc.info/gems/barney/0.12.0/)
54
+ * [0.11.0](http://rubydoc.info/gems/barney/0.11.0/)
55
+ * [0.10.1](http://rubydoc.info/gems/barney/0.10.1/)
53
56
  * [0.10.0](http://rubydoc.info/gems/barney/0.10.0/)
54
57
  * [0.9.1](http://rubydoc.info/gems/barney/0.9.1/)
55
58
  * [0.9.0](http://rubydoc.info/gems/barney/0.9.0/)
56
- * [0.8.1](http://rubydoc.info/gems/barney/0.8.1/)
57
- * [0.8.0](http://rubydoc.info/gems/barney/0.8.0/)
58
- * [0.7.0](http://rubydoc.info/gems/barney/0.7.0)
59
59
  * …
60
60
 
61
-
61
+
62
62
 
63
63
  Install
64
64
  --------
@@ -76,21 +76,6 @@ Github
76
76
 
77
77
  I'm following the [Semantic Versioning](http://www.semver.org) policy.
78
78
 
79
- Documentation
80
- --------------
81
-
82
- **API**
83
-
84
- * [master (git)](http://rubydoc.info/github/robgleeson/barney/master/)
85
- * [0.11.0](http://rubydoc.info/gems/barney/0.11.0/)
86
- * [0.10.1](http://rubydoc.info/gems/barney/0.10.1/)
87
- * [0.10.0](http://rubydoc.info/gems/barney/0.10.0/)
88
- * [0.9.1](http://rubydoc.info/gems/barney/0.9.1/)
89
- * [0.9.0](http://rubydoc.info/gems/barney/0.9.0/)
90
- * [0.8.1](http://rubydoc.info/gems/barney/0.8.1/)
91
- * …
92
-
93
-
94
79
  License
95
80
  --------
96
81
 
data/Rakefile CHANGED
@@ -4,6 +4,9 @@ task :test do
4
4
  require 'barney'
5
5
  require 'minitest/spec'
6
6
  require 'minitest/autorun'
7
- begin; require 'turn'; rescue LoadError; end
8
- Dir.glob("test/suite/lib/**/*.rb").each { |test| require_relative test }
7
+ Dir.glob("test/suite/lib/**/*.rb").each { |test| require "./#{test}" }
8
+ end
9
+
10
+ task :rvm_test do
11
+ puts `rvm 1.8.7,rbx-1.2.2,1.9.2 exec rake test`
9
12
  end
data/lib/barney/share.rb CHANGED
@@ -64,7 +64,8 @@ module Barney
64
64
  # @param [Symbol, #to_sym] Variable Accepts the name(s) of the variables or constants you want to stop sharing.
65
65
  # @return [Array<Symbol>] Returns a list of the variables that are still being shared.
66
66
  def unshare *variables
67
- variables.map(&:to_sym).each do |variable|
67
+ variables.each do |variable|
68
+ variable = variable.to_sym
68
69
  @streams.delete_if { |stream| stream.variable == variable }
69
70
  @variables.delete variable
70
71
  end
@@ -98,7 +99,7 @@ module Barney
98
99
  block.call
99
100
  tmp_streams.each do |stream|
100
101
  stream.in.close
101
- stream.out.write Marshal.dump(eval("#{stream.variable}", @scope))
102
+ stream.out.write Marshal.dump(@scope.eval("#{stream.variable}"))
102
103
  stream.out.close
103
104
  end
104
105
  end
@@ -116,7 +117,7 @@ module Barney
116
117
  stream.out.close
117
118
  Barney::Share.value = Marshal.load stream.in.read
118
119
  stream.in.close
119
- value = eval "#{stream.variable} = Barney::Share.value", @scope
120
+ value = @scope.eval "#{stream.variable} = Barney::Share.value"
120
121
  @history.push HistoryItem.new(stream.variable, value)
121
122
  end
122
123
 
data/lib/barney.rb CHANGED
@@ -1,8 +1,9 @@
1
+ require 'thread'
1
2
  require 'barney/share'
2
3
 
3
4
  module Barney
4
5
 
5
- VERSION = '0.11.0'
6
+ VERSION = '0.12.0'
6
7
  @proxy = Barney::Share.new
7
8
 
8
9
  class << self
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: barney
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.11.0
5
+ version: 0.12.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-05-03 00:00:00 +01:00
13
+ date: 2011-05-08 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -73,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 1.9.1
76
+ version: "0"
77
77
  required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements: