mongoid 7.2.0 → 7.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) 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/criteria/queryable/selector.rb +0 -4
  5. data/lib/mongoid/document.rb +3 -2
  6. data/lib/mongoid/interceptable.rb +3 -1
  7. data/lib/mongoid/matcher/field_operator.rb +7 -11
  8. data/lib/mongoid/version.rb +1 -1
  9. data/spec/integration/app_spec.rb +35 -2
  10. data/spec/integration/callbacks_models.rb +49 -0
  11. data/spec/integration/callbacks_spec.rb +216 -0
  12. data/spec/integration/matcher_operator_data/gt_types.yml +63 -0
  13. data/spec/integration/matcher_operator_data/gte_types.yml +15 -0
  14. data/spec/integration/matcher_operator_data/lt_types.yml +15 -0
  15. data/spec/integration/matcher_operator_data/lte_types.yml +15 -0
  16. data/spec/integration/matcher_operator_data/ne_types.yml +15 -0
  17. data/spec/lite_spec_helper.rb +1 -1
  18. data/spec/mongoid/association/embedded/embedded_in/proxy_spec.rb +50 -0
  19. data/spec/mongoid/atomic/paths_spec.rb +41 -0
  20. data/spec/mongoid/criteria/queryable/selectable_logical_spec.rb +36 -0
  21. data/spec/shared/lib/mrss/cluster_config.rb +211 -0
  22. data/spec/shared/lib/mrss/constraints.rb +27 -0
  23. data/spec/shared/lib/mrss/docker_runner.rb +262 -0
  24. data/spec/shared/lib/mrss/server_version_registry.rb +69 -0
  25. data/spec/shared/share/Dockerfile.erb +229 -0
  26. data/spec/shared/shlib/distro.sh +73 -0
  27. data/spec/shared/shlib/server.sh +270 -0
  28. data/spec/shared/shlib/set_env.sh +128 -0
  29. data/spec/support/models/customer.rb +11 -0
  30. data/spec/support/models/customer_address.rb +12 -0
  31. data/spec/support/models/dictionary.rb +6 -0
  32. metadata +44 -12
  33. metadata.gz.sig +0 -0
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+ # encoding: utf-8
3
+
4
+ class Customer
5
+ include Mongoid::Document
6
+
7
+ field :name
8
+
9
+ embeds_one :home_address, class_name: 'CustomerAddress', as: :addressable
10
+ embeds_one :work_address, class_name: 'CustomerAddress', as: :addressable
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ # encoding: utf-8
3
+
4
+ class CustomerAddress
5
+ include Mongoid::Document
6
+
7
+ field :street, type: String
8
+ field :city, type: String
9
+ field :state, type: String
10
+
11
+ embedded_in :addressable, polymorphic: true
12
+ end
@@ -6,7 +6,13 @@ class Dictionary
6
6
  field :name, type: String
7
7
  field :publisher, type: String
8
8
  field :year, type: Integer
9
+
10
+ # This field must be a Time
9
11
  field :published, type: Time
12
+
13
+ # This field must be a Date
14
+ field :submitted_on, type: Date
15
+
10
16
  field :description, type: String, localize: true
11
17
  field :l, type: String, as: :language
12
18
  has_many :words, validate: false
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.2.0
4
+ version: 7.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Durran Jordan
@@ -11,8 +11,8 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDRDCCAiygAwIBAgIBATANBgkqhkiG9w0BAQsFADAmMSQwIgYDVQQDDBtkcml2
14
- ZXItcnVieS9EQz0xMGdlbi9EQz1jb20wHhcNMjAwMTIzMTkzNjAxWhcNMjEwMTIy
15
- MTkzNjAxWjAmMSQwIgYDVQQDDBtkcml2ZXItcnVieS9EQz0xMGdlbi9EQz1jb20w
14
+ ZXItcnVieS9EQz0xMGdlbi9EQz1jb20wHhcNMjEwMjA5MTQxOTU3WhcNMjIwMjA5
15
+ MTQxOTU3WjAmMSQwIgYDVQQDDBtkcml2ZXItcnVieS9EQz0xMGdlbi9EQz1jb20w
16
16
  ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDRXUgGvH0ZtWwDPc2umdH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WOB4Lf4VxEiYGEK1ORxsrY
30
+ iyYKJJALWY1FAInGRIlvkN+B8o3yIhq1
31
31
  -----END CERTIFICATE-----
