arya-pandemic 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('pandemic', '0.3.7') do |p|
5
+ Echoe.new('pandemic', '0.3.8') do |p|
6
6
  p.description = "Distribute MapReduce to any of the workers and it will spread, like a pandemic."
7
7
  p.url = "https://github.com/arya/pandemic/"
8
8
  p.author = "Arya Asemanfar"
@@ -89,6 +89,7 @@ module Pandemic
89
89
  loop do
90
90
  if select_from.size > 0
91
91
  connection = select_from.pop
92
+ connection.ensure_alive!
92
93
  if key.nil?
93
94
  @grouped_available[key].delete(connection)
94
95
  else
@@ -10,6 +10,10 @@ module Pandemic
10
10
  def alive?
11
11
  @socket && !@socket.closed?
12
12
  end
13
+
14
+ def ensure_alive!
15
+ connect unless alive?
16
+ end
13
17
 
14
18
  private
15
19
  def connect
data/pandemic.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{pandemic}
5
- s.version = "0.3.7"
5
+ s.version = "0.3.8"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Arya Asemanfar"]
@@ -11,18 +11,17 @@ Gem::Specification.new do |s|
11
11
  s.email = %q{aryaasemanfar@gmail.com}
12
12
  s.extra_rdoc_files = ["lib/pandemic/client_side/cluster_connection.rb", "lib/pandemic/client_side/config.rb", "lib/pandemic/client_side/connection.rb", "lib/pandemic/client_side/connection_proxy.rb", "lib/pandemic/client_side/pandemize.rb", "lib/pandemic/connection_pool.rb", "lib/pandemic/mutex_counter.rb", "lib/pandemic/server_side/client.rb", "lib/pandemic/server_side/config.rb", "lib/pandemic/server_side/handler.rb", "lib/pandemic/server_side/peer.rb", "lib/pandemic/server_side/processor.rb", "lib/pandemic/server_side/request.rb", "lib/pandemic/server_side/server.rb", "lib/pandemic/util.rb", "lib/pandemic.rb", "README.markdown"]
13
13
  s.files = ["examples/client/client.rb", "examples/client/constitution.txt", "examples/client/pandemic_client.yml", "examples/server/pandemic_server.yml", "examples/server/word_count_server.rb", "lib/pandemic/client_side/cluster_connection.rb", "lib/pandemic/client_side/config.rb", "lib/pandemic/client_side/connection.rb", "lib/pandemic/client_side/connection_proxy.rb", "lib/pandemic/client_side/pandemize.rb", "lib/pandemic/connection_pool.rb", "lib/pandemic/mutex_counter.rb", "lib/pandemic/server_side/client.rb", "lib/pandemic/server_side/config.rb", "lib/pandemic/server_side/handler.rb", "lib/pandemic/server_side/peer.rb", "lib/pandemic/server_side/processor.rb", "lib/pandemic/server_side/request.rb", "lib/pandemic/server_side/server.rb", "lib/pandemic/util.rb", "lib/pandemic.rb", "Manifest", "MIT-LICENSE", "pandemic.gemspec", "Rakefile", "README.markdown", "test/client_test.rb", "test/connection_pool_test.rb", "test/functional_test.rb", "test/handler_test.rb", "test/mutex_counter_test.rb", "test/peer_test.rb", "test/processor_test.rb", "test/server_test.rb", "test/test_helper.rb", "test/util_test.rb"]
14
- s.has_rdoc = true
15
14
  s.homepage = %q{https://github.com/arya/pandemic/}
16
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Pandemic", "--main", "README.markdown"]
17
16
  s.require_paths = ["lib"]
18
17
  s.rubyforge_project = %q{pandemic}
19
- s.rubygems_version = %q{1.3.1}
18
+ s.rubygems_version = %q{1.3.4}
20
19
  s.summary = %q{Distribute MapReduce to any of the workers and it will spread, like a pandemic.}
21
20
  s.test_files = ["test/client_test.rb", "test/connection_pool_test.rb", "test/functional_test.rb", "test/handler_test.rb", "test/mutex_counter_test.rb", "test/peer_test.rb", "test/processor_test.rb", "test/server_test.rb", "test/test_helper.rb", "test/util_test.rb"]
22
21
 
23
22
  if s.respond_to? :specification_version then
24
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
- s.specification_version = 2
24
+ s.specification_version = 3
26
25
 
27
26
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
27
  s.add_development_dependency(%q<shoulda>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arya-pandemic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arya Asemanfar
@@ -93,7 +93,7 @@ files:
93
93
  - test/server_test.rb
94
94
  - test/test_helper.rb
95
95
  - test/util_test.rb
96
- has_rdoc: true
96
+ has_rdoc: false
97
97
  homepage: https://github.com/arya/pandemic/
98
98
  post_install_message:
99
99
  rdoc_options:
@@ -122,7 +122,7 @@ requirements: []
122
122
  rubyforge_project: pandemic
123
123
  rubygems_version: 1.2.0
124
124
  signing_key:
125
- specification_version: 2
125
+ specification_version: 3
126
126
  summary: Distribute MapReduce to any of the workers and it will spread, like a pandemic.
127
127
  test_files:
128
128
  - test/client_test.rb