celluloid-pmap 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd8a1f6f0315f3acd623701b984e804bb3f1d282
4
- data.tar.gz: b352db781fc66bedf019e7e70eca037731a382fe
3
+ metadata.gz: 87801c95ee0b65e7efad886c800f8e0c5ce4cb15
4
+ data.tar.gz: 83e083290f31ddb16d8e0f3ee7098d44700b1de6
5
5
  SHA512:
6
- metadata.gz: 5221c5887556d0530b0a8c3f5bf13f9f5c17d49fd8a970899d19eff295d62a73f8978d7c64829e6b29638597869a30e198c6e5bd891c25b3b191ac2b684c230e
7
- data.tar.gz: 30c8b6a0c707ebb2f1f919d2146c6a1b3095055b513ea283f0de7bf873f483325e294486cc563bfcfb996ab4c28b03251338d040c81d6c1dcb80be81173ae991
6
+ metadata.gz: d8931423cd0d9e6f03bf86aa2163f1162f82a33a41e3d8bc8f60af1906429b8d75523ee59082099c294b8f8e45c4e45d89689a899ef3eef37911bb46ee5a6577
7
+ data.tar.gz: 73b1e7e226d57b2a35a4d48977bc15b9b483c9ec332c6e2adbab38fa5409f9c1fbb5386fcb7b6c07d2c2658b6586378a8901ae0870a714a9bd13e742ec50adc1
data/README.md CHANGED
@@ -121,6 +121,7 @@ More information on He-Man can be found at the unspeakably wow site: http://cast
121
121
  ## Contributors
122
122
 
123
123
  * [Jason Voegele](https://github.com/jvoegele)
124
+ * [rada bogdan raul](https://github.com/bogdanRada)
124
125
 
125
126
  ## Contributing
126
127
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.require_paths = ["lib"]
20
20
 
21
- gem.add_dependency('celluloid', '~> 0.16')
21
+ gem.add_dependency('celluloid', ' >= 0.16')
22
22
 
23
23
  gem.add_development_dependency "rake"
24
24
  gem.add_development_dependency "rspec", "2.99"
@@ -1,15 +1,26 @@
1
- require 'celluloid'
2
1
  require 'celluloid/pmap/parallel_map_worker'
3
2
  require "celluloid/pmap/version"
4
3
 
5
4
  module Celluloid
6
5
  module Pmap
7
6
 
7
+
8
+ def self.pool_class
9
+ celluloid_version = Celluloid::VERSION.to_s.split('.')
10
+ if celluloid_version[0].to_i >= 0 && celluloid_version[1].to_i <= 16
11
+ require 'celluloid'
12
+ Celluloid::PoolManager
13
+ else
14
+ require 'celluloid/current'
15
+ Celluloid::Supervision::Container::Pool
16
+ end
17
+ end
18
+
8
19
  def self.included(base)
9
20
  base.class_eval do
10
21
 
11
22
  def pmap(pool_or_size=Celluloid.cores, &block)
12
- pool = if pool_or_size.class.ancestors.include?(Celluloid::PoolManager)
23
+ pool = if pool_or_size.class.ancestors.include?(Celluloid::Pmap.pool_class)
13
24
  pool_or_size
14
25
  else
15
26
  Pmap::ParallelMapWorker.pool(size: pool_or_size)
@@ -1,5 +1,5 @@
1
1
  module Celluloid
2
2
  module Pmap
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid-pmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Wolgamott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.16'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.16'
27
27
  - !ruby/object:Gem::Dependency
@@ -118,3 +118,4 @@ test_files:
118
118
  - spec/celluloid/pmap_spec.rb
119
119
  - spec/spec_helper.rb
120
120
  - spec/support/benchmark_spec.rb
121
+ has_rdoc: