mongoid 8.0.8 → 8.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +65 -41
  3. data/lib/mongoid/association/accessors.rb +5 -1
  4. data/lib/mongoid/association/eager_loadable.rb +3 -0
  5. data/lib/mongoid/config.rb +10 -0
  6. data/lib/mongoid/criteria/queryable/extensions/numeric.rb +15 -1
  7. data/lib/mongoid/document.rb +8 -1
  8. data/lib/mongoid/fields.rb +11 -6
  9. data/lib/mongoid/interceptable.rb +10 -8
  10. data/lib/mongoid/timestamps/created.rb +8 -1
  11. data/lib/mongoid/traversable.rb +12 -0
  12. data/lib/mongoid/validatable/associated.rb +6 -3
  13. data/lib/mongoid/version.rb +1 -1
  14. data/spec/integration/callbacks_models.rb +37 -0
  15. data/spec/integration/callbacks_spec.rb +27 -0
  16. data/spec/mongoid/association/eager_spec.rb +24 -2
  17. data/spec/mongoid/association/embedded/embeds_many_query_spec.rb +4 -0
  18. data/spec/mongoid/association_spec.rb +60 -0
  19. data/spec/mongoid/document_spec.rb +27 -0
  20. data/spec/mongoid/interceptable_spec.rb +100 -0
  21. data/spec/mongoid/interceptable_spec_models.rb +51 -111
  22. data/spec/mongoid/serializable_spec.rb +14 -14
  23. data/spec/mongoid/timestamps/created_spec.rb +23 -0
  24. data/spec/mongoid/validatable/associated_spec.rb +14 -4
  25. metadata +4 -80
  26. checksums.yaml.gz.sig +0 -0
  27. data/spec/shared/LICENSE +0 -20
  28. data/spec/shared/bin/get-mongodb-download-url +0 -17
  29. data/spec/shared/bin/s3-copy +0 -45
  30. data/spec/shared/bin/s3-upload +0 -69
  31. data/spec/shared/lib/mrss/child_process_helper.rb +0 -80
  32. data/spec/shared/lib/mrss/cluster_config.rb +0 -231
  33. data/spec/shared/lib/mrss/constraints.rb +0 -378
  34. data/spec/shared/lib/mrss/docker_runner.rb +0 -298
  35. data/spec/shared/lib/mrss/eg_config_utils.rb +0 -51
  36. data/spec/shared/lib/mrss/event_subscriber.rb +0 -210
  37. data/spec/shared/lib/mrss/lite_constraints.rb +0 -238
  38. data/spec/shared/lib/mrss/server_version_registry.rb +0 -113
  39. data/spec/shared/lib/mrss/session_registry.rb +0 -69
  40. data/spec/shared/lib/mrss/session_registry_legacy.rb +0 -60
  41. data/spec/shared/lib/mrss/spec_organizer.rb +0 -179
  42. data/spec/shared/lib/mrss/utils.rb +0 -37
  43. data/spec/shared/share/Dockerfile.erb +0 -321
  44. data/spec/shared/share/haproxy-1.conf +0 -16
  45. data/spec/shared/share/haproxy-2.conf +0 -17
  46. data/spec/shared/shlib/config.sh +0 -27
  47. data/spec/shared/shlib/distro.sh +0 -74
  48. data/spec/shared/shlib/server.sh +0 -416
  49. data/spec/shared/shlib/set_env.sh +0 -169
  50. data.tar.gz.sig +0 -0
  51. metadata.gz.sig +0 -0
@@ -388,6 +388,86 @@ describe Mongoid::Interceptable do
388
388
  end
389
389
  end
390
390
  end
