mongo 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +40 -1
  3. data/Rakefile +59 -23
  4. data/lib/mongo/address.rb +22 -3
  5. data/lib/mongo/auth/aws/credentials_retriever.rb +70 -17
  6. data/lib/mongo/auth/base.rb +1 -1
  7. data/lib/mongo/bulk_write.rb +35 -2
  8. data/lib/mongo/client.rb +38 -6
  9. data/lib/mongo/client_encryption.rb +6 -3
  10. data/lib/mongo/cluster/reapers/cursor_reaper.rb +6 -1
  11. data/lib/mongo/cluster/sdam_flow.rb +20 -7
  12. data/lib/mongo/cluster.rb +14 -4
  13. data/lib/mongo/collection/helpers.rb +1 -1
  14. data/lib/mongo/collection/view/aggregation/behavior.rb +131 -0
  15. data/lib/mongo/collection/view/aggregation.rb +33 -99
  16. data/lib/mongo/collection/view/builder/aggregation.rb +1 -7
  17. data/lib/mongo/collection/view/change_stream.rb +80 -27
  18. data/lib/mongo/collection/view/iterable.rb +76 -60
  19. data/lib/mongo/collection/view/map_reduce.rb +25 -8
  20. data/lib/mongo/collection/view/readable.rb +79 -30
  21. data/lib/mongo/collection/view/writable.rb +109 -48
  22. data/lib/mongo/collection/view.rb +43 -3
  23. data/lib/mongo/collection.rb +158 -23
  24. data/lib/mongo/config.rb +2 -2
  25. data/lib/mongo/crypt/auto_encrypter.rb +4 -6
  26. data/lib/mongo/crypt/binding.rb +4 -4
  27. data/lib/mongo/crypt/context.rb +20 -14
  28. data/lib/mongo/crypt/encryption_io.rb +56 -26
  29. data/lib/mongo/crypt/explicit_encrypter.rb +49 -20
  30. data/lib/mongo/crypt/explicit_encryption_context.rb +17 -11
  31. data/lib/mongo/crypt/kms/azure/credentials_retriever.rb +22 -6
  32. data/lib/mongo/crypt/kms/gcp/credentials_retriever.rb +29 -4
  33. data/lib/mongo/csot_timeout_holder.rb +119 -0
  34. data/lib/mongo/cursor/kill_spec.rb +5 -2
  35. data/lib/mongo/cursor/nontailable.rb +27 -0
  36. data/lib/mongo/cursor.rb +86 -24
  37. data/lib/mongo/cursor_host.rb +82 -0
  38. data/lib/mongo/database/view.rb +81 -14
  39. data/lib/mongo/database.rb +88 -18
  40. data/lib/mongo/error/operation_failure.rb +209 -204
  41. data/lib/mongo/error/server_timeout_error.rb +12 -0
  42. data/lib/mongo/error/socket_timeout_error.rb +3 -1
  43. data/lib/mongo/error/timeout_error.rb +23 -0
  44. data/lib/mongo/error.rb +2 -0
  45. data/lib/mongo/grid/fs_bucket.rb +45 -12
  46. data/lib/mongo/grid/stream/read.rb +15 -1
  47. data/lib/mongo/grid/stream/write.rb +21 -4
  48. data/lib/mongo/index/view.rb +77 -16
  49. data/lib/mongo/operation/context.rb +40 -2
  50. data/lib/mongo/operation/create_search_indexes/op_msg.rb +2 -2
  51. data/lib/mongo/operation/delete/op_msg.rb +2 -1
  52. data/lib/mongo/operation/drop_search_index/op_msg.rb +2 -2
  53. data/lib/mongo/operation/find/op_msg.rb +45 -0
  54. data/lib/mongo/operation/get_more/op_msg.rb +33 -0
  55. data/lib/mongo/operation/insert/op_msg.rb +3 -2
  56. data/lib/mongo/operation/insert/result.rb +4 -2
  57. data/lib/mongo/operation/list_collections/result.rb +1 -1
  58. data/lib/mongo/operation/map_reduce/result.rb +1 -1
  59. data/lib/mongo/operation/op_msg_base.rb +3 -1
  60. data/lib/mongo/operation/result.rb +26 -5
  61. data/lib/mongo/operation/shared/executable.rb +12 -1
  62. data/lib/mongo/operation/shared/op_msg_executable.rb +4 -1
  63. data/lib/mongo/operation/shared/response_handling.rb +3 -3
  64. data/lib/mongo/operation/shared/sessions_supported.rb +1 -1
  65. data/lib/mongo/operation/shared/timed.rb +52 -0
  66. data/lib/mongo/operation/shared/write.rb +4 -1
  67. data/lib/mongo/operation/update/op_msg.rb +2 -1
  68. data/lib/mongo/operation/update_search_index/op_msg.rb +2 -2
  69. data/lib/mongo/operation.rb +1 -0
  70. data/lib/mongo/protocol/message.rb +1 -4
  71. data/lib/mongo/protocol/msg.rb +2 -2
  72. data/lib/mongo/retryable/base_worker.rb +28 -3
  73. data/lib/mongo/retryable/read_worker.rb +76 -35
  74. data/lib/mongo/retryable/write_worker.rb +53 -22
  75. data/lib/mongo/retryable.rb +8 -2
  76. data/lib/mongo/server/connection.rb +11 -5
  77. data/lib/mongo/server/connection_base.rb +22 -2
  78. data/lib/mongo/server/connection_pool.rb +32 -14
  79. data/lib/mongo/server/description/features.rb +1 -1
  80. data/lib/mongo/server/description.rb +18 -5
  81. data/lib/mongo/server/monitor.rb +7 -4
  82. data/lib/mongo/server/pending_connection.rb +25 -8
  83. data/lib/mongo/server/{round_trip_time_averager.rb → round_trip_time_calculator.rb} +25 -7
  84. data/lib/mongo/server.rb +11 -6
  85. data/lib/mongo/server_selector/base.rb +25 -9
  86. data/lib/mongo/session.rb +78 -9
  87. data/lib/mongo/socket/ssl.rb +131 -18
  88. data/lib/mongo/socket/tcp.rb +40 -6
  89. data/lib/mongo/socket.rb +154 -25
  90. data/lib/mongo/uri/options_mapper.rb +1 -0
  91. data/lib/mongo/version.rb +1 -5
  92. data/lib/mongo.rb +1 -0
  93. data/mongo.gemspec +8 -11
  94. data/spec/atlas/atlas_connectivity_spec.rb +4 -0
  95. data/spec/atlas/operations_spec.rb +4 -0
  96. data/spec/integration/client_side_encryption/auto_encryption_mongocryptd_spawn_spec.rb +2 -1
  97. data/spec/integration/client_side_encryption/auto_encryption_spec.rb +494 -487
  98. data/spec/integration/client_side_encryption/on_demand_aws_credentials_spec.rb +1 -1
  99. data/spec/integration/client_side_encryption/range_explicit_encryption_prose_spec.rb +67 -20
  100. data/spec/integration/client_side_operations_timeout/encryption_prose_spec.rb +131 -0
  101. data/spec/integration/connection_pool_populator_spec.rb +2 -0
  102. data/spec/integration/cursor_pinning_spec.rb +15 -60
  103. data/spec/integration/cursor_reaping_spec.rb +1 -1
  104. data/spec/integration/docs_examples_spec.rb +1 -1
  105. data/spec/integration/operation_failure_code_spec.rb +1 -1
  106. data/spec/integration/operation_failure_message_spec.rb +3 -3
  107. data/spec/integration/retryable_errors_spec.rb +2 -2
  108. data/spec/integration/retryable_reads_errors_spec.rb +35 -23
  109. data/spec/integration/sdam_error_handling_spec.rb +4 -1
  110. data/spec/integration/search_indexes_prose_spec.rb +4 -0
  111. data/spec/integration/server_spec.rb +4 -3
  112. data/spec/integration/transactions_api_examples_spec.rb +2 -0
  113. data/spec/kerberos/kerberos_spec.rb +4 -0
  114. data/spec/lite_spec_helper.rb +3 -11
  115. data/spec/mongo/auth/user/view_spec.rb +1 -1
  116. data/spec/mongo/caching_cursor_spec.rb +1 -1
  117. data/spec/mongo/client_encryption_spec.rb +1 -0
  118. data/spec/mongo/client_spec.rb +158 -4
  119. data/spec/mongo/collection/view/aggregation_spec.rb +14 -39
  120. data/spec/mongo/collection/view/change_stream_spec.rb +3 -3
  121. data/spec/mongo/collection_crud_spec.rb +1 -0
  122. data/spec/mongo/collection_spec.rb +5 -6
  123. data/spec/mongo/crypt/auto_encrypter_spec.rb +14 -12
  124. data/spec/mongo/crypt/data_key_context_spec.rb +3 -1
  125. data/spec/mongo/crypt/explicit_encryption_context_spec.rb +2 -2
  126. data/spec/mongo/crypt/handle_spec.rb +1 -1
  127. data/spec/mongo/cursor_spec.rb +26 -9
  128. data/spec/mongo/error/operation_failure_heavy_spec.rb +2 -2
  129. data/spec/mongo/operation/context_spec.rb +79 -0
  130. data/spec/mongo/operation/create/op_msg_spec.rb +106 -110
  131. data/spec/mongo/operation/delete/op_msg_spec.rb +6 -5
  132. data/spec/mongo/operation/find/op_msg_spec.rb +66 -0
  133. data/spec/mongo/operation/get_more/op_msg_spec.rb +65 -0
  134. data/spec/mongo/operation/insert/op_msg_spec.rb +128 -131
  135. data/spec/mongo/operation/shared/csot/examples.rb +113 -0
  136. data/spec/mongo/query_cache_spec.rb +243 -225
  137. data/spec/mongo/retryable_spec.rb +1 -0
  138. data/spec/mongo/server/connection_spec.rb +22 -0
  139. data/spec/mongo/server/round_trip_time_calculator_spec.rb +120 -0
  140. data/spec/mongo/socket/ssl_spec.rb +0 -10
  141. data/spec/runners/change_streams/test.rb +2 -2
  142. data/spec/runners/crud/operation.rb +1 -1
  143. data/spec/runners/crud/verifier.rb +3 -1
  144. data/spec/runners/transactions/operation.rb +4 -6
  145. data/spec/runners/unified/ambiguous_operations.rb +13 -0
  146. data/spec/runners/unified/assertions.rb +4 -0
  147. data/spec/runners/unified/change_stream_operations.rb +14 -24
  148. data/spec/runners/unified/crud_operations.rb +82 -59
  149. data/spec/runners/unified/ddl_operations.rb +38 -7
  150. data/spec/runners/unified/grid_fs_operations.rb +37 -2
  151. data/spec/runners/unified/support_operations.rb +43 -4
  152. data/spec/runners/unified/test.rb +22 -10
  153. data/spec/runners/unified.rb +1 -1
  154. data/spec/solo/clean_exit_spec.rb +2 -0
  155. data/spec/spec_tests/client_side_operations_timeout_spec.rb +15 -0
  156. data/spec/spec_tests/data/change_streams_unified/change-streams-clusterTime.yml +3 -1
  157. data/spec/spec_tests/data/change_streams_unified/change-streams-disambiguatedPaths.yml +3 -1
  158. data/spec/spec_tests/data/change_streams_unified/change-streams-errors.yml +3 -1
  159. data/spec/spec_tests/data/change_streams_unified/change-streams-pre_and_post_images.yml +1 -1
  160. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-allowlist.yml +1 -1
  161. data/spec/spec_tests/data/change_streams_unified/change-streams-resume-errorLabels.yml +1 -1
  162. data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +1 -1
  163. data/spec/spec_tests/data/client_side_encryption/badQueries.yml +2 -1
  164. data/spec/spec_tests/data/client_side_encryption/fle2v2-BypassQueryAnalysis.yml +1 -0
  165. data/spec/spec_tests/data/client_side_encryption/fle2v2-Compact.yml +1 -0
  166. data/spec/spec_tests/data/client_side_encryption/fle2v2-CreateCollection.yml +1 -0
  167. data/spec/spec_tests/data/client_side_encryption/fle2v2-DecryptExistingData.yml +1 -0
  168. data/spec/spec_tests/data/client_side_encryption/fle2v2-Delete.yml +1 -0
  169. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-EncryptedFieldsMap.yml +1 -0
  170. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFields-vs-jsonSchema.yml +1 -0
  171. data/spec/spec_tests/data/client_side_encryption/fle2v2-EncryptedFieldsMap-defaults.yml +1 -0
  172. data/spec/spec_tests/data/client_side_encryption/fle2v2-FindOneAndUpdate.yml +1 -0
  173. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Indexed.yml +1 -0
  174. data/spec/spec_tests/data/client_side_encryption/fle2v2-InsertFind-Unindexed.yml +1 -0
  175. data/spec/spec_tests/data/client_side_encryption/fle2v2-MissingKey.yml +1 -0
  176. data/spec/spec_tests/data/client_side_encryption/fle2v2-NoEncryption.yml +1 -0
  177. data/spec/spec_tests/data/client_side_encryption/fle2v2-Update.yml +1 -0
  178. data/spec/spec_tests/data/client_side_encryption/fle2v2-validatorAndPartialFieldExpression.yml +2 -1
  179. data/spec/spec_tests/data/client_side_encryption/timeoutMS.yml +67 -0
  180. data/spec/spec_tests/data/client_side_operations_timeout/bulkWrite.yml +87 -0
  181. data/spec/spec_tests/data/client_side_operations_timeout/change-streams.yml +358 -0
  182. data/spec/spec_tests/data/client_side_operations_timeout/close-cursors.yml +129 -0
  183. data/spec/spec_tests/data/client_side_operations_timeout/command-execution.yml +250 -0
  184. data/spec/spec_tests/data/client_side_operations_timeout/convenient-transactions.yml +113 -0
  185. data/spec/spec_tests/data/client_side_operations_timeout/cursors.yml +70 -0
  186. data/spec/spec_tests/data/client_side_operations_timeout/deprecated-options.yml +3982 -0
  187. data/spec/spec_tests/data/client_side_operations_timeout/error-transformations.yml +96 -0
  188. data/spec/spec_tests/data/client_side_operations_timeout/global-timeoutMS.yml +3236 -0
  189. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-advanced.yml +207 -0
  190. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-delete.yml +152 -0
  191. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-download.yml +182 -0
  192. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-find.yml +100 -0
  193. data/spec/spec_tests/data/client_side_operations_timeout/gridfs-upload.yml +249 -0
  194. data/spec/spec_tests/data/client_side_operations_timeout/legacy-timeouts.yml +204 -0
  195. data/spec/spec_tests/data/client_side_operations_timeout/non-tailable-cursors.yml +307 -0
  196. data/spec/spec_tests/data/client_side_operations_timeout/override-collection-timeoutMS.yml +1877 -0
  197. data/spec/spec_tests/data/client_side_operations_timeout/override-operation-timeoutMS.yml +1918 -0
  198. data/spec/spec_tests/data/client_side_operations_timeout/retryability-legacy-timeouts.yml +1676 -0
  199. data/spec/spec_tests/data/client_side_operations_timeout/retryability-timeoutMS.yml +2824 -0
  200. data/spec/spec_tests/data/client_side_operations_timeout/sessions-inherit-timeoutMS.yml +168 -0
  201. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-operation-timeoutMS.yml +171 -0
  202. data/spec/spec_tests/data/client_side_operations_timeout/sessions-override-timeoutMS.yml +168 -0
  203. data/spec/spec_tests/data/client_side_operations_timeout/tailable-awaitData.yml +247 -0
  204. data/spec/spec_tests/data/client_side_operations_timeout/tailable-non-awaitData.yml +181 -0
  205. data/spec/spec_tests/data/crud_unified/aggregate-write-readPreference.yml +6 -0
  206. data/spec/spec_tests/data/crud_unified/db-aggregate-write-readPreference.yml +6 -0
  207. data/spec/spec_tests/data/crud_unified/find-test-all-options.yml +29 -0
  208. data/spec/spec_tests/server_selection_rtt_spec.rb +6 -6
  209. data/spec/spec_tests/transactions_unified_spec.rb +2 -1
  210. data/spec/support/certificates/atlas-ocsp-ca.crt +89 -79
  211. data/spec/support/certificates/atlas-ocsp.crt +117 -122
  212. data/spec/support/certificates/retrieve-atlas-cert +1 -1
  213. data/spec/support/cluster_tools.rb +3 -3
  214. data/spec/support/common_shortcuts.rb +2 -2
  215. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Date.json +1 -1
  216. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalNoPrecision.json +1 -1
  217. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DecimalPrecision.json +1 -1
  218. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoubleNoPrecision.json +1 -1
  219. data/spec/support/crypt/encrypted_fields/range-encryptedFields-DoublePrecision.json +1 -1
  220. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Int.json +1 -1
  221. data/spec/support/crypt/encrypted_fields/range-encryptedFields-Long.json +1 -1
  222. data/spec/support/shared/session.rb +2 -2
  223. data/spec/support/spec_setup.rb +2 -2
  224. data/spec/support/utils.rb +3 -1
  225. metadata +88 -173
  226. checksums.yaml.gz.sig +0 -0
  227. data/spec/mongo/server/round_trip_time_averager_spec.rb +0 -48
  228. data/spec/shared/LICENSE +0 -20
  229. data/spec/shared/bin/get-mongodb-download-url +0 -17
  230. data/spec/shared/bin/s3-copy +0 -45
  231. data/spec/shared/bin/s3-upload +0 -69
  232. data/spec/shared/lib/mrss/child_process_helper.rb +0 -80
  233. data/spec/shared/lib/mrss/cluster_config.rb +0 -231
  234. data/spec/shared/lib/mrss/constraints.rb +0 -378
  235. data/spec/shared/lib/mrss/docker_runner.rb +0 -298
  236. data/spec/shared/lib/mrss/eg_config_utils.rb +0 -51
  237. data/spec/shared/lib/mrss/event_subscriber.rb +0 -210
  238. data/spec/shared/lib/mrss/lite_constraints.rb +0 -238
  239. data/spec/shared/lib/mrss/server_version_registry.rb +0 -113
  240. data/spec/shared/lib/mrss/session_registry.rb +0 -69
  241. data/spec/shared/lib/mrss/session_registry_legacy.rb +0 -60
  242. data/spec/shared/lib/mrss/spec_organizer.rb +0 -179
  243. data/spec/shared/lib/mrss/utils.rb +0 -37
  244. data/spec/shared/share/Dockerfile.erb +0 -281
  245. data/spec/shared/share/haproxy-1.conf +0 -16
  246. data/spec/shared/share/haproxy-2.conf +0 -17
  247. data/spec/shared/shlib/config.sh +0 -27
  248. data/spec/shared/shlib/distro.sh +0 -74
  249. data/spec/shared/shlib/server.sh +0 -417
  250. data/spec/shared/shlib/set_env.sh +0 -146
  251. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Aggregate.yml +0 -241
  252. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Correctness.yml +0 -422
  253. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Delete.yml +0 -182
  254. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-FindOneAndUpdate.yml +0 -239
  255. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-InsertFind.yml +0 -235
  256. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Date-Update.yml +0 -252
  257. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Aggregate.yml +0 -1687
  258. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Correctness.yml +0 -293
  259. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Delete.yml +0 -905
  260. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-FindOneAndUpdate.yml +0 -1684
  261. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-InsertFind.yml +0 -1680
  262. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Decimal-Update.yml +0 -1697
  263. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Aggregate.yml +0 -329
  264. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Correctness.yml +0 -424
  265. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Delete.yml +0 -226
  266. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-FindOneAndUpdate.yml +0 -327
  267. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-InsertFind.yml +0 -319
  268. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DecimalPrecision-Update.yml +0 -336
  269. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Aggregate.yml +0 -913
  270. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Correctness.yml +0 -292
  271. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Delete.yml +0 -518
  272. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-FindOneAndUpdate.yml +0 -911
  273. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-InsertFind.yml +0 -907
  274. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Double-Update.yml +0 -924
  275. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Aggregate.yml +0 -325
  276. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Correctness.yml +0 -424
  277. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Delete.yml +0 -224
  278. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-FindOneAndUpdate.yml +0 -323
  279. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-InsertFind.yml +0 -319
  280. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-DoublePrecision-Update.yml +0 -338
  281. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Aggregate.yml +0 -241
  282. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Correctness.yml +0 -423
  283. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Delete.yml +0 -182
  284. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-FindOneAndUpdate.yml +0 -239
  285. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-InsertFind.yml +0 -235
  286. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Int-Update.yml +0 -254
  287. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Aggregate.yml +0 -241
  288. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Correctness.yml +0 -422
  289. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Delete.yml +0 -182
  290. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-FindOneAndUpdate.yml +0 -239
  291. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-InsertFind.yml +0 -235
  292. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-Long-Update.yml +0 -254
  293. data/spec/spec_tests/data/client_side_encryption/fle2v2-Range-WrongType.yml +0 -43
  294. data/spec/support/faas/app/aws_lambda/mongodb/Gemfile.lock +0 -19
  295. data.tar.gz.sig +0 -0
  296. metadata.gz.sig +0 -3
