mongo 2.3.1 → 2.4.0.rc0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +2 -3
  4. data/lib/mongo/bulk_write.rb +8 -7
  5. data/lib/mongo/bulk_write/combineable.rb +4 -0
  6. data/lib/mongo/bulk_write/transformable.rb +17 -5
  7. data/lib/mongo/bulk_write/validatable.rb +1 -0
  8. data/lib/mongo/client.rb +3 -0
  9. data/lib/mongo/cluster.rb +8 -0
  10. data/lib/mongo/cluster/app_metadata.rb +135 -0
  11. data/lib/mongo/collection.rb +42 -10
  12. data/lib/mongo/collection/view.rb +15 -1
  13. data/lib/mongo/collection/view/aggregation.rb +5 -0
  14. data/lib/mongo/collection/view/builder/aggregation.rb +13 -3
  15. data/lib/mongo/collection/view/builder/find_command.rb +7 -21
  16. data/lib/mongo/collection/view/builder/map_reduce.rb +22 -5
  17. data/lib/mongo/collection/view/iterable.rb +1 -0
  18. data/lib/mongo/collection/view/map_reduce.rb +5 -0
  19. data/lib/mongo/collection/view/readable.rb +35 -14
  20. data/lib/mongo/collection/view/writable.rb +54 -23
  21. data/lib/mongo/cursor/builder/get_more_command.rb +2 -3
  22. data/lib/mongo/database.rb +10 -2
  23. data/lib/mongo/error.rb +2 -0
  24. data/lib/mongo/error/invalid_application_name.rb +38 -0
  25. data/lib/mongo/error/invalid_server_preference.rb +24 -3
  26. data/lib/mongo/error/unsupported_collation.rb +51 -0
  27. data/lib/mongo/index/view.rb +28 -15
  28. data/lib/mongo/operation.rb +6 -0
  29. data/lib/mongo/operation/commands.rb +3 -0
  30. data/lib/mongo/operation/commands/aggregate.rb +10 -10
  31. data/lib/mongo/operation/commands/create.rb +45 -0
  32. data/lib/mongo/operation/commands/drop.rb +45 -0
  33. data/lib/mongo/operation/commands/drop_database.rb +45 -0
  34. data/lib/mongo/operation/commands/map_reduce.rb +12 -1
  35. data/lib/mongo/operation/commands/parallel_scan.rb +1 -0
  36. data/lib/mongo/operation/read_preference.rb +9 -9
  37. data/lib/mongo/operation/specifiable.rb +34 -0
  38. data/lib/mongo/operation/takes_write_concern.rb +35 -0
  39. data/lib/mongo/operation/write/bulk/bulkable.rb +1 -1
  40. data/lib/mongo/operation/write/command/create_index.rb +6 -0
  41. data/lib/mongo/operation/write/command/drop_index.rb +6 -0
  42. data/lib/mongo/operation/write/command/insert.rb +1 -1
  43. data/lib/mongo/operation/write/command/update.rb +1 -0
  44. data/lib/mongo/operation/write/command/writable.rb +2 -2
  45. data/lib/mongo/operation/write/create_index.rb +2 -2
  46. data/lib/mongo/operation/write/create_user.rb +1 -1
  47. data/lib/mongo/operation/write/delete.rb +5 -1
  48. data/lib/mongo/operation/write/gle.rb +1 -1
  49. data/lib/mongo/operation/write/insert.rb +2 -2
  50. data/lib/mongo/operation/write/remove_user.rb +1 -1
  51. data/lib/mongo/operation/write/update.rb +5 -1
  52. data/lib/mongo/operation/write/update_user.rb +1 -1
  53. data/lib/mongo/operation/write/write_command_enabled.rb +10 -2
  54. data/lib/mongo/protocol/insert.rb +1 -2
  55. data/lib/mongo/protocol/query.rb +3 -7
  56. data/lib/mongo/server.rb +8 -3
  57. data/lib/mongo/server/connection.rb +17 -11
  58. data/lib/mongo/server/description.rb +22 -0
  59. data/lib/mongo/server/description/features.rb +2 -0
  60. data/lib/mongo/server/monitor.rb +5 -0
  61. data/lib/mongo/server/monitor/connection.rb +11 -0
  62. data/lib/mongo/server_selector/nearest.rb +9 -6
  63. data/lib/mongo/server_selector/primary.rb +4 -0
  64. data/lib/mongo/server_selector/primary_preferred.rb +7 -1
  65. data/lib/mongo/server_selector/secondary.rb +5 -0
  66. data/lib/mongo/server_selector/secondary_preferred.rb +7 -2
  67. data/lib/mongo/server_selector/selectable.rb +57 -10
  68. data/lib/mongo/socket/ssl.rb +1 -0
  69. data/lib/mongo/uri.rb +4 -0
  70. data/lib/mongo/version.rb +1 -1
  71. data/lib/mongo/write_concern.rb +1 -0
  72. data/mongo.gemspec +1 -1
  73. data/spec/mongo/auth/cr_spec.rb +7 -1
  74. data/spec/mongo/auth/ldap_spec.rb +7 -1
  75. data/spec/mongo/auth/scram_spec.rb +7 -1
  76. data/spec/mongo/auth/x509_spec.rb +7 -1
  77. data/spec/mongo/bulk_write_spec.rb +598 -5
  78. data/spec/mongo/client_spec.rb +47 -1
  79. data/spec/mongo/cluster/app_metadata_spec.rb +104 -0
  80. data/spec/mongo/cluster/topology/replica_set_spec.rb +14 -8
  81. data/spec/mongo/cluster/topology/sharded_spec.rb +9 -3
  82. data/spec/mongo/cluster/topology/single_spec.rb +10 -4
  83. data/spec/mongo/cluster_spec.rb +29 -0
  84. data/spec/mongo/collection/view/aggregation_spec.rb +139 -0
  85. data/spec/mongo/collection/view/builder/find_command_spec.rb +6 -243
  86. data/spec/mongo/collection/view/map_reduce_spec.rb +104 -0
  87. data/spec/mongo/collection/view/readable_spec.rb +83 -0
  88. data/spec/mongo/collection/view/writable_spec.rb +447 -1
  89. data/spec/mongo/collection/view_spec.rb +57 -0
  90. data/spec/mongo/collection_spec.rb +926 -101
  91. data/spec/mongo/crud_spec.rb +4 -5
  92. data/spec/mongo/database_spec.rb +99 -1
  93. data/spec/mongo/index/view_spec.rb +360 -31
  94. data/spec/mongo/max_staleness_spec.rb +108 -0
  95. data/spec/mongo/operation/read_preference_spec.rb +8 -8
  96. data/spec/mongo/operation/write/command/delete_spec.rb +1 -1
  97. data/spec/mongo/operation/write/command/insert_spec.rb +1 -1
  98. data/spec/mongo/operation/write/command/update_spec.rb +1 -1
  99. data/spec/mongo/server/connection_pool_spec.rb +3 -1
  100. data/spec/mongo/server/connection_spec.rb +17 -7
  101. data/spec/mongo/server/description/features_spec.rb +50 -0
  102. data/spec/mongo/server/description_spec.rb +9 -3
  103. data/spec/mongo/server_selection_spec.rb +5 -3
  104. data/spec/mongo/server_selector/nearest_spec.rb +73 -0
  105. data/spec/mongo/server_selector/primary_preferred_spec.rb +73 -0
  106. data/spec/mongo/server_selector/primary_spec.rb +36 -0
  107. data/spec/mongo/server_selector/secondary_preferred_spec.rb +73 -0
  108. data/spec/mongo/server_selector/secondary_spec.rb +73 -0
  109. data/spec/mongo/server_selector_spec.rb +53 -0
  110. data/spec/mongo/server_spec.rb +3 -1
  111. data/spec/mongo/uri_spec.rb +54 -0
  112. data/spec/mongo/write_concern_spec.rb +18 -0
  113. data/spec/spec_helper.rb +10 -0
  114. data/spec/support/authorization.rb +8 -1
  115. data/spec/support/crud.rb +15 -0
  116. data/spec/support/crud/read.rb +27 -19
  117. data/spec/support/crud/write.rb +28 -3
  118. data/spec/support/crud_tests/read/aggregate.yml +15 -3
  119. data/spec/support/crud_tests/read/count.yml +14 -3
  120. data/spec/support/crud_tests/read/distinct.yml +13 -1
  121. data/spec/support/crud_tests/read/find.yml +12 -2
  122. data/spec/support/crud_tests/write/deleteMany.yml +22 -1
  123. data/spec/support/crud_tests/write/deleteOne.yml +20 -1
  124. data/spec/support/crud_tests/write/findOneAndDelete.yml +27 -2
  125. data/spec/support/crud_tests/write/findOneAndReplace.yml +43 -14
  126. data/spec/support/crud_tests/write/findOneAndUpdate.yml +50 -8
  127. data/spec/support/crud_tests/write/replaceOne.yml +34 -10
  128. data/spec/support/crud_tests/write/updateMany.yml +42 -11
  129. data/spec/support/crud_tests/write/updateOne.yml +32 -7
  130. data/spec/support/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml +26 -0
  131. data/spec/support/max_staleness/ReplicaSetNoPrimary/Incompatible.yml +25 -0
  132. data/spec/support/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.yml +33 -0
  133. data/spec/support/max_staleness/ReplicaSetNoPrimary/Nearest.yml +33 -0
  134. data/spec/support/max_staleness/ReplicaSetNoPrimary/Nearest2.yml +33 -0
  135. data/spec/support/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml +27 -0
  136. data/spec/support/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.yml +36 -0
  137. data/spec/support/max_staleness/ReplicaSetNoPrimary/Secondary.yml +51 -0
  138. data/spec/support/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.yml +26 -0
  139. data/spec/support/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.yml +51 -0
  140. data/spec/support/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.yml +26 -0
  141. data/spec/support/max_staleness/ReplicaSetWithPrimary/Incompatible.yml +25 -0
  142. data/spec/support/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.yml +35 -0
  143. data/spec/support/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml +25 -0
  144. data/spec/support/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.yml +23 -0
  145. data/spec/support/max_staleness/ReplicaSetWithPrimary/Nearest.yml +33 -0
  146. data/spec/support/max_staleness/ReplicaSetWithPrimary/Nearest2.yml +33 -0
  147. data/spec/support/max_staleness/ReplicaSetWithPrimary/Nearest_tags.yml +36 -0
  148. data/spec/support/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.yml +27 -0
  149. data/spec/support/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred_incompatible.yml +27 -0
  150. data/spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.yml +26 -0
  151. data/spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.yml +59 -0
  152. data/spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.yml +43 -0
  153. data/spec/support/max_staleness/ReplicaSetWithPrimary/Secondary_tags.yml +59 -0
  154. data/spec/support/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.yml +43 -0
  155. data/spec/support/max_staleness/ReplicaSetWithPrimary/ShortHeartbeartShortMaxStaleness.yml +29 -0
  156. data/spec/support/max_staleness/ReplicaSetWithPrimary/ShortHeartbeartShortMaxStaleness2.yml +29 -0
  157. data/spec/support/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.yml +27 -0
  158. data/spec/support/max_staleness/Sharded/Incompatible.yml +25 -0
  159. data/spec/support/max_staleness/Sharded/SmallMaxStaleness.yml +20 -0
  160. data/spec/support/max_staleness/Single/Incompatible.yml +18 -0
  161. data/spec/support/max_staleness/Single/SmallMaxStaleness.yml +20 -0
  162. data/spec/support/server_selection.rb +25 -0
  163. data/spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml +27 -0
  164. data/spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.yml +31 -0
  165. data/spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.yml +31 -0
  166. data/spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Nearest_multiple.yml +34 -0
  167. data/spec/support/server_selection/selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.yml +28 -0
  168. data/spec/support/shared/server_selector.rb +4 -3
  169. metadata +91 -6
  170. metadata.gz.sig +0 -0
