mongoid 7.0.7 → 7.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/mongoid.rb +1 -1
  5. data/lib/mongoid/association/embedded/embeds_many.rb +2 -1
  6. data/lib/mongoid/association/embedded/embeds_one.rb +2 -1
  7. data/lib/mongoid/association/proxy.rb +1 -1
  8. data/lib/mongoid/atomic.rb +13 -3
  9. data/lib/mongoid/criteria.rb +7 -1
  10. data/lib/mongoid/criteria/modifiable.rb +2 -1
  11. data/lib/mongoid/criteria/queryable/extensions/numeric.rb +1 -1
  12. data/lib/mongoid/criteria/queryable/extensions/regexp.rb +3 -3
  13. data/lib/mongoid/extensions/hash.rb +4 -2
  14. data/lib/mongoid/extensions/regexp.rb +1 -1
  15. data/lib/mongoid/fields.rb +2 -1
  16. data/lib/mongoid/matchable/regexp.rb +2 -2
  17. data/lib/mongoid/persistable/pushable.rb +4 -1
  18. data/lib/mongoid/persistence_context.rb +6 -6
  19. data/lib/mongoid/query_cache.rb +2 -1
  20. data/lib/mongoid/validatable/uniqueness.rb +1 -1
  21. data/lib/mongoid/version.rb +1 -1
  22. data/lib/rails/generators/mongoid/model/templates/model.rb.tt +1 -1
  23. data/spec/app/models/delegating_patient.rb +16 -0
  24. data/spec/integration/app_spec.rb +192 -0
  25. data/spec/integration/associations/embedded_spec.rb +62 -0
  26. data/spec/integration/document_spec.rb +22 -0
  27. data/spec/lite_spec_helper.rb +11 -4
  28. data/spec/mongoid/association/embedded/embeds_many_models.rb +53 -0
  29. data/spec/mongoid/association/embedded/embeds_many_spec.rb +10 -0
  30. data/spec/mongoid/association/embedded/embeds_one_spec.rb +0 -2
  31. data/spec/mongoid/association/referenced/has_and_belongs_to_many/proxy_spec.rb +2 -1
  32. data/spec/mongoid/association/referenced/has_many/proxy_spec.rb +2 -1
  33. data/spec/mongoid/clients/options_spec.rb +4 -4
  34. data/spec/mongoid/clients/sessions_spec.rb +8 -4
  35. data/spec/mongoid/clients/transactions_spec.rb +20 -8
  36. data/spec/mongoid/clients_spec.rb +2 -2
  37. data/spec/mongoid/contextual/atomic_spec.rb +20 -10
  38. data/spec/mongoid/contextual/map_reduce_spec.rb +20 -5
  39. data/spec/mongoid/contextual/mongo_spec.rb +76 -53
  40. data/spec/mongoid/criteria/queryable/extensions/regexp_spec.rb +7 -7
  41. data/spec/mongoid/criteria/queryable/extensions/string_spec.rb +1 -1
  42. data/spec/mongoid/criteria_spec.rb +4 -2
  43. data/spec/mongoid/document_persistence_context_spec.rb +33 -0
  44. data/spec/mongoid/indexable_spec.rb +6 -4
  45. data/spec/mongoid/matchable/default_spec.rb +1 -1
  46. data/spec/mongoid/matchable/regexp_spec.rb +2 -2
  47. data/spec/mongoid/matchable_spec.rb +2 -2
  48. data/spec/mongoid/query_cache_spec.rb +2 -1
  49. data/spec/mongoid/relations/proxy_spec.rb +1 -1
  50. data/spec/mongoid/scopable_spec.rb +2 -1
  51. data/spec/mongoid/tasks/database_rake_spec.rb +13 -13
  52. data/spec/mongoid/tasks/database_spec.rb +1 -1
  53. data/spec/spec_helper.rb +0 -31
  54. data/spec/support/child_process_helper.rb +76 -0
  55. data/spec/support/cluster_config.rb +3 -3
  56. data/spec/support/constraints.rb +29 -19
  57. data/spec/support/spec_config.rb +12 -4
  58. metadata +16 -2
  59. metadata.gz.sig +2 -2
@@ -5,13 +5,17 @@ class SpecConfig
5
5
 
6
6
  def initialize
7
7
  if ENV['MONGODB_URI']
8
- @mongodb_uri = Mongo::URI.new(ENV['MONGODB_URI'])
8
+ @uri_str = ENV['MONGODB_URI']
9
+ @uri = Mongo::URI.new(@uri_str)
9
10
  end
10
11
  end
11
12
 
13
+ attr_reader :uri_str
14
+ attr_reader :uri
15
+
12
16
  def addresses
13
- if @mongodb_uri
14
- @mongodb_uri.servers
17
+ if @uri
18
+ @uri.servers
15
19
  else
16
20
  ['127.0.0.1']
17
21
  end
@@ -30,7 +34,11 @@ class SpecConfig
30
34
  end
31
35
 
32
36
  def client_debug?
33
- %w(1 true yes).include?((ENV['CLIENT_DEBUG'] || '').downcase)
37
+ %w(1 true yes).include?(ENV['CLIENT_DEBUG'] && ENV['CLIENT_DEBUG'].downcase)
38
+ end
39
+
40
+ def app_tests?
41
+ %w(1 true yes).include?(ENV['APP_TESTS'] && ENV['APP_TESTS'].downcase)
34
42
  end
35
43
 
36
44
  def ci?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.7
4
+ version: 7.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Durran Jordan
@@ -29,7 +29,7 @@ cert_chain:
29
29
  gpvfPNWMwyBDlHaNS3GfO6cRRxBOvEG05GUCsvtTY4Bpe8yjE64wg1ymb47LMOnv
30
30
  Qb1lGORmf/opg45mluKUYl7pQNZHD0d3
31
31
  -----END CERTIFICATE-----
32
- date: 2020-04-30 00:00:00.000000000 Z
32
+ date: 2020-06-03 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activemodel
@@ -447,6 +447,7 @@ files:
447
447
  - spec/app/models/country_code.rb
448
448
  - spec/app/models/courier_job.rb
449
449
  - spec/app/models/definition.rb
450
+ - spec/app/models/delegating_patient.rb
450
451
  - spec/app/models/description.rb
451
452
  - spec/app/models/dictionary.rb
452
453
  - spec/app/models/division.rb
@@ -607,8 +608,11 @@ files:
607
608
  - spec/app/models/word_origin.rb
608
609
  - spec/app/models/writer.rb
609
610
  - spec/config/mongoid.yml
611
+ - spec/integration/app_spec.rb
610
612
  - spec/integration/associations/belongs_to_spec.rb
613
+ - spec/integration/associations/embedded_spec.rb
611
614
  - spec/integration/criteria/time_with_zone_spec.rb
615
+ - spec/integration/document_spec.rb
612
616
  - spec/integration/matchable_spec.rb
613
617
  - spec/lite_spec_helper.rb
614
618
  - spec/mongoid/association/accessors_spec.rb
@@ -627,6 +631,7 @@ files:
627
631
  - spec/mongoid/association/embedded/embeds_many/binding_spec.rb
628
632
  - spec/mongoid/association/embedded/embeds_many/buildable_spec.rb
629
633
  - spec/mongoid/association/embedded/embeds_many/proxy_spec.rb
634
+ - spec/mongoid/association/embedded/embeds_many_models.rb
630
635
  - spec/mongoid/association/embedded/embeds_many_spec.rb
631
636
  - spec/mongoid/association/embedded/embeds_one/binding_spec.rb
632
637
  - spec/mongoid/association/embedded/embeds_one/buildable_spec.rb
@@ -740,6 +745,7 @@ files:
740
745
  - spec/mongoid/criteria/scopable_spec.rb
741
746
  - spec/mongoid/criteria_spec.rb