@@ -1,417 +0,0 @@
1
- # This file contains functions pertaining to downloading, starting and
2
- # configuring a MongoDB server.
3
-
4
- # Note that mlaunch is executed with (and therefore installed with) Python 2.
5
- # The reason for this is that in the past, some of the distros we tested on
6
- # had an ancient version of Python 3 that was unusable (e.g. it couldn't
7
- # install anything from PyPI due to outdated TLS/SSL implementation).
8
- # It is likely that all of the current distros we use have a recent enough
9
- # and working Python 3 implementation, such that we could use Python 3 for
10
- # everything.
11
- #
12
- # Note that some distros (e.g. ubuntu2004) do not contain a `python' binary
13
- # at all, thus python2 or python3 must be explicitly specified depending on
14
- # the desired version.
15
-
16
- set_fcv() {
17
- if test -n "$FCV"; then
18
- mongo --eval 'assert.commandWorked(db.adminCommand( { setFeatureCompatibilityVersion: "'"$FCV"'" } ));' "$MONGODB_URI"
19
- mongo --quiet --eval 'db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )' |grep "version.*$FCV"
20
- fi
21
- }
22
-
23
- add_uri_option() {
24
- opt=$1
25
-
26
- if ! echo $MONGODB_URI |sed -e s,//,, |grep -q /; then
27
- MONGODB_URI="$MONGODB_URI/"
28
- fi
29
-
30
- if ! echo $MONGODB_URI |grep -q '?'; then
31
- MONGODB_URI="$MONGODB_URI?"
32
- fi
33
-
34
- MONGODB_URI="$MONGODB_URI&$opt"
35
- }
36
-
37
- prepare_server() {
38
- arch=$1
39
-
40
- if test -n "$USE_OPT_MONGODB"; then
41
- export BINDIR=/opt/mongodb/bin
42
- export PATH=$BINDIR:$PATH
43
- return
44
- fi
45
-
46
- if test "$MONGODB_VERSION" = latest; then
47
- # Test on the most recent published 4.3 release.
48
- # https://jira.mongodb.org/browse/RUBY-1724
49
-
50
- . $PROJECT_DIRECTORY/.mod/drivers-evergreen-tools/.evergreen/download-mongodb.sh
51
-
52
- get_distro
53
- get_mongodb_download_url_for "$DISTRO" "latest"
54
- prepare_server_from_url $MONGODB_DOWNLOAD_URL
55
- else
56
- download_version="$MONGODB_VERSION"
57
- url=`$(dirname $0)/get-mongodb-download-url $download_version $arch`
58
- prepare_server_from_url $url
59
- fi
60
-
61
- }
62
-
63
- prepare_server_from_url() {
64
- url=$1
65
-
66
- dirname=`basename $url |sed -e s/.tgz//`
67
- mongodb_dir="$MONGO_ORCHESTRATION_HOME"/mdb/"$dirname"
68
- mkdir -p "$mongodb_dir"
69
- curl --retry 3 $url | tar xz -C "$mongodb_dir" --strip-components 1 -f -
70
- BINDIR="$mongodb_dir"/bin
71
- export PATH="$BINDIR":$PATH
72
- }
73
-
74
- install_mlaunch_venv() {
75
- python3 -V || true
76
- if ! python3 -m venv -h >/dev/null; then
77
- # Current virtualenv fails with
78
- # https://github.com/pypa/virtualenv/issues/1630
79
- python3 -m pip install venv --user
80
- fi
81
- if ! python3 -m ensurepip -h > /dev/null; then
82
- # Debian11/Ubuntu2204 have venv installed, but it is nonfunctional unless
83
- # the python3-venv package is also installed (it lacks the ensurepip
84
- # module).
85
- sudo apt-get install --yes python3-venv
86
- fi
87
- if test "$USE_SYSTEM_PYTHON_PACKAGES" = 1 &&
88
- python3 -m pip list |grep mtools
89
- then
90
- # Use the existing mtools-legacy
91
- :
92
- else
93
- # Spawn a virtual environment, but only if one is not already
94
- # active...
95
- if test -z "$VIRTUAL_ENV"; then
96
- venvpath="$MONGO_ORCHESTRATION_HOME"/venv
97
- python3 -m venv $venvpath
98
- . $venvpath/bin/activate
99
- fi
100
-
101
- # [mlaunch] does not work:
102
- # https://github.com/rueckstiess/mtools/issues/856
103
- # dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
104
- #pip install 'mtools==1.7' 'pymongo==4.1' python-dateutil psutil
105
-
106
- # dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
107
- pip install --upgrade setuptools
108
- pip install 'mtools-legacy[mlaunch]' 'pymongo<4' python-dateutil
109
- fi
110
- }
111
-
112
- install_mlaunch_pip() {
113
- if test -n "$USE_OPT_MONGODB" && which mlaunch >/dev/null 2>&1; then
114
- # mlaunch is preinstalled in the docker image, do not install it here
115
- return
116
- fi
117
-
118
- python -V || true
119
- python3 -V || true
120
- pythonpath="$MONGO_ORCHESTRATION_HOME"/python
121
- # dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
122
- pip install -t "$pythonpath" 'mtools-legacy[mlaunch]' 'pymongo<4' python-dateutil
123
- export PATH="$pythonpath/bin":$PATH
124
- export PYTHONPATH="$pythonpath"
125
- }
126
-
127
- install_mlaunch_git() {
128
- repo=$1
129
- branch=$2
130
- python -V || true
131
- python3 -V || true
132
- which pip || true
133
- which pip3 || true
134
-
135
- if false; then
136
- if ! virtualenv --version; then
137
- python3 `which pip3` install --user virtualenv
138
- export PATH=$HOME/.local/bin:$PATH
139
- virtualenv --version
140
- fi
141
-
142
- venvpath="$MONGO_ORCHESTRATION_HOME"/venv
143
- virtualenv -p python3 $venvpath
144
- . $venvpath/bin/activate
145
-
146
- # dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
147
- pip3 install psutil pymongo python-dateutil
148
-
149
- git clone $repo mlaunch
150
- cd mlaunch
151
- git checkout origin/$branch
152
- python3 setup.py install
153
- cd ..
154
- else
155
- pip install --user 'virtualenv==13'
156
- export PATH=$HOME/.local/bin:$PATH
157
-
158
- venvpath="$MONGO_ORCHESTRATION_HOME"/venv
159
- virtualenv $venvpath
160
- . $venvpath/bin/activate
161
-
162
- # dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
163
- pip install psutil pymongo python-dateutil
164
-
165
- git clone $repo mlaunch
166
- (cd mlaunch &&
167
- git checkout origin/$branch &&
168
- python2 setup.py install
169
- )
170
- fi
171
- }
172
-
173
- install_cmake() {
174
- if ! command -v cmake &> /dev/null; then
175
- if ! command -v apt-get &> /dev/null; then
176
- # no apt-get; assume RHEL
177
- sudo yum -y install cmake libarchive
178
- else
179
- sudo apt-get install --yes cmake
180
- fi
181
- else
182
- echo 'cmake is present'
183
- fi
184
- }
185
-
186
- # This function sets followong global variables:
187
- # server_cert_path
188
- # server_ca_path
189
- # server_client_cert_path
190
- #
191
- # These variables are used later to connect to processes via mongo client.
192
- calculate_server_args() {
193
- local mongo_version=`echo $MONGODB_VERSION |tr -d .`
194
-
195
- if test -z "$mongo_version"; then
196
- echo "$MONGODB_VERSION must be set and not contain only dots" 1>&2
197
- exit 3
198
- fi
199
-
200
- if test $mongo_version = latest; then
201
- mongo_version=70
202
- fi
203
-
204
- local args="--setParameter enableTestCommands=1"
205
-
206
- if test $mongo_version -ge 50; then
207
- args="$args --setParameter acceptApiVersion2=1"
208
- elif test $mongo_version -ge 47; then
209
- args="$args --setParameter acceptAPIVersion2=1"
210
- fi
211
-
212
- # diagnosticDataCollectionEnabled is a mongod-only parameter on server 3.2,
213
- # and mlaunch does not support specifying mongod-only parameters:
214
- # https://github.com/rueckstiess/mtools/issues/696
215
- # Pass it to 3.4 and newer servers where it is accepted by all daemons.
216
- if test $mongo_version -ge 34; then
217
- args="$args --setParameter diagnosticDataCollectionEnabled=false"
218
- fi
219
- local uri_options=
220
- if test "$TOPOLOGY" = replica-set; then
221
- args="$args --replicaset --name test-rs --nodes 2 --arbiter"
222
- export HAVE_ARBITER=1
223
- elif test "$TOPOLOGY" = sharded-cluster; then
224
- args="$args --replicaset --nodes 2 --sharded 1 --name test-rs"
225
- if test -z "$SINGLE_MONGOS"; then
226
- args="$args --mongos 2"
227
- fi
228
- elif test "$TOPOLOGY" = standalone; then
229
- args="$args --single"
230
- elif test "$TOPOLOGY" = load-balanced; then
231
- args="$args --replicaset --nodes 2 --sharded 1 --name test-rs --port 27117"
232
- if test -z "$MRSS_ROOT"; then
233
- echo "Please set MRSS_ROOT" 1>&2
234
- exit 2
235
- fi
236
- if test -n "$SINGLE_MONGOS"; then
237
- haproxy_config=$MRSS_ROOT/share/haproxy-1.conf
238
- else
239
- args="$args --mongos 2"
240
- haproxy_config=$MRSS_ROOT/share/haproxy-2.conf
241
- fi
242
- uri_options="$uri_options&loadBalanced=true"
243
- else
244
- echo "Unknown topology: $TOPOLOGY" 1>&2
245
- exit 1
246
- fi
247
- if test -n "$MMAPV1"; then
248
- args="$args --storageEngine mmapv1 --smallfiles --noprealloc"
249
- uri_options="$uri_options&retryReads=false&retryWrites=false"
250
- fi
251
- if test "$AUTH" = auth; then
252
- args="$args --auth --username bob --password pwd123"
253
- elif test "$AUTH" = x509; then
254
- args="$args --auth --username bootstrap --password bootstrap"
255
- elif echo "$AUTH" |grep -q ^aws; then
256
- args="$args --auth --username bootstrap --password bootstrap"
257
- args="$args --setParameter authenticationMechanisms=MONGODB-AWS,SCRAM-SHA-1,SCRAM-SHA-256"
258
- uri_options="$uri_options&authMechanism=MONGODB-AWS&authSource=\$external"
259
- fi
260
-
261
- if test -n "$OCSP"; then
262
- if test -z "$OCSP_ALGORITHM"; then
263
- echo "OCSP_ALGORITHM must be set if OCSP is set" 1>&2
264
- exit 1
265
- fi
266
- fi
267
-
268
- if test "$SSL" = ssl || test -n "$OCSP_ALGORITHM"; then
269
- if test -n "$OCSP_ALGORITHM"; then
270
- if test "$OCSP_MUST_STAPLE" = 1; then
271
- server_cert_path=spec/support/ocsp/$OCSP_ALGORITHM/server-mustStaple.pem
272
- else
273
- server_cert_path=spec/support/ocsp/$OCSP_ALGORITHM/server.pem
274
- fi
275
- server_ca_path=spec/support/ocsp/$OCSP_ALGORITHM/ca.crt
276
- server_client_cert_path=spec/support/ocsp/$OCSP_ALGORITHM/server.pem
277
- else
278
- server_cert_path=spec/support/certificates/server-second-level-bundle.pem
279
- server_ca_path=spec/support/certificates/ca.crt
280
- server_client_cert_path=spec/support/certificates/client.pem
281
- fi
282
-
283
- if test -n "$OCSP_ALGORITHM"; then
284
- client_cert_path=spec/support/ocsp/$OCSP_ALGORITHM/server.pem
285
- elif test "$AUTH" = x509; then
286
- client_cert_path=spec/support/certificates/client-x509.pem
287
-
288
- uri_options="$uri_options&authMechanism=MONGODB-X509"
289
- elif echo $RVM_RUBY |grep -q jruby; then
290
- # JRuby does not grok chained certificate bundles -
291
- # https://github.com/jruby/jruby-openssl/issues/181
292
- client_cert_path=spec/support/certificates/client.pem
293
- else
294
- client_cert_path=spec/support/certificates/client-second-level-bundle.pem
295
- fi
296
-
297
- uri_options="$uri_options&tls=true&"\
298
- "tlsCAFile=$server_ca_path&"\
299
- "tlsCertificateKeyFile=$client_cert_path"
300
-
301
- args="$args --sslMode requireSSL"\
302
- " --sslPEMKeyFile $server_cert_path"\
303
- " --sslCAFile $server_ca_path"\
304
- " --sslClientCertificate $server_client_cert_path"
305
- fi
306
-
307
- # Docker forwards ports to the external interface, not to the loopback.
308
- # Hence we must bind to all interfaces here.
309
- if test -n "$BIND_ALL"; then
310
- args="$args --bind_ip_all"
311
- fi
312
-
313
- # MongoDB servers pre-4.2 do not enable zlib compression by default
314
- if test "$COMPRESSOR" = snappy; then
315
- args="$args --networkMessageCompressors snappy"
316
- elif test "$COMPRESSOR" = zlib; then
317
- args="$args --networkMessageCompressors zlib"
318
- fi
319
-
320
- if test -n "$OCSP_ALGORITHM" || test -n "$OCSP_VERIFIER"; then
321
- python3 -m pip install asn1crypto oscrypto flask
322
- fi
323
-
324
- local ocsp_args=
325
- if test -n "$OCSP_ALGORITHM"; then
326
- if test -z "$server_ca_path"; then
327
- echo "server_ca_path must have been set" 1>&2
328
- exit 1
329
- fi
330
- ocsp_args="--ca_file $server_ca_path"
331
- if test "$OCSP_DELEGATE" = 1; then
332
- ocsp_args="$ocsp_args \
333
- --ocsp_responder_cert spec/support/ocsp/$OCSP_ALGORITHM/ocsp-responder.crt \
334
- --ocsp_responder_key spec/support/ocsp/$OCSP_ALGORITHM/ocsp-responder.key \
335
- "
336
- else
337
- ocsp_args="$ocsp_args \
338
- --ocsp_responder_cert spec/support/ocsp/$OCSP_ALGORITHM/ca.crt \
339
- --ocsp_responder_key spec/support/ocsp/$OCSP_ALGORITHM/ca.key \
340
- "
341
- fi
342
- if test -n "$OCSP_STATUS"; then
343
- ocsp_args="$ocsp_args --fault $OCSP_STATUS"
344
- fi
345
- fi
346
-
347
- OCSP_ARGS="$ocsp_args"
348
- SERVER_ARGS="$args"
349
- URI_OPTIONS="$uri_options"
350
- }
351
-
352
- launch_ocsp_mock() {
353
- if test -n "$OCSP_ARGS"; then
354
- # Bind to 0.0.0.0 for Docker
355
- python3 spec/support/ocsp/ocsp_mock.py $OCSP_ARGS -b 0.0.0.0 -p 8100 &
356
- OCSP_MOCK_PID=$!
357
- fi
358
- }
359
-
360
- launch_server() {
361
- local dbdir="$1"
362
- python3 -m mtools.mlaunch.mlaunch --dir "$dbdir" --binarypath "$BINDIR" $SERVER_ARGS
363
-
364
- if test "$TOPOLOGY" = sharded-cluster && test $MONGODB_VERSION = 3.6; then
365
- # On 3.6 server the sessions collection is not immediately available,
366
- # so we run the refreshLogicalSessionCacheNow command on the config server
367
- # and again on each mongos in order for the mongoses
368
- # to correctly report logicalSessionTimeoutMinutes.
369
- mongos_regex="\s*mongos\s+([0-9]+)\s+running\s+[0-9]+"
370
- config_server_regex="\s*config\sserver\s+([0-9]+)\s+running\s+[0-9]+"
371
- config_server=""
372
- mongoses=()
373
- if test "$AUTH" = auth
374
- then
375
- base_url="mongodb://bob:pwd123@localhost"
376
- else
377
- base_url="mongodb://localhost"
378
- fi
379
- if test "$SSL" = "ssl"
380
- then
381
- mongo_command="${BINDIR}/mongo --ssl --sslPEMKeyFile $server_cert_path --sslCAFile $server_ca_path"
382
- else
383
- mongo_command="${BINDIR}/mongo"
384
- fi
385
-
386
- while read -r line
387
- do
388
- if [[ $line =~ $config_server_regex ]]
389
- then
390
- port="${BASH_REMATCH[1]}"
391
- config_server="${base_url}:${port}"
392
- fi
393
- if [[ $line =~ $mongos_regex ]]
394
- then
395
- port="${BASH_REMATCH[1]}"
396
- mongoses+=("${base_url}:${port}")
397
- fi
398
- done < <(python2 -m mtools.mlaunch.mlaunch list --dir "$dbdir" --binarypath "$BINDIR")
399
-
400
- if [ -n "$config_server" ]; then
401
- ${mongo_command} "$config_server" --eval 'db.adminCommand("refreshLogicalSessionCacheNow")'
402
- for mongos in ${mongoses[*]}
403
- do
404
- ${mongo_command} "$mongos" --eval 'db.adminCommand("refreshLogicalSessionCacheNow")'
405
- done
406
- fi
407
- fi
408
-
409
- if test "$TOPOLOGY" = load-balanced; then
410
- if test -z "$haproxy_config"; then
411
- echo haproxy_config should have been set 1>&2
412
- exit 3
413
- fi
414
-
415
- haproxy -D -f $haproxy_config -p $mongodb_dir/haproxy.pid
416
- fi
417
- }
@@ -1,146 +0,0 @@
1
- # When changing, also update the hash in share/Dockerfile.
2
- TOOLCHAIN_VERSION=ded7ea845b08cf96f11a747d9540ba3199580dea
3
- JDK_VERSION=jdk17
4
-
5
- set_env_java() {
6
- ls -l /opt || true
7
- ls -l /usr/lib/jvm || true
8
-
9
- # Use toolchain java if it exists
10
- if [ -f /opt/java/$JDK_VERSION/bin/java ]; then
11
- export JAVACMD=/opt/java/$JDK_VERSION/bin/java
12
- else
13
- echo Could not find $JDK_VERSION in /opt/java
14
- fi
15
-
16
- if test -n "$JAVACMD"; then
17
- eval $JAVACMD -version
18
- elif which java 2>/dev/null; then
19
- java -version
20
- else
21
- echo No java runtime found
22
- fi
23
- }
24
-
25
- set_env_python() {
26
- if test "$DOCKER_PRELOAD" != 1; then
27
- if test -n "$DOCKER"; then
28
- # If we are running in Docker and not preloading, we need to fetch the
29
- # Python binary.
30
- curl -fL --retry 3 https://github.com/p-mongodb/deps/raw/main/"$arch"-python37.tar.xz | \
31
- tar xfJ - -C /opt
32
- fi
33
-
34
- if test -d /opt/python/3.7/bin; then
35
- # Most Evergreen configurations.
36
- export PATH=/opt/python/3.7/bin:$PATH
37
- elif test -d /opt/python37/bin; then
38
- # Configurations that use Docker in Evergreen - these don't preload.
39
- export PATH=/opt/python37/bin:$PATH
40
- fi
41
-
42
- python3 -V
43
- fi
44
- }
45
-
46
- set_env_node() {
47
- if test "$DOCKER_PRELOAD" != 1; then
48
- dir=`ls -d /opt/nodejs/node-v12* |head -1`
49
- if test -z "$dir"; then
50
- echo "Node 12 missing" 1>&2
51
- exit 2
52
- fi
53
- export PATH="$dir/bin:$PATH"
54
- elif test -d /opt/node/bin; then
55
- # Node from toolchain in Evergreen
56
- export PATH=/opt/node/bin:$PATH
57
- fi
58
-
59
- node -v
60
- }
61
-
62
- set_env_ruby() {
63
- if test -z "$RVM_RUBY"; then
64
- echo "Empty RVM_RUBY, aborting"
65
- exit 2
66
- fi
67
-
68
- #ls -l /opt
69
-
70
- # Necessary for jruby
71
- set_env_java
72
-
73
- if [ "$RVM_RUBY" == "ruby-head" ]; then
74
- # When we use ruby-head, we do not install the Ruby toolchain.
75
- # But we still need Python 3.6+ to run mlaunch.
76
- # Since the ruby-head tests are run on ubuntu1604, we can use the
77
- # globally installed Python toolchain.
78
- #export PATH=/opt/python/3.7/bin:$PATH
79
-
80
- # 12.04, 14.04 and 16.04 are good
81
- curl --retry 3 -fL http://rubies.travis-ci.org/ubuntu/`lsb_release -rs`/x86_64/ruby-head.tar.bz2 |tar xfj -
82
- # TODO adjust gem path?
83
- export PATH=`pwd`/ruby-head/bin:`pwd`/ruby-head/lib/ruby/gems/2.6.0/bin:$PATH
84
- ruby --version
85
- ruby --version |grep dev
86
- elif test "$SYSTEM_RUBY" = 1; then
87
- # Nothing
88
- :
89
- else
90
- if test "$USE_OPT_TOOLCHAIN" = 1; then
91
- # Nothing, also PATH is already set
92
- :
93
- elif true; then
94
-
95
- # For testing toolchains:
96
- #toolchain_url=https://s3.amazonaws.com//mciuploads/mongo-ruby-toolchain/`host_distro`/f11598d091441ffc8d746aacfdc6c26741a3e629/mongo_ruby_driver_toolchain_`host_distro |tr - _`_patch_f11598d091441ffc8d746aacfdc6c26741a3e629_5e46f2793e8e866f36eda2c5_20_02_14_19_18_18.tar.gz
97
- toolchain_url=http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-driver/$TOOLCHAIN_VERSION/`host_distro`/$RVM_RUBY.tar.xz
98
- curl --retry 3 -fL $toolchain_url |tar Jxf -
99
- export PATH=`pwd`/rubies/$RVM_RUBY/bin:$PATH
100
- #export PATH=`pwd`/rubies/python/3/bin:$PATH
101
-
102
- # Attempt to get bundler to report all errors - so far unsuccessful
103
- #curl --retry 3 -o bundler-openssl.diff https://github.com/bundler/bundler/compare/v2.0.1...p-mongo:report-errors.diff
104
- #find . -path \*/lib/bundler/fetcher.rb -exec patch {} bundler-openssl.diff \;
105
-
106
- else
107
-
108
- # Normal operation
109
- if ! test -d $HOME/.rubies/$RVM_RUBY/bin; then
110
- echo "Ruby directory does not exist: $HOME/.rubies/$RVM_RUBY/bin" 1>&2
111
- echo "Contents of /opt:" 1>&2
112
- ls -l /opt 1>&2 || true
113
- echo ".rubies symlink:" 1>&2
114
- ls -ld $HOME/.rubies 1>&2 || true
115
- echo "Our rubies:" 1>&2
116
- ls -l $HOME/.rubies 1>&2 || true
117
- exit 2
118
- fi
119
- export PATH=$HOME/.rubies/$RVM_RUBY/bin:$PATH
120
-
121
- fi
122
-
123
- ruby --version
124
-
125
- # Ensure we're using the right ruby
126
- ruby_name=`echo $RVM_RUBY |awk -F- '{print $1}'`
127
- ruby_version=`echo $RVM_RUBY |awk -F- '{print $2}' |cut -c 1-3`
128
-
129
- ruby -v |fgrep $ruby_name
130
- ruby -v |fgrep $ruby_version
131
-
132
- # We shouldn't need to update rubygems, and there is value in
133
- # testing on whatever rubygems came with each supported ruby version
134
- #echo 'updating rubygems'
135
- #gem update --system
136
-
137
- # Only install bundler when not using ruby-head.
138
- # ruby-head comes with bundler and gem complains
139
- # because installing bundler would overwrite the bundler binary.
140
- # We now install bundler in the toolchain, hence nothing needs to be done
141
- # in the tests.
142
- if false && echo "$RVM_RUBY" |grep -q jruby; then
143
- gem install bundler -v '<2'
144
- fi
145
- fi
146
- }