@@ -0,0 +1,34 @@
1
+ ---
2
+ topology_description:
3
+ type: ReplicaSetWithPrimary
4
+ servers:
5
+ - &1
6
+ address: b:27017
7
+ avg_rtt_ms: 10
8
+ type: RSSecondary
9
+ tags:
10
+ data_center: nyc
11
+ - &3
12
+ address: c:27017
13
+ avg_rtt_ms: 100
14
+ type: RSSecondary
15
+ tags:
16
+ data_center: nyc
17
+ - &2
18
+ address: a:27017
19
+ avg_rtt_ms: 20
20
+ type: RSPrimary
21
+ tags:
22
+ data_center: nyc
23
+ operation: read
24
+ read_preference:
25
+ mode: Nearest
26
+ tag_sets:
27
+ - data_center: nyc
28
+ suitable_servers:
29
+ - *1
30
+ - *2
31
+ - *3
32
+ in_latency_window:
33
+ - *1
34
+ - *2
@@ -0,0 +1,28 @@
1
+ # Attempt to select the secondary, except its tag doesn't match.
2
+ # Fall back to primary.
3
+ ---
4
+ topology_description:
5
+ type: ReplicaSetWithPrimary
6
+ servers:
7
+ - &1
8
+ address: a:27017
9
+ avg_rtt_ms: 5
10
+ type: RSPrimary
11
+ tags:
12
+ data_center: nyc
13
+ - &2
14
+ address: b:27017
15
+ avg_rtt_ms: 5
16
+ type: RSSecondary
17
+ tags:
18
+ data_center: sf # No match.
19
+ operation: read
20
+ read_preference:
21
+ mode: SecondaryPreferred
22
+ tag_sets:
23
+ - data_center: nyc
24
+ suitable_servers:
25
+ - *1
26
+ in_latency_window:
27
+ - *1
28
+
@@ -23,6 +23,7 @@ end
23
23
 