391
+
392
+ context 'with embedded grandchildren' do
393
+ IS = InterceptableSpec
394
+
395
+ config_override :prevent_multiple_calls_of_embedded_callbacks, true
396
+
397
+ context 'when creating' do
398
+ let(:registry) { IS::CallbackRegistry.new(only: %i[ before_save ]) }
399
+
400
+ let(:expected_calls) do
401
+ [
402
+ # the parent
403
+ [ IS::CbParent, :before_save ],
404
+
405
+ # the immediate child of the parent
406
+ [ IS::CbCascadedNode, :before_save ],
407
+
408
+ # the grandchild of the parent
409
+ [ IS::CbCascadedNode, :before_save ],
410
+ ]
411
+ end
412
+
413
+ let!(:parent) do
414
+ parent = IS::CbParent.new(registry)
415
+ child = IS::CbCascadedNode.new(registry)
416
+ grandchild = IS::CbCascadedNode.new(registry)
417
+
418
+ child.cb_cascaded_nodes = [ grandchild ]
419
+ parent.cb_cascaded_nodes = [ child ]
420
+
421
+ parent.tap(&:save)
422
+ end
423
+
424
+ it 'should cascade callbacks to grandchildren' do
425
+ expect(registry.calls).to be == expected_calls
426
+ end
427
+ end
428
+
429
+ context 'when updating' do
430
+ let(:registry) { IS::CallbackRegistry.new(only: %i[ before_update ]) }
431
+
432
+ let(:expected_calls) do
433
+ [
434
+ # the parent
435
+ [ IS::CbParent, :before_update ],
436
+
437
+ # the immediate child of the parent
438
+ [ IS::CbCascadedNode, :before_update ],
439
+
440
+ # the grandchild of the parent
441
+ [ IS::CbCascadedNode, :before_update ],
442
+ ]
443
+ end
444
+
445
+ let!(:parent) do
446
+ parent = IS::CbParent.new(nil)
447
+ child = IS::CbCascadedNode.new(nil)
448
+ grandchild = IS::CbCascadedNode.new(nil)
449
+
450
+ child.cb_cascaded_nodes = [ grandchild ]
451
+ parent.cb_cascaded_nodes = [ child ]
452
+
453
+ parent.save
454
+
455
+ parent.callback_registry = registry
456
+ child.callback_registry = registry
457
+ grandchild.callback_registry = registry
458
+
459
+ parent.name = 'updated'
460
+ child.name = 'updated'
461
+ grandchild.name = 'updated'
462
+
463
+ parent.tap(&:save)
464
+ end
465
+
466
+ it 'should cascade callbacks to grandchildren' do
467
+ expect(registry.calls).to be == expected_calls
468
+ end
469
+ end
470
+ end
391
471
  end
392
472
 
393
473
  describe ".before_destroy" do
@@ -578,6 +658,26 @@ describe Mongoid::Interceptable do
578
658
  band.notes.push(note)
579
659
  record.notes.push(note)
580
660
  end
661
+
662
+ context "when saving the root" do
663
+ context 'with prevent_multiple_calls_of_embedded_callbacks enabled' do
664
+ config_override :prevent_multiple_calls_of_embedded_callbacks, true
665
+
666
+ it "executes the callbacks only once for each document" do
667
+ expect(note).to receive(:update_saved).once
668
+ band.save!
669
+ end
670
+ end
671
+
672
+ context 'with prevent_multiple_calls_of_embedded_callbacks disabled' do
673
+ config_override :prevent_multiple_calls_of_embedded_callbacks, false
674
+
675
+ it "executes the callbacks once for each ember" do
676
+ expect(note).to receive(:update_saved).twice
677
+ band.save!
678
+ end
679
+ end
680
+ end
581
681
  end
582
682
  end
583
683
 
@@ -1,13 +1,19 @@
1
1
  module InterceptableSpec
2
2
  class CallbackRegistry
3
- def initialize
3
+ def initialize(only: [])
4
4
  @calls = []
5
+ @only = only
5
6
  end
6
7
 
7
8
  def record_call(cls, cb)
9
+ return unless @only.empty? || @only.any? { |pat| pat == cb }
8
10
  @calls << [cls, cb]
9
11
  end
10
12
 
13
+ def reset!
14
+ @calls.clear
15
+ end
16
+
11
17
  attr_reader :calls
12
18
  end
13
19
 
@@ -15,6 +21,8 @@ module InterceptableSpec
15
21
  extend ActiveSupport::Concern
16
22
 
17
23
  included do
24
+ field :name, type: String
25
+
18
26
  %i(
19
27
  validation save create update
20
28
  ).each do |what|
@@ -34,196 +42,128 @@ module InterceptableSpec
34
42
  end
