em-mongo 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/em-mongo/connection.rb +11 -8
  3. metadata +4 -26
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -215,23 +215,26 @@ module EM::Mongo
215
215
  end
216
216
 
217
217
  def unbind
218
- @is_connected = false
218
+ if @is_connected
219
+ @responses.values.each { |blk| blk.call(:disconnected) }
219
220
 
220
- # XXX do we need to fail the responses here?
221
- @request_id = 0
222
- @responses = {}
221
+ @request_id = 0
222
+ @responses = {}
223
+ end
224
+
225
+ @is_connected = false
223
226
 
224
227
  set_deferred_status(nil)
225
228
 
226
- if @reconnect_in
229
+ if @reconnect_in && @retries < MAX_RETRIES
227
230
  EM.add_timer(@reconnect_in) { reconnect(@host, @port) }
228
- elsif @on_unbind and @retries >= MAX_RETRIES
231
+ elsif @on_unbind
229
232
  @on_unbind.call
230
- return
233
+ else
234
+ raise "Connection to Mongo Lost"
231
235
  end
232
236
 
233
237
  @retries += 1
234
-
235
238
  end
236
239
 
237
240
  def close
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-mongo
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 3
8
- - 5
9
- version: 0.3.5
4
+ prerelease:
5
+ version: 0.3.6
10
6
  platform: ruby
11
7
  authors:
12
8
  - bcg
@@ -14,8 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-12-01 00:00:00 -05:00
18
- default_executable:
13
+ date: 2010-12-01 00:00:00 Z
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: eventmachine
@@ -25,10 +20,6 @@ dependencies:
25
20
  requirements:
26
21
  - - ">="
27
22
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 12
31
- - 10
32
23
  version: 0.12.10
33
24
  type: :runtime
34
25
  version_requirements: *id001
@@ -40,10 +31,6 @@ dependencies:
40
31
  requirements:
41
32
  - - ">="
42
33
  - !ruby/object:Gem::Version
43
- segments:
44
- - 1
45
- - 1
46
- - 3
47
34
  version: 1.1.3
48
35
  type: :runtime
49
36
  version_requirements: *id002
@@ -55,10 +42,6 @@ dependencies:
55
42
  requirements:
56
43
  - - ">="
57
44
  - !ruby/object:Gem::Version
58
- segments:
59
- - 1
60
- - 1
61
- - 3
62
45
  version: 1.1.3
63
46
  type: :runtime
64
47
  version_requirements: *id003
@@ -82,7 +65,6 @@ files:
82
65
  - spec/integration/collection_spec.rb
83
66
  - spec/integration/connection_spec.rb
84
67
  - spec/integration/database_spec.rb
85
- has_rdoc: true
86
68
  homepage: http://github.com/bcg/em-mongo
87
69
  licenses: []
88
70
 
@@ -96,21 +78,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
78
  requirements:
97
79
  - - ">="
98
80
  - !ruby/object:Gem::Version
99
- segments:
100
- - 0
101
81
  version: "0"
102
82
  required_rubygems_version: !ruby/object:Gem::Requirement
103
83
  none: false
104
84
  requirements:
105
85
  - - ">="
106
86
  - !ruby/object:Gem::Version
107
- segments:
108
- - 0
109
87
  version: "0"
110
88
  requirements: []
111
89
 
112
90
  rubyforge_project: em-mongo
113
- rubygems_version: 1.3.7
91
+ rubygems_version: 1.8.1
114
92
  signing_key:
115
93
  specification_version: 3
116
94
  summary: An EventMachine driver for MongoDB.