32
- date: 2020-12-01 00:00:00.000000000 Z
32
+ date: 2021-02-24 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activemodel
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: '5.1'
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '6.1'
43
+ version: '6.2'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  version: '5.1'
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '6.1'
53
+ version: '6.2'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: mongo
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -442,6 +442,8 @@ files:
442
442
  - spec/integration/associations/reverse_population_spec_models.rb
443
443
  - spec/integration/atomic/modifiers_spec.rb
444
444
  - spec/integration/bson_regexp_raw_spec.rb
445
+ - spec/integration/callbacks_models.rb
446
+ - spec/integration/callbacks_spec.rb
445
447
  - spec/integration/criteria/date_field_spec.rb
446
448
  - spec/integration/criteria/default_scope_spec.rb
447
449
  - spec/integration/criteria/logical_spec.rb
@@ -459,16 +461,21 @@ files:
459
461
  - spec/integration/matcher_operator_data/exists.yml
460
462
  - spec/integration/matcher_operator_data/generic_op.yml
461
463
  - spec/integration/matcher_operator_data/gt.yml
464
+ - spec/integration/matcher_operator_data/gt_types.yml
462
465
  - spec/integration/matcher_operator_data/gte.yml
466
+ - spec/integration/matcher_operator_data/gte_types.yml
463
467
  - spec/integration/matcher_operator_data/implicit.yml
464
468
  - spec/integration/matcher_operator_data/implicit_traversal.yml
465
469
  - spec/integration/matcher_operator_data/in.yml
466
470
  - spec/integration/matcher_operator_data/invalid_op.yml
467
471
  - spec/integration/matcher_operator_data/invalid_syntax.yml
468
472
  - spec/integration/matcher_operator_data/lt.yml
473
+ - spec/integration/matcher_operator_data/lt_types.yml
469
474
  - spec/integration/matcher_operator_data/lte.yml
475
+ - spec/integration/matcher_operator_data/lte_types.yml
470
476
  - spec/integration/matcher_operator_data/multiple.yml
471
477
  - spec/integration/matcher_operator_data/ne.yml
478
+ - spec/integration/matcher_operator_data/ne_types.yml
472
479
  - spec/integration/matcher_operator_data/nin.yml
473
480
  - spec/integration/matcher_operator_data/nor.yml
474
481
  - spec/integration/matcher_operator_data/not.yml
@@ -754,9 +761,16 @@ files:
754
761
  - spec/rails/mongoid_spec.rb
755
762
  - spec/shared/LICENSE
756
763
  - spec/shared/lib/mrss/child_process_helper.rb
764
+ - spec/shared/lib/mrss/cluster_config.rb
757
765
  - spec/shared/lib/mrss/constraints.rb
766
+ - spec/shared/lib/mrss/docker_runner.rb
758
767
  - spec/shared/lib/mrss/lite_constraints.rb
768
+ - spec/shared/lib/mrss/server_version_registry.rb
759
769
  - spec/shared/lib/mrss/spec_organizer.rb
770
+ - spec/shared/share/Dockerfile.erb
771
+ - spec/shared/shlib/distro.sh
772
+ - spec/shared/shlib/server.sh
773
+ - spec/shared/shlib/set_env.sh
760
774
  - spec/spec_helper.rb
761
775
  - spec/support/authorization.rb
762
776
  - spec/support/cluster_config.rb
@@ -824,6 +838,8 @@ files:
824
838
  - spec/support/models/country_code.rb
825
839
  - spec/support/models/courier_job.rb
826
840
  - spec/support/models/crate.rb
841
+ - spec/support/models/customer.rb
842
+ - spec/support/models/customer_address.rb
827
843
  - spec/support/models/deed.rb
828
844
  - spec/support/models/definition.rb
829
845
  - spec/support/models/delegating_patient.rb
@@ -1302,11 +1318,18 @@ test_files:
1302
1318
  - spec/mongoid/selectable_spec.rb
1303
1319
  - spec/mongoid/copyable_spec.rb
1304
1320
  - spec/mongoid/threaded_spec.rb
1321
+ - spec/shared/shlib/server.sh
1322
+ - spec/shared/shlib/distro.sh
1323
+ - spec/shared/shlib/set_env.sh
1305
1324
  - spec/shared/lib/mrss/constraints.rb
1325
+ - spec/shared/lib/mrss/server_version_registry.rb
1326
+ - spec/shared/lib/mrss/docker_runner.rb
1327
+ - spec/shared/lib/mrss/cluster_config.rb
1306
1328
  - spec/shared/lib/mrss/lite_constraints.rb
1307
1329
  - spec/shared/lib/mrss/child_process_helper.rb
1308
1330
  - spec/shared/lib/mrss/spec_organizer.rb
1309
1331
  - spec/shared/LICENSE
1332
+ - spec/shared/share/Dockerfile.erb
1310
1333
  - spec/README.md
1311
1334
  - spec/lite_spec_helper.rb
1312
1335
  - spec/support/authorization.rb
@@ -1342,6 +1365,7 @@ test_files:
1342
1365
  - spec/support/models/eye.rb
1343
1366
  - spec/support/models/business.rb
1344
1367
  - spec/support/models/dungeon.rb
1368
+ - spec/support/models/customer.rb
1345
1369
  - spec/support/models/author.rb
1346
1370
  - spec/support/models/address_component.rb
1347
1371
  - spec/support/models/guitar.rb
@@ -1399,6 +1423,7 @@ test_files:
1399
1423
  - spec/support/models/login.rb
1400
1424
  - spec/support/models/cat.rb
1401
1425
  - spec/support/models/word.rb
1426
+ - spec/support/models/customer_address.rb
1402
1427
  - spec/support/models/tool.rb
1403
1428
  - spec/support/models/shipment_address.rb
1404
1429
  - spec/support/models/minim.rb
@@ -1571,19 +1596,24 @@ test_files:
1571
1596
  - spec/integration/associations/has_many_spec.rb
1572
1597
  - spec/integration/matcher_operator_data/elem_match_expr.yml
1573
1598
  - spec/integration/matcher_operator_data/eq.yml
1599
+ - spec/integration/matcher_operator_data/gt_types.yml
1574
1600
  - spec/integration/matcher_operator_data/regex_options.yml
1575
1601
  - spec/integration/matcher_operator_data/exists.yml
1576
1602
  - spec/integration/matcher_operator_data/nor.yml
1577
1603
  - spec/integration/matcher_operator_data/multiple.yml
1578
1604
  - spec/integration/matcher_operator_data/lt.yml
1605
+ - spec/integration/matcher_operator_data/lt_types.yml
1579
1606
  - spec/integration/matcher_operator_data/invalid_syntax.yml
1580
1607
  - spec/integration/matcher_operator_data/not.yml
1608
+ - spec/integration/matcher_operator_data/gte_types.yml
1581
1609
  - spec/integration/matcher_operator_data/invalid_op.yml
1582
1610
  - spec/integration/matcher_operator_data/ne.yml
1583
1611
  - spec/integration/matcher_operator_data/size.yml
1584
1612
  - spec/integration/matcher_operator_data/or.yml
1613
+ - spec/integration/matcher_operator_data/ne_types.yml
1585
1614
  - spec/integration/matcher_operator_data/gte.yml
1586
1615
  - spec/integration/matcher_operator_data/nin.yml
1616
+ - spec/integration/matcher_operator_data/lte_types.yml
1587
1617
  - spec/integration/matcher_operator_data/in.yml
1588
1618
  - spec/integration/matcher_operator_data/all.yml
1589
1619
  - spec/integration/matcher_operator_data/lte.yml
@@ -1594,6 +1624,7 @@ test_files:
1594
1624
  - spec/integration/matcher_operator_data/implicit.yml
1595
1625
  - spec/integration/matcher_operator_data/elem_match.yml
1596
1626
  - spec/integration/matcher_operator_data/generic_op.yml
1627
+ - spec/integration/callbacks_models.rb
1597
1628
  - spec/integration/matcher_spec.rb
1598
1629
  - spec/integration/shardable_spec.rb
1599
1630
  - spec/integration/criteria/default_scope_spec.rb
@@ -1604,6 +1635,7 @@ test_files:
1604
1635
  - spec/integration/discriminator_key_spec.rb
1605
1636
  - spec/integration/app_spec.rb
1606
1637
  - spec/integration/discriminator_value_spec.rb
1638
+ - spec/integration/callbacks_spec.rb
1607
1639
  - spec/integration/matcher_operator_spec.rb
1608
1640
  - spec/integration/matcher_examples_spec.rb
1609
1641
  - spec/integration/server_query_spec.rb
metadata.gz.sig CHANGED
Binary file