35
43
  end
36
44
  end
37
- end
38
45
 
39
- class CbHasOneParent
40
- include Mongoid::Document
41
-
42
- has_one :child, autosave: true, class_name: "CbHasOneChild", inverse_of: :parent
46
+ attr_accessor :callback_registry
43
47
 
44
- def initialize(callback_registry)
48
+ def initialize(callback_registry, *args, **kwargs)
45
49
  @callback_registry = callback_registry
46
- super()
50
+ super(*args, **kwargs)
47
51
  end
52
+ end
48
53
 
49
- attr_accessor :callback_registry
50
-
54
+ module RootInsertable
51
55
  def insert_as_root
52
56
  @callback_registry&.record_call(self.class, :insert_into_database)
53
57
  super
54
58
  end
59
+ end
55
60
 
61
+ class CbHasOneParent
62
+ include Mongoid::Document
56
63
  include CallbackTracking
64
+ include RootInsertable
65
+
66
+ has_one :child, autosave: true, class_name: "CbHasOneChild", inverse_of: :parent
57
67
  end
58
68
 
59
69
  class CbHasOneChild
60
70
  include Mongoid::Document
71
+ include CallbackTracking
61
72
 
62
73
  belongs_to :parent, class_name: "CbHasOneParent", inverse_of: :child
63
-
64
- def initialize(callback_registry)
65
- @callback_registry = callback_registry
66
- super()
67
- end
68
-
69
- attr_accessor :callback_registry
70
-
71
- include CallbackTracking
72
74
  end
73
75
 
74
76
  class CbHasManyParent
75
77
  include Mongoid::Document
78
+ include CallbackTracking
79
+ include RootInsertable
76
80
 
77
81
  has_many :children, autosave: true, class_name: "CbHasManyChild", inverse_of: :parent
78
-
79
- def initialize(callback_registry)
80
- @callback_registry = callback_registry
81
- super()
82
- end
83
-
84
- attr_accessor :callback_registry
85
-
86
- def insert_as_root
87
- @callback_registry&.record_call(self.class, :insert_into_database)
88
- super
89
- end
90
-
91
- include CallbackTracking
92
82
  end
93
83
 
94
84
  class CbHasManyChild
95
85
  include Mongoid::Document
86
+ include CallbackTracking
96
87
 
97
88
  belongs_to :parent, class_name: "CbHasManyParent", inverse_of: :children
98
-
99
- def initialize(callback_registry)
100
- @callback_registry = callback_registry
101
- super()
102
- end
103
-
104
- attr_accessor :callback_registry
105
-
106
- include CallbackTracking
107
89
  end
108
90
 
109
91
  class CbEmbedsOneParent
110
92
  include Mongoid::Document
93
+ include CallbackTracking
94
+ include RootInsertable
111
95
 
112
96
  field :name
113
97
 
114
98
  embeds_one :child, cascade_callbacks: true, class_name: "CbEmbedsOneChild", inverse_of: :parent
115
-
116
- def initialize(callback_registry)
117
- @callback_registry = callback_registry
118
- super()
119
- end
120
-
121
- attr_accessor :callback_registry
122
-
123
- def insert_as_root
124
- @callback_registry&.record_call(self.class, :insert_into_database)
125
- super
126
- end
127
-
128
- include CallbackTracking
129
99
  end
130
100
 
131
101
  class CbEmbedsOneChild
132
102
  include Mongoid::Document
103
+ include CallbackTracking
133
104
 
134
105
  field :age
135
106
 
136
107
  embedded_in :parent, class_name: "CbEmbedsOneParent", inverse_of: :child
137
-
138
- def initialize(callback_registry)
139
- @callback_registry = callback_registry
140
- super()
141
- end
142
-
143
- attr_accessor :callback_registry
144
-
145
- include CallbackTracking
146
108
  end
147
109
 
148
110
  class CbEmbedsManyParent
149
111
  include Mongoid::Document
112
+ include CallbackTracking
113
+ include RootInsertable
150
114
 
151
115
  embeds_many :children, cascade_callbacks: true, class_name: "CbEmbedsManyChild", inverse_of: :parent
