barney 0.15.0 → 0.15.1

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-25 Robert Gleeson <rob@flowof.info>
2
2
 
3
+ * lib/barney.rb:
4
+ Release 0.15.1
5
+
6
+ * lib/barney/jobs.rb:
7
+ Jobs() should raise an ArgumentError if block is missing.
8
+
3
9
  * lib/barney.rb:
4
10
  Release 0.15.0
5
11
 
data/README.md CHANGED
@@ -38,6 +38,7 @@ Documentation
38
38
  **API**
39
39
 
40
40
  * [master (git)](http://rubydoc.info/github/robgleeson/barney/master/)
41
+ * [0.15.1](http://rubydoc.info/gems/barney/0.15.0/)
41
42
  * [0.15.0](http://rubydoc.info/gems/barney/0.15.0/)
42
43
  * [0.14.0](http://rubydoc.info/gems/barney/0.14.0/)
43
44
  * [0.13.0](http://rubydoc.info/gems/barney/0.13.0/)
data/Rakefile CHANGED
@@ -7,6 +7,8 @@ task :test do
7
7
  Dir.glob("test/suite/lib/**/*.rb").each { |test| require "./#{test}" }
8
8
  end
9
9
 
10
+ task :default => :test
11
+
10
12
  task :rvm_test do
11
13
  puts `rvm 1.8.7,rbx-1.2.2,1.9.2 exec rake test`
12
14
  end
data/lib/barney.rb CHANGED
@@ -5,7 +5,7 @@ require 'barney/emptystate'
5
5
 
6
6
  module Barney
7
7
 
8
- VERSION = '0.15.0'
8
+ VERSION = '0.15.1'
9
9
  @proxy = Barney::Share.new
10
10
 
11
11
  class << self
data/lib/barney/jobs.rb CHANGED
@@ -1,10 +1,17 @@
1
- # Returns an Array populated by the return value of the block.
1
+ # Returns an Array populated by the return value of a block.
2
2
  # Each block is executed in a subprocess.
3
3
  #
4
+ # @example
5
+ # results = Jobs(5) { 42 }
6
+ # p results # [42, 42, 42, 42, 42]
7
+ #
4
8
  # @param [Proc] Block The block to execute in a subprocess.
5
9
  # @param [Fixnum] Processes The number of subprocesses to spawn.
10
+ # @raise [ArgumentError] If block is missing.
6
11
  # @return [Array<Object>]
7
12
  def Jobs number, &block
13
+ raise ArgumentError, 'block expected' unless block_given?
14
+
8
15
  barney = Barney::Share.new
9
16
  barney.share :queue
10
17
  queue = []
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: barney
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.15.0
5
+ version: 0.15.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Robert Gleeson