mongo 2.1.0.rc0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +5 -2
  3. data.tar.gz.sig +0 -0
  4. data/Rakefile +2 -2
  5. data/lib/mongo.rb +2 -1
  6. data/lib/mongo/address.rb +11 -5
  7. data/lib/mongo/address/ipv4.rb +6 -1
  8. data/lib/mongo/auth/cr/conversation.rb +1 -1
  9. data/lib/mongo/auth/ldap/conversation.rb +1 -1
  10. data/lib/mongo/auth/scram/conversation.rb +1 -1
  11. data/lib/mongo/auth/user/view.rb +2 -2
  12. data/lib/mongo/auth/x509/conversation.rb +1 -1
  13. data/lib/mongo/bulk_write.rb +12 -9
  14. data/lib/mongo/bulk_write/transformable.rb +20 -5
  15. data/lib/mongo/client.rb +11 -11
  16. data/lib/mongo/cluster.rb +2 -2
  17. data/lib/mongo/collection.rb +21 -8
  18. data/lib/mongo/collection/view.rb +1 -0
  19. data/lib/mongo/collection/view/aggregation.rb +11 -5
  20. data/lib/mongo/collection/view/iterable.rb +6 -2
  21. data/lib/mongo/collection/view/map_reduce.rb +39 -5
  22. data/lib/mongo/collection/view/readable.rb +35 -30
  23. data/lib/mongo/collection/view/writable.rb +26 -18
  24. data/lib/mongo/database.rb +12 -2
  25. data/lib/mongo/database/view.rb +4 -3
  26. data/lib/mongo/dbref.rb +4 -4
  27. data/lib/mongo/grid/fs_bucket.rb +8 -1
  28. data/lib/mongo/grid/stream/read.rb +1 -1
  29. data/lib/mongo/index.rb +5 -0
  30. data/lib/mongo/index/view.rb +2 -2
  31. data/lib/mongo/monitoring/command_log_subscriber.rb +9 -3
  32. data/lib/mongo/monitoring/event.rb +1 -0
  33. data/lib/mongo/monitoring/event/command_started.rb +2 -1
  34. data/lib/mongo/monitoring/event/command_succeeded.rb +6 -3
  35. data/lib/mongo/monitoring/event/secure.rb +58 -0
  36. data/lib/mongo/operation.rb +31 -1
  37. data/lib/mongo/operation/commands/collections_info.rb +2 -0
  38. data/lib/mongo/operation/commands/collections_info/result.rb +39 -0
  39. data/lib/mongo/operation/commands/list_indexes/result.rb +2 -1
  40. data/lib/mongo/operation/commands/map_reduce/result.rb +1 -1
  41. data/lib/mongo/operation/read/query.rb +2 -0
  42. data/lib/mongo/operation/read/query/result.rb +40 -0
  43. data/lib/mongo/operation/result.rb +13 -1
  44. data/lib/mongo/operation/write/bulk/delete.rb +2 -2
  45. data/lib/mongo/operation/write/bulk/update.rb +3 -3
  46. data/lib/mongo/operation/write/delete.rb +2 -2
  47. data/lib/mongo/operation/write/update.rb +9 -4
  48. data/lib/mongo/options.rb +1 -0
  49. data/lib/mongo/options/redacted.rb +156 -0
  50. data/lib/mongo/protocol/insert.rb +25 -6
  51. data/lib/mongo/protocol/query.rb +45 -31
  52. data/lib/mongo/protocol/reply.rb +29 -6
  53. data/lib/mongo/protocol/serializers.rb +1 -1
  54. data/lib/mongo/retryable.rb +83 -0
  55. data/lib/mongo/server.rb +16 -3
  56. data/lib/mongo/server/connectable.rb +21 -3
  57. data/lib/mongo/server/connection.rb +38 -4
  58. data/lib/mongo/server/connection_pool.rb +12 -0
  59. data/lib/mongo/server/connection_pool/queue.rb +15 -0
  60. data/lib/mongo/server/monitor/connection.rb +2 -2
  61. data/lib/mongo/server_selector.rb +5 -0
  62. data/lib/mongo/server_selector/selectable.rb +16 -9
  63. data/lib/mongo/socket.rb +6 -2
  64. data/lib/mongo/uri.rb +1 -1
  65. data/lib/mongo/version.rb +1 -1
  66. data/spec/mongo/bulk_write/ordered_combiner_spec.rb +11 -11
  67. data/spec/mongo/bulk_write/unordered_combiner_spec.rb +10 -10
  68. data/spec/mongo/client_spec.rb +101 -18
  69. data/spec/mongo/collection_spec.rb +44 -0
  70. data/spec/mongo/connection_string_spec.rb +36 -58
  71. data/spec/mongo/database_spec.rb +20 -0
  72. data/spec/mongo/grid/fs_bucket_spec.rb +1 -1
  73. data/spec/mongo/grid/stream/write_spec.rb +2 -2
  74. data/spec/mongo/monitoring/event/command_started_spec.rb +26 -0
  75. data/spec/mongo/monitoring/event/command_succeeded_spec.rb +26 -0
  76. data/spec/mongo/monitoring/event/secure_spec.rb +57 -0
  77. data/spec/mongo/operation/commands/aggregate_spec.rb +0 -16
  78. data/spec/mongo/operation/commands/command_spec.rb +0 -18
  79. data/spec/mongo/operation/kill_cursors_spec.rb +0 -16
  80. data/spec/mongo/operation/read/get_more_spec.rb +0 -16
  81. data/spec/mongo/operation/read/query_spec.rb +19 -16
  82. data/spec/mongo/operation/write/bulk/delete_spec.rb +16 -16
  83. data/spec/mongo/operation/write/bulk/update_spec.rb +6 -6
  84. data/spec/mongo/operation/write/command/delete_spec.rb +0 -16
  85. data/spec/mongo/operation/write/command/insert_spec.rb +0 -16
  86. data/spec/mongo/operation/write/command/update_spec.rb +0 -16
  87. data/spec/mongo/operation/write/delete_spec.rb +3 -3
  88. data/spec/mongo/operation/write/update_spec.rb +6 -6
  89. data/spec/mongo/options/redacted_spec.rb +350 -0
  90. data/spec/mongo/protocol/query_spec.rb +15 -1
  91. data/spec/mongo/retryable_spec.rb +147 -0
  92. data/spec/mongo/server/connection_pool/queue_spec.rb +16 -0
  93. data/spec/mongo/server/connection_pool_spec.rb +32 -0
  94. data/spec/mongo/server/connection_spec.rb +37 -0
  95. data/spec/mongo/server_discovery_and_monitoring_spec.rb +24 -59
  96. data/spec/mongo/server_selection_rtt_spec.rb +37 -57
  97. data/spec/mongo/server_selection_spec.rb +2 -0
  98. data/spec/mongo/server_selector/nearest_spec.rb +1 -0
  99. data/spec/mongo/server_selector/primary_preferred_spec.rb +1 -0
  100. data/spec/mongo/server_selector/primary_spec.rb +8 -2
  101. data/spec/mongo/server_selector/secondary_preferred_spec.rb +1 -0
  102. data/spec/mongo/server_selector/secondary_spec.rb +1 -0
  103. data/spec/mongo/server_spec.rb +68 -1
  104. data/spec/mongo/socket/ssl_spec.rb +29 -5
  105. data/spec/mongo/uri_spec.rb +20 -20
  106. data/spec/support/crud.rb +7 -1
  107. data/spec/support/matchers.rb +1 -1
  108. data/spec/support/shared/server_selector.rb +58 -2
  109. metadata +20 -5
  110. metadata.gz.sig +0 -0
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.1.0.rc0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Brock
@@ -32,7 +32,7 @@ cert_chain:
32
32
  o2UXDbWtz5PqoFd8EgNJAn3+BG1pwC9S9pVFG3WPucfAx/bE8iq/vvchHei5Y/Vo