24
24
  shared_context 'server selector' do
25
25
 
26
+ let(:max_staleness) { nil }
26
27
  let(:tag_sets) { [] }
27
28
  let(:tag_set) do
28
29
  { 'test' => 'tag' }
@@ -32,7 +33,7 @@ shared_context 'server selector' do
32
33
  end
33
34
  let(:primary) { make_server(:primary) }
34
35
  let(:secondary) { make_server(:secondary) }
35
- let(:options) { { :mode => name, :tag_sets => tag_sets } }
36
+ let(:options) { { :mode => name, :tag_sets => tag_sets, max_staleness: max_staleness } }
36
37
  let(:selector) { described_class.new(options) }
37
38
 
38
39
  before(:all) do
@@ -109,8 +110,8 @@ shared_examples 'a server selector mode' do
109
110
  context 'mode is different' do
110
111
 
111
112
  let(:other) do
112
- double('selectable').tap do |mode|
113
- allow(mode).to receive(:name).and_return(:other)
113
+ described_class.new.tap do |sel|
114
+ allow(sel).to receive(:name).and_return(:other_mode)
114
115
  end
115
116
  end
116
117
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.4.0.rc0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Brock
@@ -32,7 +32,7 @@ cert_chain:
32
32
  EhIn2f8suSc9QAqYt7w4T+PMtjxWTVcXs+Uy2PbDtjhtEBz6ZsP6YSsOpJbrCjCV
