parallel 0.5.2 → 0.5.3

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/Readme.md CHANGED
@@ -37,6 +37,10 @@ or `each_with_index` or `map_with_index`
37
37
 
38
38
  Processes/Threads are workers, they grab the next piece of work when they finish
39
39
 
40
+ Tips
41
+ ====
42
+ - [ActiveRecord] `ActiveRecord::Base.connection.reconnect!` inside the parallel block prevents errors
43
+
40
44
  TODO
41
45
  ====
42
46
  - JRuby / Windows support <-> possible ?
@@ -57,4 +61,4 @@ Authors
57
61
 
58
62
  [Michael Grosser](http://grosser.it)<br/>
59
63
  michael@grosser.it<br/>
60
- Hereby placed under public domain, do what you want, just do not hold me accountable...
64
+ Hereby placed under public domain, do what you want, just do not hold me accountable...
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
data/lib/parallel.rb CHANGED
@@ -37,7 +37,7 @@ class Parallel
37
37
  end
38
38
 
39
39
  def self.map(array, options = {}, &block)
40
- array = array.to_a if array.is_a?(Range)
40
+ array = array.to_a # turn Range and other Enumerable-s into an Array
41
41
 
42
42
  if options[:in_threads]
43
43
  method = :in_threads
@@ -260,4 +260,4 @@ class Parallel
260
260
  @exception = exception
261
261
  end
262
262
  end
263
- end
263
+ end
data/parallel.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{parallel}
8
- s.version = "0.5.2"
8
+ s.version = "0.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
12
- s.date = %q{2011-02-15}
12
+ s.date = %q{2011-03-20}
13
13
  s.email = %q{grosser.michael@gmail.com}
14
14
  s.files = [
15
15
  "Gemfile",
@@ -116,7 +116,7 @@ describe Parallel do
116
116
  Parallel.map([1,2,3,4,5,6,7,8,9], :in_threads=>4){|x| x+2 }.should == [3,4,5,6,7,8,9,10,11]
117
117
  end
118
118
 
119
- it 'supports ranges' do
119
+ it 'supports all Enumerable-s' do
120
120
  `ruby spec/cases/parallel_map_range.rb`.should == '[1, 2, 3, 4, 5]'
121
121
  end
122
122
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-15 00:00:00 +01:00
18
+ date: 2011-03-20 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21