33
33
  aAz5f/hY4zFeYWvGDBHYEXE1rTN2hhMSyJscPcFbmz0=
34
34
  -----END CERTIFICATE-----
35
- date: 2015-08-24 00:00:00.000000000 Z
35
+ date: 2015-09-10 00:00:00.000000000 Z
36
36
  dependencies:
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: bson
@@ -160,12 +160,14 @@ files:
160
160
  - lib/mongo/monitoring/event/command_failed.rb
161
161
  - lib/mongo/monitoring/event/command_started.rb
162
162
  - lib/mongo/monitoring/event/command_succeeded.rb
163
+ - lib/mongo/monitoring/event/secure.rb
163
164
  - lib/mongo/monitoring/publishable.rb
164
165
  - lib/mongo/operation.rb
165
166
  - lib/mongo/operation/commands.rb
166
167
  - lib/mongo/operation/commands/aggregate.rb
167
168
  - lib/mongo/operation/commands/aggregate/result.rb
168
169
  - lib/mongo/operation/commands/collections_info.rb
170
+ - lib/mongo/operation/commands/collections_info/result.rb
169
171
  - lib/mongo/operation/commands/command.rb
170
172
  - lib/mongo/operation/commands/indexes.rb
171
173
  - lib/mongo/operation/commands/list_collections.rb
@@ -185,6 +187,7 @@ files:
185
187
  - lib/mongo/operation/read.rb
186
188
  - lib/mongo/operation/read/get_more.rb
187
189
  - lib/mongo/operation/read/query.rb
190
+ - lib/mongo/operation/read/query/result.rb
188
191
  - lib/mongo/operation/read_preference.rb
189
192
  - lib/mongo/operation/result.rb
190
193
  - lib/mongo/operation/specifiable.rb
