moped 2.0.0.beta5 → 2.0.0.beta6
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 +4 -4
- data/CHANGELOG.md +6 -4
- data/lib/moped/errors.rb +8 -1
- data/lib/moped/failover/reconfigure.rb +2 -0
- data/lib/moped/node.rb +4 -4
- data/lib/moped/session.rb +5 -0
- data/lib/moped/version.rb +1 -1
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39c9d2378a1f97c2508d5dff1f4bbda4a8ca5a90
|
4
|
+
data.tar.gz: f64b98eb765c0c85e1fbd9385e01242d2ef93b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ca3aea553f4b746bd7052ad435c5a8ea5a1882296c62f47a3bb88a1288283fded424a63332100fa2ae2163ceafb823de7e0f91763f23889a48706469d63cdd4
|
7
|
+
data.tar.gz: b6e7973b2c424f5a63508f6dba9ce81f476016d2cbe6adf21f02055bf675d6561691e184d5568c131b31ad014a890818d0b12b3b192e8cc5a3849c0d805fd507
|
data/CHANGELOG.md
CHANGED
@@ -2,12 +2,10 @@
|
|
2
2
|
|
3
3
|
## 2.0.0
|
4
4
|
|
5
|
-
### New Features
|
6
|
-
|
7
|
-
* \#196 Adding method on collection to rename itself (Arthur Neves)
|
8
|
-
|
9
5
|
### API Changes (Backwards Incompatible)
|
10
6
|
|
7
|
+
* Moped 2 now only supports MongoDB 2.4.0 and higher.
|
8
|
+
|
11
9
|
* Query.cursor will return a Enumerable instead of a Enumerator. (Arthur Neves)
|
12
10
|
|
13
11
|
* Moped's BSON implementation has been removed in favor of the 10gen
|
@@ -48,6 +46,10 @@
|
|
48
46
|
|
49
47
|
The `:safe` option is no longer valid and will be ignored.
|
50
48
|
|
49
|
+
### New Features
|
50
|
+
|
51
|
+
* \#196 Adding method on collection to rename itself (Arthur Neves)
|
52
|
+
|
51
53
|
### Resolved Issues
|
52
54
|
|
53
55
|
* \#210 Moped no longer attempts to refresh arbiters as they cannot be queried.
|
data/lib/moped/errors.rb
CHANGED
@@ -112,7 +112,10 @@ module Moped
|
|
112
112
|
class PotentialReconfiguration < MongoError
|
113
113
|
|
114
114
|
# Not master error codes.
|
115
|
-
NOT_MASTER = [ 13435, 13436 ]
|
115
|
+
NOT_MASTER = [ 13435, 13436, 10009 ]
|
116
|
+
|
117
|
+
# Error codes received around reconfiguration
|
118
|
+
CONNECTION_ERRORS_RECONFIGURATION = [ 15988, 10276, 11600, 9001 ]
|
116
119
|
|
117
120
|
# Replica set reconfigurations can be either in the form of an operation
|
118
121
|
# error with code 13435, or with an error message stating the server is
|
@@ -122,6 +125,10 @@ module Moped
|
|
122
125
|
NOT_MASTER.include?(details["code"]) || err.include?("not master")
|
123
126
|
end
|
124
127
|
|
128
|
+
def connection_failure?
|
129
|
+
CONNECTION_ERRORS_RECONFIGURATION.include?(details["code"])
|
130
|
+
end
|
131
|
+
|
125
132
|
# Is the error due to a namespace not being found?
|
126
133
|
#
|
127
134
|
# @example Is the namespace not found?
|
@@ -26,6 +26,8 @@ module Moped
|
|
26
26
|
def execute(exception, node)
|
27
27
|
if exception.reconfiguring_replica_set?
|
28
28
|
raise(Errors::ReplicaSetReconfigured.new(exception.command, exception.details))
|
29
|
+
elsif exception.connection_failure?
|
30
|
+
raise Errors::ConnectionFailure.new(exception.inspect)
|
29
31
|
end
|
30
32
|
raise(exception)
|
31
33
|
end
|
data/lib/moped/node.rb
CHANGED
@@ -60,12 +60,12 @@ module Moped
|
|
60
60
|
!!@arbiter
|
61
61
|
end
|
62
62
|
|
63
|
-
# Is the
|
63
|
+
# Is the node auto-discovering new peers in the cluster?
|
64
64
|
#
|
65
|
-
# @example Is the
|
66
|
-
#
|
65
|
+
# @example Is the node auto discovering?
|
66
|
+
# node.auto_discovering?
|
67
67
|
#
|
68
|
-
# @return [ true, false ] If the
|
68
|
+
# @return [ true, false ] If the node is auto discovering.
|
69
69
|
#
|
70
70
|
# @since 2.0.0
|
71
71
|
def auto_discovering?
|
data/lib/moped/session.rb
CHANGED
@@ -240,6 +240,11 @@ module Moped
|
|
240
240
|
# @since 2.0.0
|
241
241
|
option(:instrumenter).allow(Optionable.any(Object))
|
242
242
|
|
243
|
+
# Setup validation of allowed auto_discover preference options.
|
244
|
+
#
|
245
|
+
# @since 1.5.0
|
246
|
+
option(:auto_discover).allow(true, false)
|
247
|
+
|
243
248
|
# Initialize a new database session.
|
244
249
|
#
|
245
250
|
# @example Initialize a new session.
|
data/lib/moped/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moped
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Durran Jordan
|
@@ -9,48 +9,48 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01
|
12
|
+
date: 2014-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bson
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '2.
|
20
|
+
version: '2.2'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '2.
|
27
|
+
version: '2.2'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: connection_pool
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.2'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '1.2'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: optionable
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 0.2.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 0.2.0
|
56
56
|
description: A MongoDB driver for Ruby.
|
@@ -60,38 +60,43 @@ executables: []
|
|
60
60
|
extensions: []
|
61
61
|
extra_rdoc_files: []
|
62
62
|
files:
|
63
|
+
- CHANGELOG.md
|
64
|
+
- LICENSE
|
65
|
+
- README.md
|
66
|
+
- lib/moped.rb
|
63
67
|
- lib/moped/address.rb
|
64
68
|
- lib/moped/authenticatable.rb
|
65
69
|
- lib/moped/cluster.rb
|
66
70
|
- lib/moped/collection.rb
|
71
|
+
- lib/moped/connection.rb
|
67
72
|
- lib/moped/connection/manager.rb
|
73
|
+
- lib/moped/connection/socket.rb
|
68
74
|
- lib/moped/connection/socket/connectable.rb
|
69
75
|
- lib/moped/connection/socket/ssl.rb
|
70
76
|
- lib/moped/connection/socket/tcp.rb
|
71
|
-
- lib/moped/connection/socket.rb
|
72
77
|
- lib/moped/connection/sockets.rb
|
73
|
-
- lib/moped/connection.rb
|
74
78
|
- lib/moped/cursor.rb
|
75
79
|
- lib/moped/database.rb
|
76
80
|
- lib/moped/errors.rb
|
77
81
|
- lib/moped/executable.rb
|
82
|
+
- lib/moped/failover.rb
|
78
83
|
- lib/moped/failover/disconnect.rb
|
79
84
|
- lib/moped/failover/ignore.rb
|
80
85
|
- lib/moped/failover/reconfigure.rb
|
81
86
|
- lib/moped/failover/retry.rb
|
82
|
-
- lib/moped/failover.rb
|
83
87
|
- lib/moped/indexes.rb
|
88
|
+
- lib/moped/instrumentable.rb
|
84
89
|
- lib/moped/instrumentable/log.rb
|
85
90
|
- lib/moped/instrumentable/noop.rb
|
86
|
-
- lib/moped/instrumentable.rb
|
87
91
|
- lib/moped/loggable.rb
|
88
92
|
- lib/moped/node.rb
|
93
|
+
- lib/moped/operation.rb
|
89
94
|
- lib/moped/operation/read.rb
|
90
95
|
- lib/moped/operation/write.rb
|
91
|
-
- lib/moped/
|
96
|
+
- lib/moped/protocol.rb
|
92
97
|
- lib/moped/protocol/command.rb
|
93
|
-
- lib/moped/protocol/commands/authenticate.rb
|
94
98
|
- lib/moped/protocol/commands.rb
|
99
|
+
- lib/moped/protocol/commands/authenticate.rb
|
95
100
|
- lib/moped/protocol/delete.rb
|
96
101
|
- lib/moped/protocol/get_more.rb
|
97
102
|
- lib/moped/protocol/insert.rb
|
@@ -100,26 +105,21 @@ files:
|
|
100
105
|
- lib/moped/protocol/query.rb
|
101
106
|
- lib/moped/protocol/reply.rb
|
102
107
|
- lib/moped/protocol/update.rb
|
103
|
-
- lib/moped/protocol.rb
|
104
108
|
- lib/moped/query.rb
|
109
|
+
- lib/moped/read_preference.rb
|
105
110
|
- lib/moped/read_preference/nearest.rb
|
106
111
|
- lib/moped/read_preference/primary.rb
|
107
112
|
- lib/moped/read_preference/primary_preferred.rb
|
108
113
|
- lib/moped/read_preference/secondary.rb
|
109
114
|
- lib/moped/read_preference/secondary_preferred.rb
|
110
115
|
- lib/moped/read_preference/selectable.rb
|
111
|
-
- lib/moped/read_preference.rb
|
112
116
|
- lib/moped/readable.rb
|
113
117
|
- lib/moped/session.rb
|
114
118
|
- lib/moped/uri.rb
|
115
119
|
- lib/moped/version.rb
|
120
|
+
- lib/moped/write_concern.rb
|
116
121
|
- lib/moped/write_concern/propagate.rb
|
117
122
|
- lib/moped/write_concern/unverified.rb
|
118
|
-
- lib/moped/write_concern.rb
|
119
|
-
- lib/moped.rb
|
120
|
-
- CHANGELOG.md
|
121
|
-
- LICENSE
|
122
|
-
- README.md
|
123
123
|
homepage: http://mongoid.org/en/moped
|
124
124
|
licenses: []
|
125
125
|
metadata: {}
|
@@ -129,17 +129,17 @@ require_paths:
|
|
129
129
|
- lib
|
130
130
|
required_ruby_version: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- -
|
132
|
+
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - ">"
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: 1.3.1
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.1
|
142
|
+
rubygems_version: 2.2.1
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: A MongoDB driver for Ruby.
|