33
33
  wZtXjpRUvWz86V5vjhHCTE8fqfEb85aeDwUCckPzpio=
34
34
  -----END CERTIFICATE-----
35
- date: 2016-11-01 00:00:00.000000000 Z
35
+ date: 2016-09-19 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: bson
@@ -40,14 +40,14 @@ dependencies:
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '4.1'
43
+ version: 4.2.0.rc0
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: '4.1'
50
+ version: 4.2.0.rc0
51
51
  description: A Ruby driver for MongoDB
52
52
  email: mongodb-dev@googlegroups.com
53
53
  executables:
@@ -89,6 +89,7 @@ files:
89
89
  - lib/mongo/bulk_write/validatable.rb
90
90
  - lib/mongo/client.rb
91
91
  - lib/mongo/cluster.rb
92
+ - lib/mongo/cluster/app_metadata.rb
92
93
  - lib/mongo/cluster/cursor_reaper.rb
93
94
  - lib/mongo/cluster/topology.rb
94
95
  - lib/mongo/cluster/topology/replica_set.rb
@@ -125,6 +126,7 @@ files:
125
126
  - lib/mongo/error/closed_stream.rb
126
127
  - lib/mongo/error/extra_file_chunk.rb
127
128
  - lib/mongo/error/file_not_found.rb
