parallizer 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- parallizer (0.2.1)
4
+ parallizer (0.2.2)
5
5
  work_queue (~> 2.5.2)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- always_execute (0.1.1)
10
+ always_execute (0.1.3)
11
11
  diff-lcs (1.1.3)
12
12
  rspec (2.9.0)
13
13
  rspec-core (~> 2.9.0)
data/lib/parallizer.rb CHANGED
@@ -28,6 +28,7 @@ class Parallizer
28
28
  raise ArgumentError, "Cannot add calls after proxy has been generated" if @proxy
29
29
 
30
30
  method_name_and_args = [method_name.to_sym, *args]
31
+ return if call_infos[method_name_and_args]
31
32
 
32
33
  call_info = {
33
34
  :complete? => false,
@@ -1,3 +1,3 @@
1
1
  class Parallizer
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -62,6 +62,19 @@ describe Parallizer do
62
62
  end
63
63
  end
64
64
 
65
+ context "with call already added" do
66
+ before do
67
+ @method = :a_method
68
+ @parallizer.add_call(@method, 'arg')
69
+ @call_info = @parallizer.call_infos[[@method, 'arg']]
70
+ @call_info.should_not be_nil
71
+ end
72
+
73
+ it "should ignore additional call" do
74
+ @call_info.object_id.should == @parallizer.call_infos[[@method, 'arg']].object_id
75
+ end
76
+ end
77
+
65
78
  context "with string method name added" do
66
79
  before do
67
80
  @method = 'a_method'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-11 00:00:00.000000000 Z
12
+ date: 2012-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: work_queue
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  version: '0'
102
102
  requirements: []
103
103
  rubyforge_project: parallizer
104
- rubygems_version: 1.8.24
104
+ rubygems_version: 1.8.21
105
105
  signing_key:
106
106
  specification_version: 3
107
107
  summary: Execute your service layer in parallel