152
-
153
- def initialize(callback_registry)
154
- @callback_registry = callback_registry
155
- super()
156
- end
157
-
158
- attr_accessor :callback_registry
159
-
160
- def insert_as_root
161
- @callback_registry&.record_call(self.class, :insert_into_database)
162
- super
163
- end
164
-
165
- include CallbackTracking
166
116
  end
167
117
 
168
118
  class CbEmbedsManyChild
169
119
  include Mongoid::Document
120
+ include CallbackTracking
170
121
 
171
122
  embedded_in :parent, class_name: "CbEmbedsManyParent", inverse_of: :children
172
-
173
- def initialize(callback_registry)
174
- @callback_registry = callback_registry
175
- super()
176
- end
177
-
178
- attr_accessor :callback_registry
179
-
180
- include CallbackTracking
181
123
  end
182
124
 
183
125
  class CbParent
184
126
  include Mongoid::Document
185
-
186
- def initialize(callback_registry)
187
- @callback_registry = callback_registry
188
- super()
189
- end
190
-
191
- attr_accessor :callback_registry
127
+ include CallbackTracking
192
128
 
193
129
  embeds_many :cb_children
194
130
  embeds_many :cb_cascaded_children, cascade_callbacks: true
195
-
196
- include CallbackTracking
131
+ embeds_many :cb_cascaded_nodes, cascade_callbacks: true, as: :parent
197
132
  end
198
133
 
199
134
  class CbChild
200
135
  include Mongoid::Document
136
+ include CallbackTracking
201
137
 
202
138
  embedded_in :cb_parent
203
-
204
- def initialize(callback_registry, options)
205
- @callback_registry = callback_registry
206
- super(options)
207
- end
208
-
209
- attr_accessor :callback_registry
210
-
211
- include CallbackTracking
212
139
  end
213
140
 
214
141
  class CbCascadedChild
215
142
  include Mongoid::Document
143
+ include CallbackTracking
216
144
 
217
145
  embedded_in :cb_parent
218
146
 
219
- def initialize(callback_registry, options)
220
- @callback_registry = callback_registry
221
- super(options)
222
- end
147
+ before_save :test_mongoid_state
223
148
 
224
- attr_accessor :callback_registry
149
+ private
150
+
151
+ # Helps test that cascading child callbacks have access to the Mongoid
152
+ # state objects; if the implementation uses fiber-local (instead of truly
153
+ # thread-local) variables, the related tests will fail because the
154
+ # cascading child callbacks use fibers to linearize the recursion.
155
+ def test_mongoid_state
156
+ Mongoid::Threaded.stack('interceptable').push(self)
157
+ end
158
+ end
225
159
 
160
+ class CbCascadedNode
161
+ include Mongoid::Document
226
162
  include CallbackTracking
163
+
164
+ embedded_in :parent, polymorphic: true
165
+
166
+ embeds_many :cb_cascaded_nodes, cascade_callbacks: true, as: :parent
227
167
  end
228
168
  end
229
169
 
@@ -528,13 +528,13 @@ describe Mongoid::Serializable do
528
528
  end
529
529
 
530
530
  it "includes the first relation" do
531
- expect(relation_hash[0]).to include
532
- { "_id" => "kudamm", "street" => "Kudamm" }
531
+ expect(relation_hash[0]).to include(
532
+ { "_id" => "kudamm", "street" => "Kudamm" })
533
533
  end
534
534
 
535
535
  it "includes the second relation" do