@@ -225,6 +228,7 @@ files:
225
228
  - lib/mongo/operation/write/write_command_enabled.rb
226
229
  - lib/mongo/options.rb
227
230
  - lib/mongo/options/mapper.rb
231
+ - lib/mongo/options/redacted.rb
228
232
  - lib/mongo/protocol.rb
229
233
  - lib/mongo/protocol/bit_vector.rb
230
234
  - lib/mongo/protocol/delete.rb
@@ -236,6 +240,7 @@ files:
236
240
  - lib/mongo/protocol/reply.rb
237
241
  - lib/mongo/protocol/serializers.rb
238
242
  - lib/mongo/protocol/update.rb
243
+ - lib/mongo/retryable.rb
239
244
  - lib/mongo/server.rb
240
245
  - lib/mongo/server/connectable.rb
241
246
  - lib/mongo/server/connection.rb
@@ -319,6 +324,9 @@ files:
319
324
  - spec/mongo/index/view_spec.rb
320
325
  - spec/mongo/logger_spec.rb
321
326
  - spec/mongo/monitoring/command_log_subscriber_spec.rb
327
+ - spec/mongo/monitoring/event/command_started_spec.rb
328
+ - spec/mongo/monitoring/event/command_succeeded_spec.rb
329
+ - spec/mongo/monitoring/event/secure_spec.rb
322
330
  - spec/mongo/monitoring_spec.rb
323
331
  - spec/mongo/operation/aggregate/result_spec.rb
324
332
  - spec/mongo/operation/commands/aggregate_spec.rb
@@ -348,6 +356,7 @@ files:
348
356
  - spec/mongo/operation/write/response_spec.rb
349
357
  - spec/mongo/operation/write/update_spec.rb
350
358
  - spec/mongo/operation/write/update_user_spec.rb
359
+ - spec/mongo/options/redacted_spec.rb
351
360
  - spec/mongo/protocol/delete_spec.rb
352
361
  - spec/mongo/protocol/get_more_spec.rb
353
362
  - spec/mongo/protocol/insert_spec.rb
@@ -355,6 +364,7 @@ files:
355
364
  - spec/mongo/protocol/query_spec.rb
356
365
  - spec/mongo/protocol/reply_spec.rb
357
366
  - spec/mongo/protocol/update_spec.rb
367
+ - spec/mongo/retryable_spec.rb
358
368
  - spec/mongo/server/connection_pool/queue_spec.rb
359
369
  - spec/mongo/server/connection_pool_spec.rb
360
370
  - spec/mongo/server/connection_spec.rb
@@ -527,12 +537,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
527
537
  version: '0'
528
538
  required_rubygems_version: !ruby/object:Gem::Requirement
529
539
  requirements:
530
- - - ">"
540
+ - - ">="
531
541
  - !ruby/object:Gem::Version
532
- version: 1.3.1
542
+ version: '0'
533
543
  requirements: []
534
544
  rubyforge_project: mongo
535
- rubygems_version: 2.4.7
545
+ rubygems_version: 2.4.8
536
546
  signing_key:
537
547
  specification_version: 4
538
548
  summary: Ruby driver for MongoDB
@@ -588,6 +598,9 @@ test_files:
588
598
  - spec/mongo/index/view_spec.rb
589
599
  - spec/mongo/logger_spec.rb
590
600
  - spec/mongo/monitoring/command_log_subscriber_spec.rb
601
+ - spec/mongo/monitoring/event/command_started_spec.rb
602
+ - spec/mongo/monitoring/event/command_succeeded_spec.rb
603
+ - spec/mongo/monitoring/event/secure_spec.rb
591
604
  - spec/mongo/monitoring_spec.rb
592
605
  - spec/mongo/operation/aggregate/result_spec.rb
593
606
  - spec/mongo/operation/commands/aggregate_spec.rb
@@ -617,6 +630,7 @@ test_files:
617
630
  - spec/mongo/operation/write/response_spec.rb
618
631
  - spec/mongo/operation/write/update_spec.rb
619
632
  - spec/mongo/operation/write/update_user_spec.rb
633
+ - spec/mongo/options/redacted_spec.rb
620
634
  - spec/mongo/protocol/delete_spec.rb
621
635
  - spec/mongo/protocol/get_more_spec.rb
622
636
  - spec/mongo/protocol/insert_spec.rb
@@ -624,6 +638,7 @@ test_files:
624
638
  - spec/mongo/protocol/query_spec.rb
625
639
  - spec/mongo/protocol/reply_spec.rb
626
640
  - spec/mongo/protocol/update_spec.rb
641
+ - spec/mongo/retryable_spec.rb
627
642
  - spec/mongo/server/connection_pool/queue_spec.rb
628
643
  - spec/mongo/server/connection_pool_spec.rb
629
644
  - spec/mongo/server/connection_spec.rb
metadata.gz.sig CHANGED
Binary file