129
+ - lib/mongo/error/invalid_application_name.rb
128
130
  - lib/mongo/error/invalid_bulk_operation.rb
129
131
  - lib/mongo/error/invalid_bulk_operation_type.rb
130
132
  - lib/mongo/error/invalid_collection_name.rb
@@ -152,6 +154,7 @@ files:
152
154
  - lib/mongo/error/unchangeable_collection_option.rb
153
155
  - lib/mongo/error/unexpected_chunk_length.rb
154
156
  - lib/mongo/error/unexpected_response.rb
157
+ - lib/mongo/error/unsupported_collation.rb
155
158
  - lib/mongo/error/unsupported_features.rb
156
159
  - lib/mongo/event.rb
157
160
  - lib/mongo/event/description_changed.rb
@@ -187,6 +190,9 @@ files:
187
190
  - lib/mongo/operation/commands/collections_info.rb
188
191
  - lib/mongo/operation/commands/collections_info/result.rb
189
192
  - lib/mongo/operation/commands/command.rb
193
+ - lib/mongo/operation/commands/create.rb
194
+ - lib/mongo/operation/commands/drop.rb
195
+ - lib/mongo/operation/commands/drop_database.rb
190
196
  - lib/mongo/operation/commands/find.rb
191
197
  - lib/mongo/operation/commands/find/result.rb
192
198
  - lib/mongo/operation/commands/get_more.rb
@@ -214,6 +220,7 @@ files:
214
220
  - lib/mongo/operation/read_preference.rb
215
221
  - lib/mongo/operation/result.rb
216
222
  - lib/mongo/operation/specifiable.rb
223
+ - lib/mongo/operation/takes_write_concern.rb
217
224
  - lib/mongo/operation/write.rb
218
225
  - lib/mongo/operation/write/bulk.rb
219
226
  - lib/mongo/operation/write/bulk/bulkable.rb
@@ -314,6 +321,7 @@ files:
314
321
  - spec/mongo/bulk_write/unordered_combiner_spec.rb
315
322
  - spec/mongo/bulk_write_spec.rb
316
323
  - spec/mongo/client_spec.rb
324
+ - spec/mongo/cluster/app_metadata_spec.rb
317
325
  - spec/mongo/cluster/cursor_reaper_spec.rb
318
326
  - spec/mongo/cluster/topology/replica_set_spec.rb
319
327
  - spec/mongo/cluster/topology/sharded_spec.rb
@@ -354,6 +362,7 @@ files:
354
362
  - spec/mongo/gridfs_spec.rb
355
363
  - spec/mongo/index/view_spec.rb
356
364
  - spec/mongo/logger_spec.rb
365
+ - spec/mongo/max_staleness_spec.rb
357
366
  - spec/mongo/monitoring/command_log_subscriber_spec.rb
358
367
  - spec/mongo/monitoring/event/command_started_spec.rb
359
368
  - spec/mongo/monitoring/event/command_succeeded_spec.rb
@@ -469,6 +478,38 @@ files:
469
478
  - spec/support/gridfs_tests/upload.yml
470
479
  - spec/support/helpers.rb
471
480
  - spec/support/matchers.rb