536
- expect(relation_hash[1]).to include
537
- { "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
536
+ expect(relation_hash[1]).to include(
537
+ { "_id" => "tauentzienstr", "street" => "Tauentzienstr" })
538
538
  end
539
539
  end
540
540
 
@@ -545,13 +545,13 @@ describe Mongoid::Serializable do
545
545
  end
546
546
 
547
547
  it "includes the first relation" do
548
- expect(relation_hash[0]).to include
549
- { "_id" => "kudamm", "street" => "Kudamm" }
548
+ expect(relation_hash[0]).to include(
549
+ { "_id" => "kudamm", "street" => "Kudamm" })
550
550
  end
551
551
 
552
552
  it "includes the second relation" do
553
- expect(relation_hash[1]).to include
554
- { "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
553
+ expect(relation_hash[1]).to include(
554
+ { "_id" => "tauentzienstr", "street" => "Tauentzienstr" })
555
555
  end
556
556
  end
557
557
 
@@ -670,8 +670,8 @@ describe Mongoid::Serializable do
670
670
  end
671
671
 
672
672
  it "includes the specified relation" do
673
- expect(relation_hash).to include
674
- { "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
673
+ expect(relation_hash).to include(
674
+ { "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" })
675
675
  end
676
676
  end
677
677
 
@@ -682,8 +682,8 @@ describe Mongoid::Serializable do
682
682
  end
683
683
 
684
684
  it "includes the specified relation" do
685
- expect(relation_hash).to include
686
- { "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
685
+ expect(relation_hash).to include(
686
+ { "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" })
687
687
  end
688
688
  end
689
689
 
@@ -694,8 +694,8 @@ describe Mongoid::Serializable do
694
694
  end
695
695
 
696
696
  it "includes the specified relation sans exceptions" do
697
- expect(relation_hash).to include
698
- { "first_name" => "Leo", "last_name" => "Marvin" }
697
+ expect(relation_hash).to include(
698
+ { "first_name" => "Leo", "last_name" => "Marvin" })
699
699
  end
700
700
  end
701
701
  end
@@ -43,4 +43,27 @@ describe Mongoid::Timestamps::Created do
43
43
  expect(quiz.created_at).to be_within(10).of(Time.now.utc)
44
44
  end
45
45
  end
46
+
47
+ context "when the document is destroyed" do
48
+ let(:book) do
49
+ Book.create!
50
+ end
51
+
52
+ before do
53
+ Cover.before_save do
54
+ destroy if title == "delete me"
55
+ end
56
+ end
57
+
58
+ after do
59
+ Cover.reset_callbacks(:save)
60
+ end
61
+
62
+ it "does not set the created_at timestamp" do
63
+ book.covers << Cover.new(title: "delete me")
64
+ expect {
65
+ book.save
66
+ }.not_to raise_error
67
+ end
68
+ end
46
69
  end
@@ -37,12 +37,18 @@ describe Mongoid::Validatable::AssociatedValidator do
37
37
  User.new(name: "test")
38
38
  end
39
39
 
40
- let(:description) do
40
+ let(:description1) do
41
+ Description.new
42
+ end
43
+
44
+ let(:description2) do
41
45
  Description.new
42
46
  end
43
47
 
44
48
  before do
45
- user.descriptions << description
49
+ user.descriptions << description1
50
+ user.descriptions << description2
51
+ user.valid?
46
52
  end
47
53
 
48
54
  it "only validates the parent once" do
@@ -50,12 +56,16 @@ describe Mongoid::Validatable::AssociatedValidator do
50
56
  end
51
57
 
52
58
  it "adds the errors from the relation" do
53
- user.valid?
54
59
  expect(user.errors[:descriptions]).to_not be_nil
55
60
  end
56
61
 
62
+ it 'reports all failed validations' do
63
+ errors = user.descriptions.flat_map { |d| d.errors[:details] }
64
+ expect(errors.length).to be == 2
65
+ end
66
+
57
67
  it "only validates the child once" do
58
- expect(description).to_not be_valid
68
+ expect(description1).to_not be_valid
59
69
  end
60
70
  end
61
71
 
metadata CHANGED
@@ -1,41 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.8
4
+ version: 8.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - The MongoDB Ruby Team
8
- autorequire:
9
8
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMREwDwYDVQQDDAhkYngt
14
- cnVieTEXMBUGCgmSJomT8ixkARkWB21vbmdvZGIxEzARBgoJkiaJk/IsZAEZFgNj
15
- b20wHhcNMjQwMjA5MTc0NzIyWhcNMjUwMjA4MTc0NzIyWjBBMREwDwYDVQQDDAhk
16
- YngtcnVieTEXMBUGCgmSJomT8ixkARkWB21vbmdvZGIxEzARBgoJkiaJk/IsZAEZ
17
- FgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC0/Veq9l47cTfX
18
- tQ+kHq2NOCwJuJGt1iXWQ/vH/yp7pZ/bLej7gPDl2CfIngAXRjM7r1FkR9ya7VAm
19
- IneBFcVU3HhpIXWi4ByXGjBOXFD1Dfbz4C4zedIWRk/hNzXa+rQY4KPwpOwG/hZg
20
- id+rSXWSbNlkyN97XfonweVh7JsIa9X/2JY9ADYjhCfEZF+b0+Wl7+jgwzLWb46I
21
- 0WH0bZBIZ0BbKAwUXIgvq5mQf9PzukmMVYCwnkJ/P4wrHO22HuwnbMyvJuGjVwqi
22
- j1NRp/2vjmKBFWxIfhlSXEIiqAmeEVNXzhPvTVeyo+rma+7R3Bo+4WHkcnPpXJJZ
23
- Jd63qXMvTB0GplEcMJPztWhrJOmcxIOVoQyigEPSQT8JpzFVXby4SGioizv2eT7l
24
- VYSiCHuc3yEDyq5M+98WGX2etbj6esYtzI3rDevpIAHPB6HQmtoJIA4dSl3gjFb+
25
- D+YQSuB2qYu021FI9zeY9sbZyWysEXBxhwrmTk+XUV0qz+OQZkMCAwEAAaN7MHkw
26
- CQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFH4nnr4tYlatU57RbExW
27
- jG86YM5nMB8GA1UdEQQYMBaBFGRieC1ydWJ5QG1vbmdvZGIuY29tMB8GA1UdEgQY
28
- MBaBFGRieC1ydWJ5QG1vbmdvZGIuY29tMA0GCSqGSIb3DQEBCwUAA4IBgQBKGtHA
29
- fpi3N/BL1J5O4CBsAjtF4jHDiw2r5MwK+66NzMh3uedjgPI7MoosemLy++SB+8BR
30
- SE8bDkb6gfDQQzrI6KSXXyqH2TbQXpY5Tac7/yqXRiu8G2qOrOj4czB/Hq7j09CV
31
- YoH88v6hL11i5jt6jPjFh8hXYG0hDQxhi3atRz5Wwd98tUf2DSbyJXJiRgCBeZjl
32
- rP7AnKsWMu0C+zPlL+nXtQr+nTFtkKXRWfUJMqePpBqtriQvgQ+Y1ItqYVTSLuiM
33
- iwUMcn/rGhdCMBSaKDXdFkIveCHQE2f2WBo2EdErrcTrgEKYYdNfzcb/43j7L1kx
34
- AUwyTtk+HFrviBynQbKN82rjbZE+5gukVea5c7idQPkqacPYsoU37DI+hTlUyJkV
35
- dcTtfEg44lLlfNukBslfiQf54r+uWbyB0m0rDUN/py7/Ghyzt5GLBU91uCO3dGoI
36
- 55uFRHMvEcJMTDeImC/nuucPCAiEGMHggr9+NPC0tqpxjGKTo7lS7GzUFjg=
37
- -----END CERTIFICATE-----
38
- date: 2024-02-28 00:00:00.000000000 Z
9
+ cert_chain: []
10
+ date: 2025-01-29 00:00:00.000000000 Z
39
11
  dependencies:
40
12
  - !ruby/object:Gem::Dependency
41
13
  name: activemodel
@@ -858,29 +830,6 @@ files:
858
830
  - spec/mongoid_spec.rb
859
831
  - spec/rails/controller_extension/controller_runtime_spec.rb
860
832
  - spec/rails/mongoid_spec.rb
861
- - spec/shared/LICENSE
862
- - spec/shared/bin/get-mongodb-download-url
863
- - spec/shared/bin/s3-copy
864
- - spec/shared/bin/s3-upload
865
- - spec/shared/lib/mrss/child_process_helper.rb
866
- - spec/shared/lib/mrss/cluster_config.rb
867
- - spec/shared/lib/mrss/constraints.rb
868
- - spec/shared/lib/mrss/docker_runner.rb
869
- - spec/shared/lib/mrss/eg_config_utils.rb
870
- - spec/shared/lib/mrss/event_subscriber.rb
871
- - spec/shared/lib/mrss/lite_constraints.rb
872
- - spec/shared/lib/mrss/server_version_registry.rb
873
- - spec/shared/lib/mrss/session_registry.rb
874
- - spec/shared/lib/mrss/session_registry_legacy.rb
875
- - spec/shared/lib/mrss/spec_organizer.rb
876
- - spec/shared/lib/mrss/utils.rb
877
- - spec/shared/share/Dockerfile.erb
878
- - spec/shared/share/haproxy-1.conf
879
- - spec/shared/share/haproxy-2.conf
880
- - spec/shared/shlib/config.sh
881
- - spec/shared/shlib/distro.sh
882
- - spec/shared/shlib/server.sh
883
- - spec/shared/shlib/set_env.sh
884
833
  - spec/spec_helper.rb
885
834
  - spec/support/authorization.rb
886
835
  - spec/support/client_registry.rb
@@ -1163,7 +1112,6 @@ metadata:
1163
1112
  documentation_uri: https://docs.mongodb.com/mongoid/
1164
1113
  homepage_uri: https://mongoid.org/
1165
1114
  source_code_uri: https://github.com/mongodb/mongoid
1166
- post_install_message:
1167
1115
  rdoc_options: []
1168
1116
  require_paths:
1169
1117
  - lib
@@ -1178,8 +1126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1178
1126
  - !ruby/object:Gem::Version
1179
1127
  version: 1.3.6
1180
1128
  requirements: []
1181
- rubygems_version: 3.5.3
1182
- signing_key:
1129
+ rubygems_version: 3.6.3
1183
1130
  specification_version: 4
1184
1131
  summary: Elegant Persistence in Ruby for MongoDB.
1185
1132
  test_files:
@@ -1573,29 +1520,6 @@ test_files:
1573
1520
  - spec/mongoid_spec.rb
1574
1521
  - spec/rails/controller_extension/controller_runtime_spec.rb
1575
1522
  - spec/rails/mongoid_spec.rb
1576
- - spec/shared/LICENSE
1577
- - spec/shared/bin/get-mongodb-download-url
1578
- - spec/shared/bin/s3-copy
1579
- - spec/shared/bin/s3-upload
1580
- - spec/shared/lib/mrss/child_process_helper.rb
1581
- - spec/shared/lib/mrss/cluster_config.rb
1582
- - spec/shared/lib/mrss/constraints.rb
1583
- - spec/shared/lib/mrss/docker_runner.rb
1584
- - spec/shared/lib/mrss/eg_config_utils.rb
1585
- - spec/shared/lib/mrss/event_subscriber.rb
1586
- - spec/shared/lib/mrss/lite_constraints.rb
1587
- - spec/shared/lib/mrss/server_version_registry.rb
1588
- - spec/shared/lib/mrss/session_registry.rb
1589
- - spec/shared/lib/mrss/session_registry_legacy.rb
1590
- - spec/shared/lib/mrss/spec_organizer.rb
1591
- - spec/shared/lib/mrss/utils.rb
1592
- - spec/shared/share/Dockerfile.erb
1593
- - spec/shared/share/haproxy-1.conf
1594
- - spec/shared/share/haproxy-2.conf
1595
- - spec/shared/shlib/config.sh
1596
- - spec/shared/shlib/distro.sh
1597
- - spec/shared/shlib/server.sh
1598
- - spec/shared/shlib/set_env.sh
1599
1523
  - spec/spec_helper.rb
1600
1524
  - spec/support/authorization.rb
1601
1525
  - spec/support/client_registry.rb
checksums.yaml.gz.sig DELETED
Binary file
data/spec/shared/LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2020 MongoDB, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- desired_version, arch = ARGV
4
- if arch.nil?
5
- STDERR.puts "Usage: get-mongodb-download-url desired-version arch"
6
- exit 1
7
- end
8
-
9
- $: << File.join(File.dirname(__FILE__), '../lib')
10
- require 'mrss/server_version_registry'
11
-
12
- begin
13
- puts Mrss::ServerVersionRegistry.new(desired_version, arch).download_url
14
- rescue Mrss::ServerVersionRegistry::Error => exc
15
- STDERR.puts "Error: #{exc}"
16
- exit 2
17
- end