mongo 2.4.2 → 2.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/lib/mongo.rb +1 -1
- data/lib/mongo/address.rb +23 -8
- data/lib/mongo/address/ipv4.rb +5 -5
- data/lib/mongo/address/ipv6.rb +5 -5
- data/lib/mongo/address/unix.rb +3 -3
- data/lib/mongo/auth.rb +1 -1
- data/lib/mongo/auth/cr.rb +1 -1
- data/lib/mongo/auth/ldap.rb +1 -1
- data/lib/mongo/auth/roles.rb +1 -1
- data/lib/mongo/auth/user.rb +1 -1
- data/lib/mongo/auth/user/view.rb +1 -1
- data/lib/mongo/auth/x509.rb +1 -1
- data/lib/mongo/bson.rb +1 -1
- data/lib/mongo/bulk_write.rb +1 -1
- data/lib/mongo/bulk_write/combineable.rb +1 -1
- data/lib/mongo/bulk_write/ordered_combiner.rb +1 -1
- data/lib/mongo/bulk_write/result.rb +1 -1
- data/lib/mongo/bulk_write/result_combiner.rb +1 -1
- data/lib/mongo/bulk_write/transformable.rb +1 -1
- data/lib/mongo/bulk_write/unordered_combiner.rb +1 -1
- data/lib/mongo/bulk_write/validatable.rb +1 -1
- data/lib/mongo/client.rb +1 -1
- data/lib/mongo/cluster.rb +2 -2
- data/lib/mongo/cluster/topology.rb +1 -1
- data/lib/mongo/cluster/topology/replica_set.rb +1 -1
- data/lib/mongo/cluster/topology/sharded.rb +1 -1
- data/lib/mongo/cluster/topology/single.rb +1 -1
- data/lib/mongo/cluster/topology/unknown.rb +1 -1
- data/lib/mongo/collection.rb +1 -1
- data/lib/mongo/collection/view.rb +1 -1
- data/lib/mongo/collection/view/aggregation.rb +1 -1
- data/lib/mongo/collection/view/builder.rb +1 -1
- data/lib/mongo/collection/view/builder/aggregation.rb +3 -2
- data/lib/mongo/collection/view/builder/find_command.rb +1 -1
- data/lib/mongo/collection/view/builder/flags.rb +1 -1
- data/lib/mongo/collection/view/builder/map_reduce.rb +1 -1
- data/lib/mongo/collection/view/builder/modifiers.rb +1 -1
- data/lib/mongo/collection/view/builder/op_query.rb +1 -1
- data/lib/mongo/collection/view/explainable.rb +1 -1
- data/lib/mongo/collection/view/immutable.rb +1 -1
- data/lib/mongo/collection/view/iterable.rb +1 -1
- data/lib/mongo/collection/view/map_reduce.rb +1 -1
- data/lib/mongo/collection/view/readable.rb +1 -1
- data/lib/mongo/collection/view/writable.rb +1 -1
- data/lib/mongo/cursor.rb +1 -1
- data/lib/mongo/cursor/builder.rb +1 -1
- data/lib/mongo/cursor/builder/get_more_command.rb +1 -1
- data/lib/mongo/cursor/builder/kill_cursors_command.rb +1 -1
- data/lib/mongo/cursor/builder/op_get_more.rb +1 -1
- data/lib/mongo/cursor/builder/op_kill_cursors.rb +1 -1
- data/lib/mongo/database.rb +1 -1
- data/lib/mongo/database/view.rb +1 -1
- data/lib/mongo/dbref.rb +1 -1
- data/lib/mongo/error.rb +1 -1
- data/lib/mongo/error/bulk_write_error.rb +1 -1
- data/lib/mongo/error/closed_stream.rb +1 -1
- data/lib/mongo/error/extra_file_chunk.rb +1 -1
- data/lib/mongo/error/file_not_found.rb +1 -1
- data/lib/mongo/error/invalid_bulk_operation.rb +1 -1
- data/lib/mongo/error/invalid_bulk_operation_type.rb +1 -1
- data/lib/mongo/error/invalid_collection_name.rb +1 -1
- data/lib/mongo/error/invalid_database_name.rb +1 -1
- data/lib/mongo/error/invalid_document.rb +1 -1
- data/lib/mongo/error/invalid_file.rb +1 -1
- data/lib/mongo/error/invalid_file_revision.rb +1 -1
- data/lib/mongo/error/invalid_min_pool_size.rb +1 -1
- data/lib/mongo/error/invalid_nonce.rb +1 -1
- data/lib/mongo/error/invalid_replacement_document.rb +1 -1
- data/lib/mongo/error/invalid_server_preference.rb +1 -1
- data/lib/mongo/error/invalid_signature.rb +1 -1
- data/lib/mongo/error/invalid_update_document.rb +1 -1
- data/lib/mongo/error/invalid_uri.rb +1 -1
- data/lib/mongo/error/invalid_write_concern.rb +1 -1
- data/lib/mongo/error/max_bson_size.rb +1 -1
- data/lib/mongo/error/max_message_size.rb +1 -1
- data/lib/mongo/error/missing_file_chunk.rb +1 -1
- data/lib/mongo/error/multi_index_drop.rb +1 -1
- data/lib/mongo/error/need_primary_server.rb +1 -1
- data/lib/mongo/error/no_server_available.rb +1 -1
- data/lib/mongo/error/operation_failure.rb +1 -1
- data/lib/mongo/error/parser.rb +1 -1
- data/lib/mongo/error/socket_error.rb +1 -1
- data/lib/mongo/error/socket_timeout_error.rb +1 -1
- data/lib/mongo/error/unchangeable_collection_option.rb +1 -1
- data/lib/mongo/error/unexpected_chunk_length.rb +1 -1
- data/lib/mongo/error/unexpected_response.rb +1 -1
- data/lib/mongo/error/unsupported_collation.rb +1 -1
- data/lib/mongo/error/unsupported_features.rb +1 -1
- data/lib/mongo/event.rb +1 -1
- data/lib/mongo/event/description_changed.rb +1 -1
- data/lib/mongo/event/publisher.rb +1 -1
- data/lib/mongo/event/subscriber.rb +1 -1
- data/lib/mongo/grid.rb +1 -1
- data/lib/mongo/grid/file.rb +1 -1
- data/lib/mongo/grid/file/chunk.rb +1 -1
- data/lib/mongo/grid/file/info.rb +1 -1
- data/lib/mongo/grid/fs_bucket.rb +1 -1
- data/lib/mongo/grid/stream.rb +1 -1
- data/lib/mongo/grid/stream/read.rb +1 -1
- data/lib/mongo/grid/stream/write.rb +1 -1
- data/lib/mongo/index.rb +1 -1
- data/lib/mongo/index/view.rb +1 -1
- data/lib/mongo/loggable.rb +1 -1
- data/lib/mongo/logger.rb +1 -1
- data/lib/mongo/monitoring.rb +1 -1
- data/lib/mongo/operation.rb +1 -1
- data/lib/mongo/operation/commands.rb +1 -1
- data/lib/mongo/operation/commands/aggregate.rb +1 -1
- data/lib/mongo/operation/commands/aggregate/result.rb +1 -1
- data/lib/mongo/operation/commands/collections_info.rb +1 -1
- data/lib/mongo/operation/commands/collections_info/result.rb +1 -1
- data/lib/mongo/operation/commands/command.rb +1 -1
- data/lib/mongo/operation/commands/create.rb +1 -1
- data/lib/mongo/operation/commands/drop.rb +1 -1
- data/lib/mongo/operation/commands/drop_database.rb +1 -1
- data/lib/mongo/operation/commands/indexes.rb +1 -1
- data/lib/mongo/operation/commands/list_collections.rb +1 -1
- data/lib/mongo/operation/commands/list_collections/result.rb +1 -1
- data/lib/mongo/operation/commands/list_indexes.rb +1 -1
- data/lib/mongo/operation/commands/list_indexes/result.rb +1 -1
- data/lib/mongo/operation/commands/map_reduce.rb +1 -1
- data/lib/mongo/operation/commands/map_reduce/result.rb +1 -1
- data/lib/mongo/operation/commands/user_query.rb +1 -1
- data/lib/mongo/operation/commands/users_info.rb +1 -1
- data/lib/mongo/operation/commands/users_info/result.rb +1 -1
- data/lib/mongo/operation/executable.rb +1 -1
- data/lib/mongo/operation/kill_cursors.rb +1 -1
- data/lib/mongo/operation/limited.rb +1 -1
- data/lib/mongo/operation/read.rb +1 -1
- data/lib/mongo/operation/read/get_more.rb +1 -1
- data/lib/mongo/operation/read/query.rb +1 -1
- data/lib/mongo/operation/read/query/result.rb +1 -1
- data/lib/mongo/operation/read_preference.rb +1 -1
- data/lib/mongo/operation/result.rb +1 -1
- data/lib/mongo/operation/specifiable.rb +1 -1
- data/lib/mongo/operation/takes_write_concern.rb +1 -1
- data/lib/mongo/operation/write.rb +1 -1
- data/lib/mongo/operation/write/bulk.rb +1 -1
- data/lib/mongo/operation/write/bulk/bulkable.rb +1 -1
- data/lib/mongo/operation/write/bulk/delete.rb +1 -1
- data/lib/mongo/operation/write/bulk/delete/result.rb +1 -1
- data/lib/mongo/operation/write/bulk/insert.rb +1 -1
- data/lib/mongo/operation/write/bulk/insert/result.rb +1 -1
- data/lib/mongo/operation/write/bulk/legacy_mergable.rb +1 -1
- data/lib/mongo/operation/write/bulk/mergable.rb +1 -1
- data/lib/mongo/operation/write/bulk/update.rb +1 -1
- data/lib/mongo/operation/write/bulk/update/result.rb +1 -1
- data/lib/mongo/operation/write/command.rb +1 -1
- data/lib/mongo/operation/write/command/create_index.rb +1 -1
- data/lib/mongo/operation/write/command/create_user.rb +1 -1
- data/lib/mongo/operation/write/command/delete.rb +1 -1
- data/lib/mongo/operation/write/command/drop_index.rb +1 -1
- data/lib/mongo/operation/write/command/insert.rb +1 -1
- data/lib/mongo/operation/write/command/remove_user.rb +1 -1
- data/lib/mongo/operation/write/command/update.rb +1 -1
- data/lib/mongo/operation/write/command/update_user.rb +1 -1
- data/lib/mongo/operation/write/command/writable.rb +1 -1
- data/lib/mongo/operation/write/create_index.rb +1 -1
- data/lib/mongo/operation/write/create_user.rb +1 -1
- data/lib/mongo/operation/write/delete.rb +1 -1
- data/lib/mongo/operation/write/delete/result.rb +1 -1
- data/lib/mongo/operation/write/drop_index.rb +1 -1
- data/lib/mongo/operation/write/gle.rb +1 -1
- data/lib/mongo/operation/write/idable.rb +1 -1
- data/lib/mongo/operation/write/insert.rb +1 -1
- data/lib/mongo/operation/write/insert/result.rb +1 -1
- data/lib/mongo/operation/write/remove_user.rb +1 -1
- data/lib/mongo/operation/write/update.rb +1 -1
- data/lib/mongo/operation/write/update/result.rb +1 -1
- data/lib/mongo/operation/write/update_user.rb +1 -1
- data/lib/mongo/operation/write/write_command_enabled.rb +1 -1
- data/lib/mongo/protocol/bit_vector.rb +1 -1
- data/lib/mongo/protocol/delete.rb +1 -1
- data/lib/mongo/protocol/get_more.rb +1 -1
- data/lib/mongo/protocol/insert.rb +1 -1
- data/lib/mongo/protocol/kill_cursors.rb +1 -1
- data/lib/mongo/protocol/message.rb +1 -1
- data/lib/mongo/protocol/query.rb +2 -2
- data/lib/mongo/protocol/reply.rb +1 -1
- data/lib/mongo/protocol/serializers.rb +1 -1
- data/lib/mongo/protocol/update.rb +1 -1
- data/lib/mongo/server.rb +6 -1
- data/lib/mongo/server/connectable.rb +1 -13
- data/lib/mongo/server/connection.rb +17 -3
- data/lib/mongo/server/connection_pool.rb +1 -1
- data/lib/mongo/server/connection_pool/queue.rb +1 -1
- data/lib/mongo/server/context.rb +1 -1
- data/lib/mongo/server/description.rb +2 -2
- data/lib/mongo/server/description/features.rb +1 -1
- data/lib/mongo/server/description/inspector/description_changed.rb +1 -1
- data/lib/mongo/server/monitor.rb +1 -1
- data/lib/mongo/server/monitor/connection.rb +15 -9
- data/lib/mongo/server_selector.rb +1 -1
- data/lib/mongo/server_selector/nearest.rb +1 -1
- data/lib/mongo/server_selector/primary.rb +1 -1
- data/lib/mongo/server_selector/primary_preferred.rb +1 -1
- data/lib/mongo/server_selector/secondary.rb +1 -1
- data/lib/mongo/server_selector/secondary_preferred.rb +1 -1
- data/lib/mongo/server_selector/selectable.rb +1 -1
- data/lib/mongo/socket.rb +1 -1
- data/lib/mongo/socket/ssl.rb +4 -4
- data/lib/mongo/socket/tcp.rb +4 -4
- data/lib/mongo/socket/unix.rb +3 -3
- data/lib/mongo/uri.rb +1 -1
- data/lib/mongo/version.rb +2 -2
- data/lib/mongo/write_concern/acknowledged.rb +1 -1
- data/lib/mongo/write_concern/normalizable.rb +1 -1
- data/lib/mongo/write_concern/unacknowledged.rb +1 -1
- data/mongo.gemspec +0 -1
- data/spec/mongo/address_spec.rb +8 -7
- data/spec/mongo/client_spec.rb +1 -1
- data/spec/mongo/collection/view/aggregation_spec.rb +11 -0
- data/spec/mongo/collection_spec.rb +11 -0
- data/spec/mongo/server/connection_spec.rb +108 -2
- data/spec/mongo/server/description_spec.rb +5 -1
- data/spec/mongo/server/monitor/connection_spec.rb +116 -0
- data/spec/mongo/socket/ssl_spec.rb +14 -12
- data/spec/support/authorization.rb +4 -2
- data/spec/support/command_monitoring.rb +1 -1
- data/spec/support/connection_string.rb +1 -1
- data/spec/support/connection_string_tests/invalid-uris.yml +32 -0
- data/spec/support/connection_string_tests/valid-auth.yml +4 -19
- data/spec/support/connection_string_tests/valid-db-with-dotted-name.yml +77 -0
- data/spec/support/connection_string_tests/valid-options.yml +0 -13
- data/spec/support/connection_string_tests/valid-unix_socket-absolute.yml +6 -6
- data/spec/support/connection_string_tests/valid-unix_socket-relative.yml +4 -4
- data/spec/support/crud.rb +1 -1
- data/spec/support/crud/read.rb +3 -3
- data/spec/support/crud/write.rb +8 -3
- data/spec/support/gridfs.rb +1 -1
- metadata +6 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d433224b22b9fef9861385a7aa3bb1152c688e3
|
4
|
+
data.tar.gz: c238f0884125f4ec1b3a70b3f051fd0ad61e6d51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 898d76cdc7e59033be68aabae3f8591397577e8d15286de25f07327803c42581febbf40a874303766fdc204f5d617523e46f46e663e9b5d8567b34f96a87fd96
|
7
|
+
data.tar.gz: 71d59dd4c289346aedf2bf9e9ad0161f4a98830ee70cadc9d6c45be47eda5c84bc41bde1d261d2d53230fd82350c2bc2d16409656da84e5faaab23660b4190ed
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/LICENSE
CHANGED
@@ -175,7 +175,7 @@
|
|
175
175
|
|
176
176
|
END OF TERMS AND CONDITIONS
|
177
177
|
|
178
|
-
Copyright (C) 2009-
|
178
|
+
Copyright (C) 2009-2017 MongoDB, Inc.
|
179
179
|
|
180
180
|
Licensed under the Apache License, Version 2.0 (the "License");
|
181
181
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
@@ -63,7 +63,7 @@ Full release notes and release history are available [here](https://github.com/m
|
|
63
63
|
License
|
64
64
|
-----
|
65
65
|
|
66
|
-
Copyright (C) 2009-
|
66
|
+
Copyright (C) 2009-2017 MongoDB, Inc.
|
67
67
|
|
68
68
|
Licensed under the Apache License, Version 2.0 (the "License");
|
69
69
|
you may not use this file except in compliance with the License.
|
data/lib/mongo.rb
CHANGED
data/lib/mongo/address.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2014-
|
1
|
+
# Copyright (C) 2014-2017 MongoDB, Inc.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the 'License');
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -119,6 +119,7 @@ module Mongo
|
|
119
119
|
def initialize(seed, options = {})
|
120
120
|
@seed = seed
|
121
121
|
@host, @port = parse_host_port
|
122
|
+
@options = options
|
122
123
|
end
|
123
124
|
|
124
125
|
# Get a pretty printed address inspection.
|
@@ -138,15 +139,15 @@ module Mongo
|
|
138
139
|
# @example Get a socket.
|
139
140
|
# address.socket(5, :ssl => true)
|
140
141
|
#
|
141
|
-
# @param [ Float ]
|
142
|
+
# @param [ Float ] socket_timeout The socket timeout.
|
142
143
|
# @param [ Hash ] ssl_options SSL options.
|
143
144
|
#
|
144
145
|
# @return [ Pool::Socket::SSL, Pool::Socket::TCP, Pool::Socket::Unix ] The socket.
|
145
146
|
#
|
146
147
|
# @since 2.0.0
|
147
|
-
def socket(
|
148
|
-
@resolver ||= initialize_resolver!(
|
149
|
-
@resolver.socket(
|
148
|
+
def socket(socket_timeout, ssl_options = {})
|
149
|
+
@resolver ||= initialize_resolver!(ssl_options)
|
150
|
+
@resolver.socket(socket_timeout, ssl_options)
|
150
151
|
end
|
151
152
|
|
152
153
|
# Get the address as a string.
|
@@ -161,9 +162,23 @@ module Mongo
|
|
161
162
|
port ? "#{host}:#{port}" : host
|
162
163
|
end
|
163
164
|
|
165
|
+
# Connect a socket.
|
166
|
+
#
|
167
|
+
# @example Connect a socket.
|
168
|
+
# address.connect_socket!(socket)
|
169
|
+
#
|
170
|
+
# @since 2.4.3
|
171
|
+
def connect_socket!(socket)
|
172
|
+
socket.connect!(connect_timeout)
|
173
|
+
end
|
174
|
+
|
164
175
|
private
|
165
176
|
|
166
|
-
def
|
177
|
+
def connect_timeout
|
178
|
+
@connect_timeout ||= @options[:connect_timeout] || Server::CONNECT_TIMEOUT
|
179
|
+
end
|
180
|
+
|
181
|
+
def initialize_resolver!(ssl_options)
|
167
182
|
return Unix.new(seed.downcase) if seed.downcase =~ Unix::MATCH
|
168
183
|
|
169
184
|
family = (host == LOCALHOST) ? ::Socket::AF_INET : ::Socket::AF_UNSPEC
|
@@ -171,9 +186,9 @@ module Mongo
|
|
171
186
|
::Socket.getaddrinfo(host, nil, family, ::Socket::SOCK_STREAM).each do |info|
|
172
187
|
begin
|
173
188
|
res = FAMILY_MAP[info[4]].new(info[3], port, host)
|
174
|
-
res.socket(
|
189
|
+
res.socket(connect_timeout, ssl_options).connect!(connect_timeout).close
|
175
190
|
return res
|
176
|
-
rescue IOError, SystemCallError, Error::SocketError => e
|
191
|
+
rescue IOError, SystemCallError, Error::SocketTimeoutError, Error::SocketError => e
|
177
192
|
error = e
|
178
193
|
end
|
179
194
|
end
|
data/lib/mongo/address/ipv4.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2014-
|
1
|
+
# Copyright (C) 2014-2017 MongoDB, Inc.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the 'License');
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -77,17 +77,17 @@ module Mongo
|
|
77
77
|
# @example Get an IPv4 socket.
|
78
78
|
# ipv4.socket(5, :ssl => true)
|
79
79
|
#
|
80
|
-
# @param [ Float ]
|
80
|
+
# @param [ Float ] socket_timeout The socket timeout.
|
81
81
|
# @param [ Hash ] ssl_options SSL options.
|
82
82
|
#
|
83
83
|
# @return [ Pool::Socket::SSL, Pool::Socket::TCP ] The socket.
|
84
84
|
#
|
85
85
|
# @since 2.0.0
|
86
|
-
def socket(
|
86
|
+
def socket(socket_timeout, ssl_options = {})
|
87
87
|
unless ssl_options.empty?
|
88
|
-
Socket::SSL.new(host, port, host_name,
|
88
|
+
Socket::SSL.new(host, port, host_name, socket_timeout, Socket::PF_INET, ssl_options)
|
89
89
|
else
|
90
|
-
Socket::TCP.new(host, port,
|
90
|
+
Socket::TCP.new(host, port, socket_timeout, Socket::PF_INET)
|
91
91
|
end
|
92
92
|
end
|
93
93
|
end
|
data/lib/mongo/address/ipv6.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2014-
|
1
|
+
# Copyright (C) 2014-2017 MongoDB, Inc.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the 'License');
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -72,17 +72,17 @@ module Mongo
|
|
72
72
|
# @example Get an IPv6 socket.
|
73
73
|
# ipv4.socket(5, :ssl => true)
|
74
74
|
#
|
75
|
-
# @param [ Float ]
|
75
|
+
# @param [ Float ] socket_timeout The socket timeout.
|
76
76
|
# @param [ Hash ] ssl_options SSL options.
|
77
77
|
#
|
78
78
|
# @return [ Pool::Socket::SSL, Pool::Socket::TCP ] The socket.
|
79
79
|
#
|
80
80
|
# @since 2.0.0
|
81
|
-
def socket(
|
81
|
+
def socket(socket_timeout, ssl_options = {})
|
82
82
|
unless ssl_options.empty?
|
83
|
-
Socket::SSL.new(host, port, host_name,
|
83
|
+
Socket::SSL.new(host, port, host_name, socket_timeout, Socket::PF_INET6, ssl_options)
|
84
84
|
else
|
85
|
-
Socket::TCP.new(host, port,
|
85
|
+
Socket::TCP.new(host, port, socket_timeout, Socket::PF_INET6)
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
data/lib/mongo/address/unix.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2014-
|
1
|
+
# Copyright (C) 2014-2017 MongoDB, Inc.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the 'License');
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -68,8 +68,8 @@ module Mongo
|
|
68
68
|
# @return [ Pool::Socket::Unix ] The socket.
|
69
69
|
#
|
70
70
|
# @since 2.0.0
|
71
|
-
def socket(
|
72
|
-
Socket::Unix.new(host,
|
71
|
+
def socket(socket_timeout, ssl_options = {})
|
72
|
+
Socket::Unix.new(host, socket_timeout)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
end
|
data/lib/mongo/auth.rb
CHANGED
data/lib/mongo/auth/cr.rb
CHANGED
data/lib/mongo/auth/ldap.rb
CHANGED
data/lib/mongo/auth/roles.rb
CHANGED
data/lib/mongo/auth/user.rb
CHANGED
data/lib/mongo/auth/user/view.rb
CHANGED
data/lib/mongo/auth/x509.rb
CHANGED
data/lib/mongo/bson.rb
CHANGED
data/lib/mongo/bulk_write.rb
CHANGED
data/lib/mongo/client.rb
CHANGED
data/lib/mongo/cluster.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2014-
|
1
|
+
# Copyright (C) 2014-2017 MongoDB, Inc.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -96,7 +96,7 @@ module Mongo
|
|
96
96
|
#
|
97
97
|
# @since 2.0.0
|
98
98
|
def add(host)
|
99
|
-
address = Address.new(host)
|
99
|
+
address = Address.new(host, options)
|
100
100
|
if !addresses.include?(address)
|
101
101
|
if addition_allowed?(address)
|
102
102
|
@update_lock.synchronize { @addresses.push(address) }
|
data/lib/mongo/collection.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015-
|
1
|
+
# Copyright (C) 2015-2017 MongoDB, Inc.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -31,7 +31,8 @@ module Mongo
|
|
31
31
|
:max_time_ms => 'maxTimeMS',
|
32
32
|
:explain => 'explain',
|
33
33
|
:bypass_document_validation => 'bypassDocumentValidation',
|
34
|
-
:collation => 'collation'
|
34
|
+
:collation => 'collation',
|
35
|
+
:hint => 'hint'
|
35
36
|
).freeze
|
36
37
|
|
37
38
|
def_delegators :@view, :collection, :database, :read, :write_concern
|