481
+ - spec/support/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml
482
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Incompatible.yml
483
+ - spec/support/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.yml
484
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Nearest.yml
485
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Nearest2.yml
486
+ - spec/support/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml
487
+ - spec/support/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.yml
488
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Secondary.yml
489
+ - spec/support/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.yml
490
+ - spec/support/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.yml
491
+ - spec/support/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.yml
492
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Incompatible.yml
493
+ - spec/support/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.yml
494
+ - spec/support/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml
495
+ - spec/support/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.yml
496
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Nearest.yml
497
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Nearest2.yml
498
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Nearest_tags.yml
499
+ - spec/support/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.yml
500
+ - spec/support/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred_incompatible.yml
501
+ - spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.yml
502
+ - spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.yml
503
+ - spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.yml
504
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Secondary_tags.yml
505
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.yml
506
+ - spec/support/max_staleness/ReplicaSetWithPrimary/ShortHeartbeartShortMaxStaleness.yml
507
+ - spec/support/max_staleness/ReplicaSetWithPrimary/ShortHeartbeartShortMaxStaleness2.yml
508
+ - spec/support/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.yml
509
+ - spec/support/max_staleness/Sharded/Incompatible.yml
510
+ - spec/support/max_staleness/Sharded/SmallMaxStaleness.yml
511
+ - spec/support/max_staleness/Single/Incompatible.yml
512
+ - spec/support/max_staleness/Single/SmallMaxStaleness.yml
472
513
  - spec/support/sdam/rs/discover_arbiters.yml
473
514
  - spec/support/sdam/rs/discover_passives.yml
474
515
  - spec/support/sdam/rs/discover_primary.yml
@@ -532,6 +573,7 @@ files:
532
573
  - spec/support/server_selection/rtt/value_test_4.yml
533
574
  - spec/support/server_selection/rtt/value_test_5.yml
534
575
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Nearest.yml
576
+ - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml
535
577
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml
536
578
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Primary.yml
537
579
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/PrimaryPreferred.yml
@@ -539,8 +581,11 @@ files:
539
581
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary.yml
540
582
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/SecondaryPreferred.yml
541
583
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.yml
584
+ - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.yml
585
+ - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.yml
542
586
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_non_matching.yml
543
587
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Nearest.yml
588
+ - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Nearest_multiple.yml
544
589
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Nearest_non_matching.yml
545
590
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Primary.yml
546
591
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/PrimaryPreferred.yml
@@ -548,6 +593,7 @@ files:
548
593
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Secondary.yml
549
594
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/SecondaryPreferred.yml
550
595
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.yml
596
+ - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.yml
551
597
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Secondary_non_matching.yml
552
598
  - spec/support/server_selection/selection/Sharded/read/SecondaryPreferred.yml
553
599
  - spec/support/server_selection/selection/Single/read/SecondaryPreferred.yml
@@ -571,9 +617,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
571
617
  version: '0'
572
618
  required_rubygems_version: !ruby/object:Gem::Requirement
573
619
  requirements:
574
- - - ">="
620
+ - - ">"
575
621
  - !ruby/object:Gem::Version
576
- version: '0'
622
+ version: 1.3.1
577
623
  requirements: []
578
624
  rubyforge_project:
579
625
  rubygems_version: 2.4.5.1
@@ -599,6 +645,7 @@ test_files:
599
645
  - spec/mongo/bulk_write/unordered_combiner_spec.rb
600
646
  - spec/mongo/bulk_write_spec.rb
601
647
  - spec/mongo/client_spec.rb
648
+ - spec/mongo/cluster/app_metadata_spec.rb
602
649
  - spec/mongo/cluster/cursor_reaper_spec.rb
603
650
  - spec/mongo/cluster/topology/replica_set_spec.rb
604
651
  - spec/mongo/cluster/topology/sharded_spec.rb
@@ -639,6 +686,7 @@ test_files:
639
686
  - spec/mongo/gridfs_spec.rb
640
687
  - spec/mongo/index/view_spec.rb
