moped 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of moped might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 260d8eb2824639cdc5af3a70324f85439cd1e607
4
- data.tar.gz: a58e1fa265378a2bcf587a10ac2f9b98b021b94e
3
+ metadata.gz: dc688693985dc94ceb168180d2c840e606d72102
4
+ data.tar.gz: 7c076cf97ec2653b64928ded1f305bf22fdbba17
5
5
  SHA512:
6
- metadata.gz: bf187be0f6a2c0934dd1736eaf443119a181fcfcc7a11b2fae7a84f0d0e89e88fb9befb550678b79bc157f736934c083c2898142d58cb633d95b31c6f07efd7e
7
- data.tar.gz: 561dbcbb3daed9202cb458c421525cdc000446c4a65450c16188ea331c4b69f84e52e7ec81ac6a02b9a11965247738fce69deaf91e95eb312f5b98b95f4411e6
6
+ metadata.gz: 451fe5b6686da5a8090be3b36417ad24e59aea46ed7e8654eb944b4adbdf0be163486e77e8038b8a85fa9894dbf49b8921bb3f253b385f7502c80e3bf2ab1e89
7
+ data.tar.gz: a05c67bd14d1979984977e0fd28a677120b9e4c2ef65c1accb4f5d0d27b9c36932d86a7b4a366c1c5e41da0d1da888a651c39b4f2c012f6bde61f38ab6904695
@@ -100,7 +100,10 @@ module Moped
100
100
  class PotentialReconfiguration < MongoError
101
101
 
102
102
  # Not master error codes.
103
- NOT_MASTER = [ 13435, 13436 ]
103
+ NOT_MASTER = [ 13435, 13436, 10009]
104
+
105
+ # Error codes received around reconfiguration
106
+ CONNECTION_ERRORS_RECONFIGURATION = [ 15988, 10276, 11600, 9001 ]
104
107
 
105
108
  # Replica set reconfigurations can be either in the form of an operation
106
109
  # error with code 13435, or with an error message stating the server is
@@ -109,6 +112,10 @@ module Moped
109
112
  err = details["err"] || details["errmsg"] || details["$err"] || ""
110
113
  NOT_MASTER.include?(details["code"]) || err.include?("not master")
111
114
  end
115
+
116
+ def connection_failure?
117
+ CONNECTION_ERRORS_RECONFIGURATION.include?(details["code"])
118
+ end
112
119
  end
113
120
 
114
121
  # Exception raised when authentication fails.
@@ -151,6 +151,8 @@ module Moped
151
151
  rescue Errors::PotentialReconfiguration => e
152
152
  if e.reconfiguring_replica_set?
153
153
  raise Errors::ReplicaSetReconfigured.new(e.command, e.details)
154
+ elsif e.connection_failure?
155
+ raise Errors::ConnectionFailure.new(e.inspect)
154
156
  end
155
157
  raise
156
158
  rescue Errors::DoNotDisconnect
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Moped
3
- VERSION = "1.5.1"
3
+ VERSION = "1.5.2"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moped
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernerd Schaefer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-11 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A MongoDB driver for Ruby.
14
14
  email:
@@ -17,9 +17,15 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - CHANGELOG.md
21
+ - LICENSE
22
+ - README.md
23
+ - lib/moped.rb
24
+ - lib/moped/bson.rb
20
25
  - lib/moped/bson/binary.rb
21
26
  - lib/moped/bson/code.rb
22
27
  - lib/moped/bson/document.rb
28
+ - lib/moped/bson/extensions.rb
23
29
  - lib/moped/bson/extensions/array.rb
24
30
  - lib/moped/bson/extensions/boolean.rb
25
31
  - lib/moped/bson/extensions/false_class.rb
@@ -33,13 +39,11 @@ files:
33
39
  - lib/moped/bson/extensions/symbol.rb
34
40
  - lib/moped/bson/extensions/time.rb
35
41
  - lib/moped/bson/extensions/true_class.rb
36
- - lib/moped/bson/extensions.rb
37
42
  - lib/moped/bson/max_key.rb
38
43
  - lib/moped/bson/min_key.rb
39
44
  - lib/moped/bson/object_id.rb
40
45
  - lib/moped/bson/timestamp.rb
41
46
  - lib/moped/bson/types.rb
42
- - lib/moped/bson.rb
43
47
  - lib/moped/cluster.rb
44
48
  - lib/moped/collection.rb
45
49
  - lib/moped/connection.rb
@@ -50,9 +54,10 @@ files:
50
54
  - lib/moped/logging.rb
51
55
  - lib/moped/mongo_uri.rb
52
56
  - lib/moped/node.rb
57
+ - lib/moped/protocol.rb
53
58
  - lib/moped/protocol/command.rb
54
- - lib/moped/protocol/commands/authenticate.rb
55
59
  - lib/moped/protocol/commands.rb
60
+ - lib/moped/protocol/commands/authenticate.rb
56
61
  - lib/moped/protocol/delete.rb
57
62
  - lib/moped/protocol/get_more.rb
58
63
  - lib/moped/protocol/insert.rb
@@ -61,19 +66,14 @@ files:
61
66
  - lib/moped/protocol/query.rb
62
67
  - lib/moped/protocol/reply.rb
63
68
  - lib/moped/protocol/update.rb
64
- - lib/moped/protocol.rb
65
69
  - lib/moped/query.rb
66
- - lib/moped/session/context.rb
67
70
  - lib/moped/session.rb
71
+ - lib/moped/session/context.rb
68
72
  - lib/moped/sockets/connectable.rb
69
73
  - lib/moped/sockets/ssl.rb
70
74
  - lib/moped/sockets/tcp.rb
71
75
  - lib/moped/threaded.rb
72
76
  - lib/moped/version.rb
73
- - lib/moped.rb
74
- - CHANGELOG.md
75
- - LICENSE
76
- - README.md
77
77
  homepage: http://mongoid.org/en/moped
78
78
  licenses: []
79
79
  metadata: {}
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.0.3
96
+ rubygems_version: 2.2.1
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: A MongoDB driver for Ruby.