742
747
  - spec/mongoid/document_fields_spec.rb
748
+ - spec/mongoid/document_persistence_context_spec.rb
743
749
  - spec/mongoid/document_spec.rb
744
750
  - spec/mongoid/equality_spec.rb
745
751
  - spec/mongoid/errors/ambiguous_relationship_spec.rb
@@ -884,6 +890,7 @@ files:
884
890
  - spec/rails/mongoid_spec.rb
885
891
  - spec/spec_helper.rb
886
892
  - spec/support/authorization.rb
893
+ - spec/support/child_process_helper.rb
887
894
  - spec/support/cluster_config.rb
888
895
  - spec/support/constraints.rb
889
896
  - spec/support/expectations.rb
@@ -1075,6 +1082,7 @@ test_files:
1075
1082
  - spec/app/models/fish.rb
1076
1083
  - spec/app/models/page_question.rb
1077
1084
  - spec/app/models/learner.rb
1085
+ - spec/app/models/delegating_patient.rb
1078
1086
  - spec/app/models/band.rb
1079
1087
  - spec/app/models/pdf_writer.rb
1080
1088
  - spec/app/models/ordered_post.rb
@@ -1242,6 +1250,7 @@ test_files:
1242
1250
  - spec/mongoid/association/embedded/embeds_one/buildable_spec.rb
1243
1251
  - spec/mongoid/association/embedded/embeds_one_models.rb
1244
1252
  - spec/mongoid/association/embedded/embeds_many_spec.rb
1253
+ - spec/mongoid/association/embedded/embeds_many_models.rb
1245
1254
  - spec/mongoid/association/embedded/dirty_spec.rb
1246
1255
  - spec/mongoid/association/embedded/cyclic_spec.rb
1247
1256
  - spec/mongoid/association/embedded/embedded_in_spec.rb
@@ -1382,6 +1391,7 @@ test_files:
1382
1391
  - spec/mongoid/persistable_spec.rb
1383
1392
  - spec/mongoid/loggable_spec.rb
1384
1393
  - spec/mongoid/traversable_spec.rb
1394
+ - spec/mongoid/document_persistence_context_spec.rb
1385
1395
  - spec/mongoid/criteria_spec.rb
1386
1396
  - spec/mongoid/query_cache_spec.rb
1387
1397
  - spec/mongoid/matchable_spec.rb
@@ -1409,12 +1419,16 @@ test_files:
1409
1419
  - spec/support/expectations.rb
1410
1420
  - spec/support/constraints.rb
1411
1421
  - spec/support/spec_config.rb
1422
+ - spec/support/child_process_helper.rb
1412
1423
  - spec/mongoid_spec.rb
1413
1424
  - spec/config/mongoid.yml
1414
1425
  - spec/rails/controller_extension/controller_runtime_spec.rb
1415
1426
  - spec/rails/mongoid_spec.rb
1416
1427
  - spec/spec_helper.rb
1428
+ - spec/integration/app_spec.rb
1429
+ - spec/integration/associations/embedded_spec.rb
1417
1430
  - spec/integration/associations/belongs_to_spec.rb
1418
1431
  - spec/integration/criteria/time_with_zone_spec.rb
1419
1432
  - spec/integration/matchable_spec.rb
1433
+ - spec/integration/document_spec.rb
1420
1434
  - spec/lite_spec_helper.rb
metadata.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- $4�Y�H�lȰ4�z���V���*��
2
- LgΉ:xh��0̞��1�]�!���Up�L ��^�Lڧ��M��t#Sn ��T�]D���R5��e��4�{/�/F�W��m� M��/���AF�pR�0��:5r���腙�*��†��eи�DQ�}`��"��Vz8��knl���í����+]��S2�.q��m��D��Q��&�G0�t�o��<@p�P7x`+|&|�I�F����6�:�ֵ��9�
1
+ �����n���^��+�4V��1�~�f$��G$� �W '��0�� ��*v��F|�*AEOc
2
+ ����zOS����6����g�+�p[�R