641
688
  - spec/mongo/logger_spec.rb
689
+ - spec/mongo/max_staleness_spec.rb
642
690
  - spec/mongo/monitoring/command_log_subscriber_spec.rb
643
691
  - spec/mongo/monitoring/event/command_started_spec.rb
644
692
  - spec/mongo/monitoring/event/command_succeeded_spec.rb
@@ -754,6 +802,38 @@ test_files:
754
802
  - spec/support/gridfs_tests/upload.yml
755
803
  - spec/support/helpers.rb
756
804
  - spec/support/matchers.rb
805
+ - spec/support/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.yml
806
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Incompatible.yml
807
+ - spec/support/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.yml
808
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Nearest.yml
809
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Nearest2.yml
810
+ - spec/support/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.yml
811
+ - spec/support/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.yml
812
+ - spec/support/max_staleness/ReplicaSetNoPrimary/Secondary.yml
813
+ - spec/support/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.yml
814
+ - spec/support/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.yml
815
+ - spec/support/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.yml
816
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Incompatible.yml
817
+ - spec/support/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.yml
818
+ - spec/support/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.yml
819
+ - spec/support/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.yml
820
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Nearest.yml
821
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Nearest2.yml
822
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Nearest_tags.yml
823
+ - spec/support/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.yml
824
+ - spec/support/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred_incompatible.yml
825
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Secondary_tags.yml
826
+ - spec/support/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.yml
827
+ - spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.yml
828
+ - spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.yml
829
+ - spec/support/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.yml
830
+ - spec/support/max_staleness/ReplicaSetWithPrimary/ShortHeartbeartShortMaxStaleness.yml
831
+ - spec/support/max_staleness/ReplicaSetWithPrimary/ShortHeartbeartShortMaxStaleness2.yml
832
+ - spec/support/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.yml
833
+ - spec/support/max_staleness/Sharded/Incompatible.yml
834
+ - spec/support/max_staleness/Sharded/SmallMaxStaleness.yml
835
+ - spec/support/max_staleness/Single/Incompatible.yml
836
+ - spec/support/max_staleness/Single/SmallMaxStaleness.yml
757
837
  - spec/support/sdam/rs/discover_arbiters.yml
758
838
  - spec/support/sdam/rs/discover_passives.yml
759
839
  - spec/support/sdam/rs/discover_primary.yml
@@ -816,15 +896,19 @@ test_files:
816
896
  - spec/support/server_selection/rtt/value_test_4.yml
817
897
  - spec/support/server_selection/rtt/value_test_5.yml
818
898
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Nearest.yml
899
+ - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Nearest_multiple.yml
819
900
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Nearest_non_matching.yml
820
901
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Primary.yml
821
902
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/PrimaryPreferred.yml
822
903
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/PrimaryPreferred_non_matching.yml
823
904
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary.yml
905
+ - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_multi_tags.yml
906
+ - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_multi_tags2.yml
824
907
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/Secondary_non_matching.yml
825
908
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/SecondaryPreferred.yml
826
909
  - spec/support/server_selection/selection/ReplicaSetNoPrimary/read/SecondaryPreferred_non_matching.yml
827
910
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Nearest.yml
911
+ - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Nearest_multiple.yml
828
912
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Nearest_non_matching.yml
829
913
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Primary.yml
830
914
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/PrimaryPreferred.yml
@@ -833,6 +917,7 @@ test_files:
833
917
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/Secondary_non_matching.yml
834
918
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/SecondaryPreferred.yml
835
919
  - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/SecondaryPreferred_non_matching.yml
920
+ - spec/support/server_selection/selection/ReplicaSetWithPrimary/read/SecondaryPreferred_tags.yml
836
921
  - spec/support/server_selection/selection/Sharded/read/SecondaryPreferred.yml
837
922
  - spec/support/server_selection/selection/Single/read/SecondaryPreferred.yml
838
923
  - spec/support/server_selection/selection/Unknown/read/SecondaryPreferred.yml
metadata.gz.sig CHANGED
Binary file