mongoid 7.2.2 → 7.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ad177a2fa24df66fa961debfa6cf72d704197aac40c03ef6159754df707133f
4
- data.tar.gz: c3a391dd0d98167417b6823e6741e48a65894815c96446ffeca071d836c07239
3
+ metadata.gz: 864274384839e2cd26892e87cac91bde61eea71957bd18530fd483b9a0e0dbae
4
+ data.tar.gz: 2c351df40f5af200ca04671b1b8d1f86dbb78cfabfcb27bd39dcfa568e0e80dc
5
5
  SHA512:
6
- metadata.gz: 337fdd906646d343a8e1c675d094d48a66f23109b8b024fb1114e09021f6f705cf67b47f2846255802fb67cd2fb4a0201c9772abbbbdad1df908a2f94ba5c43a
7
- data.tar.gz: 8809e783b1c54d140498fd59580a19400368642175da05827c7f3dbd76fee0cdb77177bd29bd896594b02fc64f199e52c10faaaed012424c49226ddc0f054645
6
+ metadata.gz: 2e46b93f378bca30c949897549190f90470ea55e053c1fd0205705dfae524c2ca35d5ef28c72e3e7491103aa6b5d5bda4d364244428df0186725c9bb45577266
7
+ data.tar.gz: 33aa58be38ead0eb4eb5e50a032b49e5ab1d7a63daf7607171e200048713b3fd01ba3c6a1da266eff5956730632f84018ea6f3d2629e951963065ef27d3451ab
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -2,5 +2,5 @@
2
2
  # encoding: utf-8
3
3
 
4
4
  module Mongoid
5
- VERSION = "7.2.2"
5
+ VERSION = "7.2.3"
6
6
  end
@@ -85,4 +85,30 @@ describe Mongoid::Document do
85
85
  end
86
86
  end
87
87
  end
88
+
89
+ context 'Regexp field' do
90
+ shared_examples "persists strings as regexp" do |type|
91
+ it 'persists strings as regexp' do
92
+ mop = Mop.create!(regexp_field: 'foo')
93
+ expect(mop.regexp_field).to be_a Regexp
94
+ expect(Mop.find(mop.id).regexp_field).to be_a BSON::Regexp::Raw
95
+ expect(
96
+ Mop.collection.find(
97
+ "_id" => mop.id,
98
+ "regexp_field" => { "$type" => type }
99
+ ).count
100
+ ).to be == 1
101
+ end
102
+ end
103
+
104
+ context "< 3.2" do
105
+ max_server_version("3.1")
106
+ include_examples "persists strings as regexp", 11
107
+ end
108
+
109
+ context ">= 3.2" do
110
+ min_server_version("3.2")
111
+ it_behaves_like "persists strings as regexp", "regex"
112
+ end
113
+ end
88
114
  end
@@ -113,6 +113,14 @@ module Mrss
113
113
  end
114
114
  end
115
115
 
116
+ def require_retry_writes
117
+ before(:all) do
118
+ unless SpecConfig.instance.retry_writes?
119
+ skip "Retry writes is disabled"
120
+ end
121
+ end
122
+ end
123
+
116
124
  def require_no_retry_writes
117
125
  before(:all) do
118
126
  if SpecConfig.instance.retry_writes?
@@ -81,10 +81,20 @@ module Mrss
81
81
  end
82
82
 
83
83
  def run
84
+ run_buckets(*buckets.keys)
85
+ end
86
+
87
+ def run_buckets(*buckets)
84
88
  FileUtils.rm_f(rspec_all_json_path)
85
89
 
90
+ buckets.each do |bucket|
91
+ if bucket && !self.buckets[bucket]
92
+ raise "Unknown bucket #{bucket}"
93
+ end
94
+ end
95
+ buckets = Hash[self.buckets.select { |k, v| buckets.include?(k) }]
96
+
86
97
  failed = []
87
- buckets = self.buckets.dup
88
98
 
89
99
  priority_order.each do |category|
90
100
  if files = buckets.delete(category)
@@ -65,7 +65,7 @@ FROM <%= base_image %>
65
65
  # nio4r on JRuby: libgmp-dev
66
66
  # Snappy compression: libsnappy-dev
67
67
  # nokogiri: zlib1g-dev
68
- # Mongoid testing: tzdata
68
+ # Mongoid testing: tzdata shared-mime-info
69
69
  # Mongoid application testing: nodejs (8.x or newer)
70
70
  #
71
71
  # We currently use Python 2-compatible version of mtools, which
@@ -79,7 +79,7 @@ FROM <%= base_image %>
79
79
  libsnmp30
80
80
  krb5-user krb5-kdc krb5-admin-server libsasl2-dev libsasl2-modules-gssapi-mit
81
81
  python-pip python2.7-dev python3-pip
82
- tzdata
82
+ tzdata shared-mime-info
83
83
  ) %>
84
84
 
85
85
  # ubuntu1404 only has openjdk-7-jre-headless
@@ -13,4 +13,14 @@ class Mop
13
13
  # transformed differently based on the type of field being queried.
14
14
  field :int_field, type: Integer
15
15
  field :array_field, type: Array
16
+ field :date_field, type: Date
17
+ field :time_field, type: Time
18
+ field :datetime_field, type: DateTime
19
+ field :big_decimal_field, type: BigDecimal
20
+ field :decimal128_field, type: BSON::Decimal128
21
+ field :symbol_field, type: Symbol
22
+ field :bson_symbol_field, type: BSON::Symbol::Raw
23
+ field :regexp_field, type: Regexp
24
+ field :bson_regexp_field, type: BSON::Regexp::Raw
16
25
  end
26
+
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.2
4
+ version: 7.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Durran Jordan
@@ -29,7 +29,7 @@ cert_chain:
29
29
  YoFhlyUEi7VLlqNH0H/JFttVZK6+qmLelkVNcIYVLeWOB4Lf4VxEiYGEK1ORxsrY
30
30
  iyYKJJALWY1FAInGRIlvkN+B8o3yIhq1
31
31
  -----END CERTIFICATE-----
32
- date: 2021-04-14 00:00:00.000000000 Z
32
+ date: 2021-05-08 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activemodel
metadata.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- ��7�>��K��Ld'x`���䆼nY��� �8��h�-t}&�״� �oc�� Q@^�Q�]s`8l�Ҋ����lxI���k-�[ 8�d�����Q�[��ؖ3$�?
2
- T�7?}��O�?hh���I��^XCE덡���t+�܉y��<�qD�'l ��-�,؅͍Q�"��Or�|O���z%��+�Ek�S�t����3?!t�
1
+ z[��
2
+ ���ѥ0����(��‰s\�m5&0����4�.?�X�7�֐�;�r�G~z��N?aC3m�*] u�]EC1(U7{�>'0��uE�Ƴ�2}Sۂ�2W��� yF^2V�̒A��
3
+ ٝ